dear all,
I'm working in some telecommunication company.
one of my routine task is to fetch data from nodes.
we have 17 nodes and each nodes have log files (xml format).
those files then parsed into .mdb files as the result.
so, here we have 17 .mdb files per day.
I need to accumulate all those files into one new database, which will then be updated daily.
and I have definitely found VBA code that I need to solve this issue as below:
Code:
Sub ImportDatabases()
Const c_Path As String = "G:\PATH\"
Const c_SQL As String = "INSERT INTO attCombiAttach_ROP_RAW " & _
"SELECT * FROM attCombiAttach_ROP_RAW IN '@N';"
Dim strDbName As String
Dim strSQL As String
strDbName = Dir(c_Path & "*.mdb")
Do Until Len(strDbName) = 0
strDbName = c_Path & strDbName
strSQL = Replace(c_SQL, "@N", strDbName)
CurrentDb.Execute strSQL, dbFailOnError
strDbName = Dir
Loop
End Sub
this code is really works as my needs.
so, many thanks to you guys for your advice and share here.