pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: DanPerlman <dan@dpci.us>
To: pgsql-odbc@postgresql.org
Subject: ODBC in VB6
Date: Sat, 6 Sep 2003 09:00:44 -0600
Message-ID: <000a01c37487$a661cc60$0100005a@server> (raw)

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

view thread (2+ messages)  latest in thread

Message-ID: <000a01c37487$a661cc60$0100005a@server>
Permalink:  ../000a01c37487$a661cc60$0100005a@server/
Also on:    postgresql.org/message-id/000a01c37487$a661cc60$0100005a@server

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-odbc@postgresql.org
  Cc: dan@dpci.us
  Subject: Re: ODBC in VB6
  In-Reply-To: <000a01c37487$a661cc60$0100005a@server>
  References: <000a01c37487$a661cc60$0100005a@server>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox