I am trying to commit new data into the various databases and when I keep committing data after a while, it shows me this error:
The commit statment looks like this:
sql "INSERT INTO Bond Values("","HK0000122334","CNH",8447.5357732363,8447.5357732400,0.0000000037,109913,"01Jun15")".
The database reaches 2.09Gb as well. My code looks this:
Sub commit(dbName As String, tableName As String, commitString As String, reportDate As String)
Dim ws As DAO.Workspace
Dim db As DAO.Database
Dim sSQL As String
Dim qdf As QueryDef
sDb = dbName & ".accdb"
Set ws = DBEngine.Workspaces(0)
Set db = ws.OpenDatabase(sDb)
sqlStatementList = Split(commitString, ";")
For Each sqlStatement In sqlStatementList
sqlStatement = Replace(sqlStatement, ")" & vbLf, reportDate)
If InStr(tableName, "EIS") <> 0 Then
sqlStatement = Replace(sqlStatement, "EIS", tableName)
End If
sSQL = sqlStatement
Set qdf = db.CreateQueryDef("", sSQL)
qdf.Execute dbFailOnError
Next sqlStatement
End Sub
What I have tried so far:
1)
Set qdf = Nothing
Set db = Nothing
This did not help. Still the same issue.
2) Tried to delete that particular database and proceeded with committing to the rest of databases but still had the same issue.
Need some guidance on solving this.