Re: versions of oDBC driver - Mailing list pgsql-odbc
From | Zlatko Matić |
---|---|
Subject | Re: versions of oDBC driver |
Date | |
Msg-id | 000001c5d621$74a36fa0$52bffea9@zlatkovyfkpgz6 Whole thread Raw |
In response to | Re: versions of oDBC driver ("Merlin Moncure" <merlin.moncure@rcsonline.com>) |
Responses |
Re: versions of oDBC driver
|
List | pgsql-odbc |
Public strConnection As String
Dim qdf As Object
Dim qdfSQL As String
Dim rs As Object
Dim strConnInfo As String
Dim strConnUserPass As String
Dim strConnParms As String
Dim CurrentUser As String
Dim A6 As String
' *********************************************
' READONLY A0
' PROTOCOL A1
' FAKEOIDINDEX A2 'A2 must be 0 unless A3=1
' SHOWOIDCOLUMN A3
' ROWVERSIONING A4
' SHOWSYSTEMTABLES A5
' CONNSETTINGS A6
' FETCH A7
' SOCKET A8
' UNKNOWNSIZES A9 ' range [0-2]
' MAXVARCHARSIZE B0
' MAXLONGVARCHARSIZE B1
' DEBUG B2
' COMMLOG B3
' OPTIMIZER B4 ' note that 1 = _cancel_ generic optimizer...
' KSQO B5
' USEDECLAREFETCH B6
' TEXTASLONGVARCHAR B7
' UNKNOWNSASLONGVARCHAR B8
' BOOLSASCHAR B9
' PARSE C0
' CANCELASFREESTMT C1
' EXTRASYSTABLEPREFIXES C2
Case "DEFAULT"
A6 = ""
Case "UNICODE"
A6 = "CLIENT_ENCODING=UNICODE"
Case "SQL_ASCII"
A6 = "CLIENT_ENCODING=SQL_ASCII"
Case "WIN1250"
A6 = "CLIENT_ENCODING=WIN1250"
Case "UTF8"
A6 = "CLIENT_ENCODING=UTF8"
Case Else
A6 = ""
End Select
strConnInfo = "ODBC;Driver={PostgreSQL};Server=" & SERVER & ";Port=" & PORT & ";Database=" & DATABASE & ";"
strConnUserPass = "Uid=" & USERNAME & ";Pwd=" & PASSWORD & ";"
strConnParms = "A0=0;A1=6.4;A2=0;A3=0;A4=1;A5=0;A6=" & A6 & ";A7=100;A8=" & SOCKET & ";A9=1;" & _
"B0=254;B1=8190;B2=0;B3=0;B4=1;B5=1;B6=0;B7=1;B8=0;B9=0;" & _
"C0=0;C1=0;C2=dd_;"
Set qdf = db.CreateQueryDef("")
qdf.connect = strConnection
strSQL = "SELECT CURRENT_USER AS ""CURRENTUSER"""
qdf.SQL = strSQL
qdf.returnsrecords = True
Set rs = qdf.openrecordset()
MsgBox "You have successfully connected as: " & USERNAME, , "Connection to the server"
ConnectionToServer = True
Else
MsgBox "Connection to server failed. Check connection parameters and try again."
ConnectionToServer = False
GoTo ErrorHandler
End If
DoCmd.Hourglass True
Call RelinkLinkedTables(SERVER, DATABASE)
Call RelinkPassThroughQueries
Exit Function
Dim strErr As String
MsgBox "Connection to server failed. Check connection parameters and try again", , "Connection to Server"
strErr = "VBA-Error Information" & vbNewLine
strErr = strErr & "Number: " & vbTab & vbTab & Err.Number & vbNewLine
strErr = strErr & "Description: " & vbTab & Err.Description & vbNewLine
strErr = strErr & "LastDLLError: " & vbTab & Err.LastDllError & vbNewLine
strErr = strErr & vbNewLine
MsgBox strErr, vbOKOnly + vbExclamation, "Error"
Resume GoAway
----- Original Message -----From: Merlin MoncureTo: Zlatko MaticSent: Thursday, October 20, 2005 2:06 PMSubject: Re: [ODBC] versions of oDBC driverwhy not? What kind of error are you getting? The latest revisions of the driver are probably best unless you are using declare/fetch (see archives).
Merlin
From: pgsql-odbc-owner@postgresql.org [mailto:pgsql-odbc-owner@postgresql.org] On Behalf Of "Zlatko Matic"
Sent: Thursday, October 20, 2005 6:34 AM
To: pgsql-odbc@postgresql.org; pgsql-interfaces@postgresql.org; pgsql-general@postgresql.org
Subject: [ODBC] versions of oDBC driver
Hello.
Could someone say which versions of ODBC drivers are recommended for PostgreSQL/MS Access 2003 combination, for:
a) Postgres 8.0.4
b) Postgres 8.1 beta
Namely, I was not able to connect from my Access front-end when I migrated from Postgres 8.0.4 to Postgres 8.1 beta3....
Are there any significant changes that could cause such problems in connection strings ?
Zlatko
pgsql-odbc by date: