[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.odbcnet

How do I connect to Postgres DB?

Steve R

7/30/2002 2:18:00 AM

I've looked on all the documentation, message boards etc.
Here's what I've got so far:

Imports Microsoft.Data.Odbc

Public Class Licensing
Inherits System.Web.UI.Page

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim oConnection As Microsoft.Data.Odbc.OdbcConnection

oConnection = New OdbcConnection()

oConnection.ConnectionString = "Driver={PostgreSQL}"
oConnection.Open()

End Sub

End Class

This generates the following error:

Exception Details: Microsoft.Data.Odbc.OdbcException: ERROR [01000]
[Microsoft][ODBC Driver Manager] The driver doesn't support the version of
ODBC behavior that the application requested (see SQLSetEnvAttr).



1 Answer

Chirag Gupta

9/5/2002 3:31:00 AM

0

You can download the .Net data Provider for Postgres DB
from the given link :-

http://gborg.postgresql.org/project/npgsql/projd...

>-----Original Message-----
>I've looked on all the documentation, message boards etc.
>Here's what I've got so far:
>
>Imports Microsoft.Data.Odbc
>
>Public Class Licensing
>Inherits System.Web.UI.Page
>
>Private Sub Page_Load(ByVal sender As System.Object,
ByVal e As
>System.EventArgs) Handles MyBase.Load
>Dim oConnection As Microsoft.Data.Odbc.OdbcConnection
>
>oConnection = New OdbcConnection()
>
>oConnection.ConnectionString = "Driver={PostgreSQL}"
>oConnection.Open()
>
>End Sub
>
>End Class
>
>This generates the following error:
>
>Exception Details: Microsoft.Data.Odbc.OdbcException:
ERROR [01000]
>[Microsoft][ODBC Driver Manager] The driver doesn't
support the version of
>ODBC behavior that the application requested (see
SQLSetEnvAttr).
>
>
>
>.
>