ODBC and VB5 Progress... But still not there - Mailing list pgsql-interfaces

From Eric Damron
Subject ODBC and VB5 Progress... But still not there
Date
Msg-id 001401bfb5e0$33556740$0200a8c0@C287853-A.olmpi1.wa.home.com
Whole thread Raw
List pgsql-interfaces
Thanks to all that told me about needing unique indexes in order to access
an ODBC database.  One of my tables has a three part composite primary key.
I'm assuming that all primary keys have by default unique indexes.  I found
that I didn't have the "recognize Unique Indexes" box checked in my ODBC
driver.

To make things simple I created one (1) table with two columns in my
PostgreSQL database:

CREATE TABLE race(
raceid serial  PRIMARY KEY,Description char(30) NOT NULL
)

Then I wrote a little code to try to update the table using VB5:

Option Explicit
Dim rsWarHammer As Recordset
Dim dbWarHammer As Database



Private Sub cmdAdd_Click()   rsWarHammer.AddNew   MsgBox (rsWarHammer.Updatable)   rsWarHammer!Description =
txtDescription.Text  rsWarHammer.Update
 
End Sub

Private Sub Form_Load()   Dim strConnect As String, strSQL As String   strSQL = "SELECT RaceID, Description FROM race"
strConnect = "ODBC;uid=eric;pwd=grnthing;database = warhammer"   Set dbWarHammer = OpenDatabase("", , False,
strConnect)  Set rsWarHammer = dbWarHammer.OpenRecordset(strSQL)
 
End Sub


The message box now tells me that the record set is updateable!  This is
good news.  It use to return a false.
I still get an error however:  "Run-time error '3155':  ODBC --insert on
linked table '???' failed.

What's the missing piece here?

Thanks again!








pgsql-interfaces by date:

Previous
From: Greg Brzezinski
Date:
Subject: Re: Zeos download (was making winodbc driver better?)
Next
From: Francisco Jose Toledano Alcala
Date:
Subject: Slow Recordset