How do you refresh a database connection within a VB application to SQL Server 2005 so that whenever data is changed in SQL, such changes are picked up by the application? For now the application only picks up the changes after it has been restarted, and that is not what I want.
It's probably not the connection that needs to be refreshed. You might have something in your code that is querying data once at app startup, and never queries the data again. Can you post your code and what you're trying to do?
You don't need to "refresh" a database connection. If your application is only picking up changes after it restarts, then there is something wrong with your transaction handling.
You are probably not commiting your chanes to the database. either that or not running the query again.
I would start by looking for the command setting the Isolation Level of the transactions
e.g. "*SET TRANSACTION ISOLATION LEVEL ...*"
This is either set in the code or defaulting from the DB. Identify which isolation level the app is running at and whether this is appropriate.
Either Google the command or look in SQL Server Books Online for more details.