Use postgres with sqldatasource in asp.net

baoh

New Member
I am using npgsql in ordre to connect to my postgres databse. Now I would like to do add the connection in my web.config so to be able to use the sql data source tag of the asp.net.The following is what I have done so far\[code\] <connectionStrings> <add name="constring" connectionString="Server=localhost; user id=postgres; Password=mypassword; Database='db_name';Trusted_Connection=True"/> </connectionStrings>\[/code\]BUT an error is showing saying error to login since it using my pc profile account password rather than the postgres database password. Any idea how t solve it?This is the error i am getting now:\[code\]A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)\[/code\]I want to connect to postgres no to sql server.
 
Back
Top