How to use this ODBC - Mailing list pgsql-odbc

From gunawan
Subject How to use this ODBC
Date
Msg-id 00ee01c5e679$bd5f5520$6702a8c0@subfinance
Whole thread Raw
List 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

pgsql-odbc by date:

Previous
From: "Miguel Juan"
Date:
Subject: psqlOdbc Ansi + BDE issues
Next
From: Claus Scherschel
Date:
Subject: Re: Invisible tables in Access 2000