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
How do I stop my fonts from shrinking. Is it a css zoom issue?
VMware ESXI 4 Video Card Video RAM setting
Using Calendar Control 11.0 in Access 2003 on a Tab Control on a Form
asp.net: Conversion failed when converting the varchar value ' + row.Cells(1).ToInteger() + ' to data type int.
How do I save incoming email attachments into a specific folder?
Turning off Taskbar Thumbnails in Windows 7
How can I export a report of a local computer policy?
Migrating blackberry enterprise server express form sbs 2003 to sbs 2008
Oracle and SQl training for Crystal Reports job
I need to build a biig and beefy IIS front end server. May I please have some help in configing the server