Verify new Entry

Graogramar
01-08-2004, 04:41 PM
Hi Folks.

I wrote a program which is connected to a access database. It runs in a network-enviroment. Sometimes, when one of the users uses the program to add data to the db, the data is not there, so we have to add the data again. Is there any way to verify within vb after a SQL-add or change, if the data is really in the database?

thank you.

Shurik12
01-08-2004, 05:14 PM
Hi,

> Is there any way to verify within vb after a SQL-add or change, if the data is really in the database?

After you added some data to a table in the database, open a recordset which should return somerows if the data is there ( cfr. 'Where' clause):

rs.Open "Select * From Table1 Where Field='bla'", Conn,....

and check whether it's empty

If rs.EOF And rs.BOF Then
MsgBox "Nothing has been added"
End If


Regards,
Shurik.

vbFace
01-08-2004, 07:33 PM
Sounds like multiple users are using this DB at once. Here is a perfect opportunity to convince management to get a real DB like SQL Server 2000 :)

Seriously, Access can have issues when multiple people connect to it sometimes. It definitely is not designed for commercial, multi-user applications.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum