Question

Good Morning!

I'm working on a VB6 project which reads/writes to its database via an ODBC data source stored in the system. What I'm hoping to accomplish, is to temporarily set the ODBC connection to "Read Only" so that I can see what SQL the system would generate in particular scenario without it actually writing the change to the database. The application already takes care of logging all SQL queries. Is there a way to set the system ODBC connection to "Read Only" (within the "ODBC Data Source Administrator") immediately before I perform the action I care about within the system?

I appreciate any insight!

Was it helpful?

Solution

There is no connection parameter you can set to make the session read only. Your best bet is to either use a different user ID (that has only SELECT authority), although it would seem that this might cause your app to fail when it gets errors trying to perform inserts, updates and/or deletes.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top