I am trying to speed up some operations in my database.
I have an Idea I want to test
I want to change the link of a table from one txt file to the next. I can’t seem to figure it out.
I am currently importing the txt file using TextTransfer for each record and deleting it. I think that changing the link will be faster than importing 1000+ records and deleting them each time. Code is as follows. I have named the path with a test name for example. I have this code in a function where it gets the path in order to know what to change the link to.
This is urgent any help is appreciated.
'for example only
varTestFilePathNew = "\\testing\test\er5-s1.txt"
Dim db As DAO.Database
Dim tdf As DAO.TableDef
Set db = DBEngine.Workspaces(0).Databases(0)
Set tdf = db.TableDefs("tblRawDiePassiveLink")
tdf.Connect = ";DATABASE=" & varTestFilePathNew & "; specDieImportPassiveRev1"
MsgBox "" & tdf.SourceTableName & ""
Set db = Nothing
Set tdf = Nothing