I have an old dBase program that I'm trying to rewrite in Access. The problem is, it seems to run faster in dBase than it does in Access. This is the code from Dbase versus the Code from Access. Am I using the most effecient way in Access to do this?
Problem: Read lines from a text file and insert the data into a table.
Replace Name with SubStr(Line->Line, 1,10)
Replace Age with val(SubStr(Line->Line, 11,3)
'This dBase code Adds a blank record. The Replace line takes a section of the current line we read, and places that section into the appropriate field in the table.
Line Input #1, Line
SQL = "Insert into TABLE (Name, Age) values ('" & Mid$(Line, 1, 10) & "'," & Mid$(Line, 11,3) & ")"
Is this the best way to do this in Access? Or is there a quicker way to insert data into the table.
Thanks for any help.
If a more efficient way can be provided, I will increase the value of this question.