Hello, I am currently testing my small SQL database application. The database is stored on the server on a local PC. The client application can run on local PC or there can be several clients on remote computers. I´ve put a timer in my client app to ensure refreshing of data every 20 seconds. It works fine except for this case: for example there are 2 clients running on different PC´s. Both clients see the same records. When 1 client adds a record the second client can see it when it refreshes. But when I delete a record, the other client still holds the original data even after refresh. I use this code to refresh (re-read) data:
Conn.Open()
MyAdapter=New SQLDataAdapter("SELECT * FROM MyTable", Conn)
MyAdapter.Fill(DS, "MyTable")
Conn.Close()
DS is the dataset. It has the same structure as the database. Conn is the SQLConnection. How to go around this problem?
Thanks
Conn.Open()
MyAdapter=New SQLDataAdapter("SELECT * FROM MyTable", Conn)
MyAdapter.Fill(DS, "MyTable")
Conn.Close()
DS is the dataset. It has the same structure as the database. Conn is the SQLConnection. How to go around this problem?
Thanks