By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,773 Members | 1,710 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,773 IT Pros & Developers. It's quick & easy.

Create index in PG table with vb6

P: n/a
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=PostgreSQL30;DATABASE=bonneville;UID=postgres ;PWD=postgres"
'Open Access table.
Set Pricebooks = OpenDatabase(App.Path & "\Pricebooks.mdb")
Set Apb = Pricebooks.OpenRecordset("pricebook", dbOpenTable)

'Open Postgres table
Set WrkSpc = DBEngine.Workspaces(0)
Set PGDB = WrkSpc.OpenDatabase("", False, False, Bonneville)
Set Bpb = PGDB.OpenRecordset("public.papricebook", dbOpenDynaset)
Nov 11 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
--- DanPerlman <da*@dpci.us> wrote:
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


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postgresql.org

Nov 11 '05 #2

P: n/a
--- DanPerlman <da*@dpci.us> wrote:
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


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postgresql.org

Nov 11 '05 #3

P: n/a
Hmm, looks like Yahoo crapped out on me and failed to
send the text of my reply (that's my story and I'm
sticking to it ;-) ). Trying again:

Sounds like your problem field is type text, and your
ODBC driver setting for "Text As LongVarChar" is
"true". Access will see the field as "memo" type in
that case, and therefore not indexable or searchable.

You could redefine your field as varchar, or unset the
driver option, though that will mean a size limitation
on your fields.

--- Jeff Eckermann <je************@yahoo.com> wrote:
--- DanPerlman <da*@dpci.us> wrote:
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


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site
design software
http://sitebuilder.yahoo.com

---------------------------(end of
broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to

ma*******@postgresql.org
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postgresql.org

Nov 11 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.