Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Software > Access External data > >> Im****ting f...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 7 Topic 10883 of 11313
Post > Topic >>

>> Im****ting from SQL

by =?Utf-8?B?Sm9uYXRoYW4=?= <Jonathan@[EMAIL PROTECTED] > Aug 4, 2008 at 02:08 PM

Hi, using Access 2003. I want to im****t data from SQL. If I im****t to
tables 
that do not have any indexes the process takes a little over 2 hours with
the 
database building to 575 MB. When the Access database has indexes in the 
tables the transfer fails because the database builds to over 2 GB during
the 
transfer. Unfortunately the data for now must be in Access format.

I tried to add the indexes after the transfer. I created a table in which
I 
cache the indexes and indexes' fields. My idea being to delete indexes
before 
the data im****t and then re-create after the im****t. I am hoping that I am

doing something wrong; rather than that this is not possible.

In the following code snippet I use a loop to append fields to an index 
fields collection and then append the index to the collection of table 
indexes. The problem is an error is triggered by the last line when
appending 
the index.

For fieldLoop = 0 To UBound(aAllIdxField())
    Set idxField = idx.CreateField(aAllIdxField(fieldLoop))
    idx.Fields.Append idxField
Next fieldLoop
tdf.Indexes.Append idx

I think the error is that the index fields collection already exists in
the 
table fields collection. The error is 3409 (Invalid field definition 
'[Building_Name]' in definition of index or relation****p.) in procedure 
CreateTableIndex.

This field is an existing field containing data in this table. The index 
name is not the same as the field name. The table does not have any
existing 
index.

So the question is... how can I add an index using VBA to an existing
table 
using fields that contain data?

Any ideas or suggestions appreciated :-)

Many thanks,
Jonathan
 




 7 Posts in Topic:
>> Importing from SQL
=?Utf-8?B?Sm9uYXRoYW4=?=   2008-08-04 14:08:03 
RE: >> Importing from SQL
=?Utf-8?B?Sm9uYXRoYW4=?=   2008-08-04 14:17:15 
Re: >> Importing from SQL
"Mary Chipman [MSFT]  2008-08-04 18:17:39 
Re: >> Importing from SQL
=?Utf-8?B?Sm9uYXRoYW4=?=   2008-08-04 16:07:00 
Re: >> Importing from SQL
=?Utf-8?B?Sm9uYXRoYW4=?=   2008-08-04 21:42:01 
Re: >> Importing from SQL
"Mary Chipman [MSFT]  2008-08-06 14:30:20 
Re: >> Importing from SQL
=?Utf-8?B?Sm9uYXRoYW4=?=   2008-08-06 14:10:01 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Dec 3 17:27:04 CST 2008.