Microsoft
Software
Hardware
Network
Question : Import text file - definition (field name, delimited, lng) based on a table
Hello,
Question - possible or not. I have been given the task of simplifying an import process. There are around 50 imports that need to be done 10-12 times. As opposed to using the import/export dialog box & wizard and saving the spec., the definition for each import is in a table. ex:
Field 1 - field name
Field 2 - data type
Field 3 - length
Field 4 - skip (y/n)
etc.
These tables basically simulate the import/export system table. There would be another table to assign the table name (name of the table to be created) and create it in another database. So, the whole process will be (maybe)...
1. Table definition is created for each import
2. text file resides in FTP folder
3. User open the database application and fills-out a form - specifies the path & .txt file, assigns the access table name and where it should go (path).
4. User clicks a button and the text file is import to "C:\MyDB.mdb"
Is there an easy solution to this? Did I provide enough info? I know they can use a saved file spec but they want it this way for easier editing.
Any ideas?
Thanks,
Pat
Answer : Import text file - definition (field name, delimited, lng) based on a table
You can indeed use CreateTableDef() to create tables directly into a specified database, but it's probably easier to execute a SELECT INTO query with an IN claues to copy the imported data from the current database into the other database.
Random Solutions
Delete Old Exchange Emails
A Web part with this ID has already been added to this page
Decrease load time of tree in vb.net 2003
how to free disk space on esx 4.1
Block Applications and Internet on Balckberry 8520 Curve
Messages forwarded by Outlook rule go nowhere
Network icon problem in Windows 7
Access SELECT Combo box
Where in the page lifecycle are cookies created?
Segregating Users Within SBS 2008