473,386 Members | 1,812 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Create index in PG table with vb6

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
3 2776
--- 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
--- 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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Phil Powell | last post by:
create table if not exists nnet_produkt_varegruppe ( nnet_produkt_varegruppe_id int not null auto_increment, primary key(nnet_produkt_varegruppe_id), nnet_produkt_varegruppe_navn varchar(255) not...
12
by: Tuhin Kumar | last post by:
Hi, Oracle give the error ORA-01418 when I try to do the following; Create unique index t1_pk on TABLE1(EntryId DESC) ; If the I try to add primary key Contraint using the above index t1_pk...
0
by: Guy Deprez | last post by:
Hi, i'm having a problem to create indexes. STEP 1 ----------- Connection is OK (you can find the string at the end of the message) Table ("Couleurs") creation is OK STEP 2. Index Creation
11
by: dfurtney | last post by:
SQL Server 7/2000: We have reasonably large tables (3,000,000 rows) that we need to add some indexes for. In a test, it took over 12 hours to CREATE a new INDEX against this table. One of us...
4
by: maricel | last post by:
Could someone confirm which tablespace is being used when running ALTER & CREATE INDEX. Is it the tempspace or the tablespace where the table resides? Many thanks, maricel
2
by: Maverick | last post by:
If i try to create foxpro table by the following "sql" statment, the C# compiler will only return an error "xxxx not support in non-dbc version". The "index on" command statement return some kind...
19
by: Lyle Fairfield | last post by:
MSDN Home > MSDN Library > Win32 and COM Development Data Access Microsoft offers many data access technologies to suit various development needs. This section of the MSDN Library contains...
4
by: JohnnyDeep | last post by:
I am trying to create a store proc that contain a create index with the cluster option and I receive DB21034E The command was processed as an SQL statement because it was not a valid Command...
4
by: etuncer | last post by:
Hello All, I have Access 2003, and am trying to build a database for my small company. I want to be able to create a word document based on the data entered through a form. the real question is...
6
by: Alvin SIU | last post by:
Hi all, I have a table in Db2 v8 like this: Team Name Role ------ -------- --------------------- A Superman Leader A Batman Member A WonderWoman Member B ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.