|
Thread: MDB
-
Jan 10th, 2001, 06:49 AM
#1
Thread Starter
Addicted Member
Hi,
I try this Q in Database Devalopment But there was no answers! so i think i will give it shot here.
What is the Fast way to build a MDB Database and Table + insert a large amount of text-record to one of the table.
Regards
-
Jan 10th, 2001, 07:02 AM
#2
Fanatic Member
When you say build database, I assume you mean from scratch? Well if done through coding then it's a big job.
Why not create an empty database, with the tables, indexes etc already set up, then use the CompactDatabase method to create a duplicate:
Add a reference to the 'Microsoft DAO 3.6 Object Library', then use:
Code:
DBEngine.CompactDatabase(strTemplateDb, strDestinationDb.Text, dbLangGeneral, dbVersion40)
Now create a connection to the new database and do an INSERT SQL statement with your data
If the data is in another database then use the following:
Code:
strSQL = "SELECT [" & strTable & "].* " & _
"INTO [" & strTable & "] " & _
"IN '" & strDestinationDb & "' " & _
"FROM [" & strTable & "]"
dbSource.Execute strSQL
Loads more ways, but you will have to be more specific!

-
Jan 10th, 2001, 07:33 AM
#3
Thread Starter
Addicted Member
Hi,
Well i have a huge TEXT file that i want to migrate to a DataBase. I want the ability to search the Db for a Key, the first 15 bytes of evry record is a unique number in the TEXT file.
Thanks for the quick reply and regards
-
Jan 10th, 2001, 07:49 AM
#4
Fanatic Member
If the text file is delimited into fields already, create a new database in access and select 'Import Table' from the 'New Table' command. Select 'Text Files' from the file type list and follow the wizard to create the table.
When complete, you will have to check the data and do any clean up work with the field names attributes etc.
Good luck
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|