G
Guest
Declan
Create a parallel workspace and open the current database
in it.
Set Owner_Ws = DBEngine.CreateWorkspace _
("WS100", "MyID", "MyPWD", dbUseJet)
Set Owner_Db = CurrentDb
Set is_Db = Owner_Ws.OpenDatabase(Owner_Db.Name)
Have a query already defined, eg qryMyQuery
Create your new SQL string in code, then overwrite the
queries SQL string and execute in your own workspace
is_db.QueryDefs.qryMyQuery.SQL = "SELECT ....."
As you created the original query. you own it. Therefore
you can run it.
program doesn't have permissions to update? Can I supply
my user name and password in code in order to run the SQL
statement?
Create a parallel workspace and open the current database
in it.
Set Owner_Ws = DBEngine.CreateWorkspace _
("WS100", "MyID", "MyPWD", dbUseJet)
Set Owner_Db = CurrentDb
Set is_Db = Owner_Ws.OpenDatabase(Owner_Db.Name)
Have a query already defined, eg qryMyQuery
Create your new SQL string in code, then overwrite the
queries SQL string and execute in your own workspace
is_db.QueryDefs.qryMyQuery.SQL = "SELECT ....."
As you created the original query. you own it. Therefore
you can run it.
updates records in a table that the user of the database-----Original Message-----
What code can I write that will run an SQL statement that
program doesn't have permissions to update? Can I supply
my user name and password in code in order to run the SQL
statement?