mSysImexSpecs help

  • Thread starter Thread starter DS
  • Start date Start date
D

DS

Hi all,

First, I researched my issue first on google to no avail....

OK, so I'm creating a tableDef in VB code. This tableDef is actually a
linked tab-delimited file. I am creating the link first, then using a
'SELECT INTO' SQL command to insert all of the text records into a
tempTable. Then using the tempTable to update records in another table.

Since speed is an issue, I can not open the text file, read each line, do
a split, then insert records into the tempTable one at a time, it must be
done with a SELECT INTO.

The code is:

tempDB.CreateTableDef(tempTbl)
tempTbl.Connect=Text;DSN=tabDelimited Link
Specification;FMT=Delimited;HDR=NO;IMEX=2;CharacterSet=
437;DATABASE=D:\My Documents\PROJECTS\Temp
tempTbl.TableDataSource="filename.tab"
tempDB.TableDefs.Append tempTbl

At the APPEND attempt, it return the 'Link Specification does not
exist....'

It does. It is visible in the mSysImex tbls. I can use the 'Linked Table
Manager', choose a file to import, pick the 'Link Specification' out of
the dropdown-box, click 'Finish' and it links with not problem. The
specification was originally created using the Link wizard.

I cannot use the spec programatically, only throught the linking
'wizard'.

Any ideas,


TIA

DS
 
I never link text files (or Excel files).

I always import the data and manipulate it from within Access.
Much safer that way.
 
I never link text files (or Excel files).

I always import the data and manipulate it from within Access.
Much safer that way.

Joe,

The link IS being used to import the data. I am d/l'g a bunch of data from
a server and stuffing it into a text file. Then when the download's done,
I'm (trying to) create the link, then doing 2 SQL statements, to add data,
or update existing data, in another table.

This is a newsreader program I've been working on for a while now, and have
it working another way, but I want to try to get it to work this way.

I really have to get it working with linking text files. The way it
currently works is extremely CPU/Jet intensive. I have 10 threads all d/l'g
headers from different groups and different servers. When a thread get's 50
headers in it's buffer, it passes the data to a module that open's the
group's database, either add's header the headers that don't exist, or
updates the one's that do, then it closes the database and moves on to the
next set of 50 headers, maybe from the same group, or not. It is
continuously opening, closing, creating recordset's..... I need to be able
to write to a text file, link it properly, then do the 2 SQL commands.

DS
 
Back
Top