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
hyper v netwrking woes
NSA 240 Site to Site VPN - VoIP server on 1 side some phones on the other
Oracle 10g SQLPLUS general
Bang for the Bucks
sharepoint 2010 master page designing.
Linux Transfer Script
same page href link
how to bridge ethernet ports switch cisco catalyst
Windows 2008 TSE
Separate SSIS server for ETL Tasks