andyeastes
Registered User.
- Local time
- Today, 08:33
- Joined
- Dec 29, 2010
- Messages
- 31
Hello,
I am calling a stored procedure with the code below. When i log in as my user it works great. Any other user and I get an error the execute line of the code below. I am calling @user a few times in the stored procedure but it does not make sense why any other user would make a difference? Any ideas?
Dim myDB As Database, MyQ As QueryDef
Set myDB = CurrentDb()
Set MyQ = myDB.CreateQueryDef("")
MyQ.Connect = "ODBC;DRIVER=SQL Server Native Client 10.0;SERVER=********;UID=invSystem;PWD=*******8;DATABASE=InventorySystem;"
MyQ.ReturnsRecords = False
MyQ.SQL = "sp_PullToShip" & " " & "@user=" & User
MyQ.Execute
MyQ.Close
myDB.Close
I am calling a stored procedure with the code below. When i log in as my user it works great. Any other user and I get an error the execute line of the code below. I am calling @user a few times in the stored procedure but it does not make sense why any other user would make a difference? Any ideas?
Dim myDB As Database, MyQ As QueryDef
Set myDB = CurrentDb()
Set MyQ = myDB.CreateQueryDef("")
MyQ.Connect = "ODBC;DRIVER=SQL Server Native Client 10.0;SERVER=********;UID=invSystem;PWD=*******8;DATABASE=InventorySystem;"
MyQ.ReturnsRecords = False
MyQ.SQL = "sp_PullToShip" & " " & "@user=" & User
MyQ.Execute
MyQ.Close
myDB.Close