dbEngine

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,
 
S

Souris

Thanks for helping,
I tried to insert a value bigger than 256 in to a byte field, but Access
does not complain.

Thanks again,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top