Hi,
I am using the following to write data from an access table to a postgres
table.
I need to create an index on the "partnumber " field in the Bpb (odbc pg
database) so I can seek on that field. Need to be able to locate and update
records that already exist in the postgres table. It appears that the
"partnumber " field is a memo field.
Thanks,
Dan
Dim Pricebooks As dao.Database
Dim PGDB As dao.Database
Dim WrkSpc As Workspace
Dim Bonneville As String
Dim Apb As Recordset
Dim Bpb As Recordset
Dim PBSelection As String
Dim i As Integer
Bonneville =
"DSN=PostgreSQL 30;DATABASE=bon neville;UID=pos tgres;PWD=postg res"
'Open Access table.
Set Pricebooks = OpenDatabase(Ap p.Path & "\Pricebooks.md b")
Set Apb = Pricebooks.Open Recordset("pric ebook", dbOpenTable)
'Open Postgres table
Set WrkSpc = DBEngine.Worksp aces(0)
Set PGDB = WrkSpc.OpenData base("", False, False, Bonneville)
Set Bpb = PGDB.OpenRecord set("public.pap ricebook", dbOpenDynaset)