Help: I can't seem to get INDEXES set up on tables 
Author Message
 Help: I can't seem to get INDEXES set up on tables

I am new to programming in VB and am using the professional verson and
can not speed up my data access.  I was told to use indexes on my tables
but I was not using table defs.  I have 2 data controls and use dynasets of
other tables in the db.  So I tried to go back and make table defs to set
up indexes on the tables but VB will not let me say: set mytable =
mydb.createtable("table) with both mytable and mydb dim'ed as table and db
respectfully.  I get an error on the Createtable statement saying invalid
argument.  So I try to set an index on a data control using the same code
in the examples (data1.tabledefs(table).index = primarykey) and get an error
message saying index not a valid property.  With out working with indexes it
takes VB about 10 seconds to pull up a description of a part from a table
w/400 records.  I can imagine the time needed to pull the location info from
a table with over 4000 entries.  Man I hate VB!  What happend to dBase?  Well
my boss gave me VB and I have to make it work.  Can you help me?  I know it
is tough but I don't know where else to try.

Thanks for all you can do.

Dorian



Mon, 16 Feb 1998 03:00:00 GMT  
 Help: I can't seem to get INDEXES set up on tables

Quote:

>I am new to programming in VB and am using the professional verson and
>can not speed up my data access.  I was told to use indexes on my tables
>but I was not using table defs.  I have 2 data controls and use dynasets
of
>other tables in the db.  So I tried to go back and make table defs to
set
>up indexes on the tables but VB will not let me say: set mytable =
>mydb.createtable("table) with both mytable and mydb dim'ed as table and
db
>respectfully.  I get an error on the Createtable statement saying
invalid
>argument.  

If the table already exsists in the database use :
        Set mytable = mydb.OpenTable("TableName")
to open it.Then :
        mytable.index = "IndexName"
to set the index and the "Seek" command to find specific records.

[snip]
  Man I hate VB!  What happend to dBase?  Well

Quote:
>my boss gave me VB and I have to make it work.  Can you help me?  I know
it
>is tough but I don't know where else to try.

I used to work in dBase as well and I wouldn't go back now :-)

 - Declan
--
Declan Stanley               Custom Windows Applications
133 Tonlegee Road,           using Visual Basic/Access.
Raheny,                    

Ireland                      http://www.iol.ie/~declans



Fri, 20 Feb 1998 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Can't seem to set index on Foxpro table

2. Attached dBASE III tables' indexes don't seem to help

3. How to get table's index in the tables collection

4. InternetSetOption doesn't seem to set connect timeout

5. 'Canned' data in VB program

6. how to set up control's tabindex,and control array's index

7. Getting row/column index of HTML TABLE cell

8. HELP, can't set a yes/no field in a access table

9. Setting table index with VBA

10. Problem with setting INDEX on FoxPro table in Access 97

11. Setting an Index on a new table

12. Getting/Setting ACL's and ACE's

 

 
Powered by phpBB® Forum Software