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
Problem with SOAP application on IIS "502 - Web server received an invalid response while acting as a gateway or proxy server"
how to create a count that starts at 001?
Excel Format Text Box
Access MDB file mysteriously huge
Generate cell names automatically
Custom Webresponse
basic question about binomials
SQL Backups Duplicating
I can't get past the "Reporting Services Login" when attempting to depoy a report to my report server
SQL Syntax for SELECT TOP 25 PERCENT, SELECT NEXT 35%, SELECT NEXT 15%, etc...