ODBC in VB6 - Mailing list pgsql-odbc

From DanPerlman
Subject ODBC in VB6
Date
Msg-id 000a01c37487$a661cc60$0100005a@server
Whole thread Raw
List pgsql-odbc
Hi,
 
I have never used ODBC in a VB6 program before.
I am trying to write some simple code to append data from an access 2k table to a postgres table.
My DSN works with access.
I am getting a "type mismatch" error when trying to open the postgres db.
 
Thanks,
 
Dan
 
Private Sub CommandStart_Click()
 
Dim Pricebooks As Database
Dim Bonneville As Database
Dim WrkSpc As Workspace
Dim Apb As Recordset
Dim Bpb As Recordset
Dim i As Integer
 
'Open Access table.
Set Pricebooks = OpenDatabase(App.Path & "\Pricebooks.mdb")
Set Apb = Pricebooks.OpenRecordset("pricebook", dbOpenTable)
 
'Open Postgres table
Set Bonneville = OpenDatabase(Bonneville, False, "ODBC;DSN=PostgresSQL30;UID=postgres;PWD=postgres;")
Set Bpb = Bonneville.OpenRecordset(public_papricebook, dbOpenDynamic)
 
TextID.Text = Apb("pricebookid") & ""
TextID.Refresh
 

End Sub

pgsql-odbc by date:

Previous
From: Brian Furey
Date:
Subject: Date Formats
Next
From: mrpietan@netscape.net (Lord Corwin)
Date:
Subject: Question: ODBC connection across 2 disimilar NT Domains