From: | "DanPerlman" <dan(at)dpci(dot)us> |
---|---|
To: | <pgsql-odbc(at)postgresql(dot)org> |
Subject: | ODBC in VB6 |
Date: | 2003-09-06 15:00:44 |
Message-ID: | 000a01c37487$a661cc60$0100005a@server |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Rafi Einstein | 2003-09-08 16:36:33 | PostgreSQL ODBC modification request |
Previous Message | Brian Furey | 2003-09-06 14:08:49 | Date Formats |