S
Souris
Dim ws As DAO.Workspace
Dim db As DAO.Database
Set ws = DBEngine(0)
Set db = ws(0)
strSQLString = "Insert into mytable ..."
db.Execute strSQLString, dbFailOnError
call UpdateMyLog(1)
Set db = Nothing
Set ws = Nothing
I use above code to update my database.
The UpdateMylog sub uses same format using dbEngine(0) to update my log.
My log table gets update. but it happens that the data are incorrect
sometimes.
I use Msgbox to check SQL string the value are OK, but for some records do
not insert right value.
It seems the data does not insert to right place.
My question is may use dbEnging in called sub when calling sub has an
opening dbEngine?
Is it posible that the Access insert and get value from different database?
It is really strange behavior for the database, because the SQL string is
correct and the table get inserted.
Your help is great appreciated,
Dim db As DAO.Database
Set ws = DBEngine(0)
Set db = ws(0)
strSQLString = "Insert into mytable ..."
db.Execute strSQLString, dbFailOnError
call UpdateMyLog(1)
Set db = Nothing
Set ws = Nothing
I use above code to update my database.
The UpdateMylog sub uses same format using dbEngine(0) to update my log.
My log table gets update. but it happens that the data are incorrect
sometimes.
I use Msgbox to check SQL string the value are OK, but for some records do
not insert right value.
It seems the data does not insert to right place.
My question is may use dbEnging in called sub when calling sub has an
opening dbEngine?
Is it posible that the Access insert and get value from different database?
It is really strange behavior for the database, because the SQL string is
correct and the table get inserted.
Your help is great appreciated,