How to use this ODBC

From: "gunawan" <gunawan(at)ikp(dot)component(dot)astra(dot)co(dot)id>
To: <pgsql-odbc-owner(at)postgresql(dot)org>
Subject: How to use this ODBC
Date: 2005-11-11 04:38:18
Message-ID: 00ee01c5e679$bd5f5520$6702a8c0@subfinance
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

Dear All,
I need kind a favour from you since i meet difficulties to select a table
with Visual Basic 6.0.
this are my code :

Dim CN As New ADODB.Connection
Dim tks As String
Dim RS As New ADODB.Recordset

Private Sub Command1_Click()

If CN.State = 1 Then CN.Close

CN.Open _
"DSN=postgreSQL;" & _
"UID=FIN;" & _
"PWD=FAIKP;" & _
"Database=Finance"

RS.CursorLocation = adUseClient

tks = "SELECT KodeAkun From 'Akun' " --> *)

RS.Open tks, CN, adOpenDynamic ---> **)

CN.Close
End Sub

**) I already could establish a connection to the database but still cannot
open the recordset.
*) I try to replace the double quotes (") that used in pSQL with quote(')
in order to run the SQL command, then an error messages shown as below:

"The instruction at"0x0476cd8a" referenced memory at "0x000000000". The
memory could not be "read".

Pls, did any of you could help me.

Regards Andi Gunawan

Browse pgsql-odbc by date

  From Date Subject
Next Message Dave Page 2005-11-11 09:04:59 psqlODBC 08.01.0101 Released
Previous Message Greg Campbell 2005-11-10 14:33:57 Re: How remove stale DSN ?