Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trying to use sp_revokedbaccess to delete a user from VB generates an

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi, I am using VB as a front end to SQL server. I am trying to capture a user name from a text box in VB and then pass the variable to a dynamic SQL command to revoke an existing users db acess. I get an error that is as follows..
"Application is using arguments of wrong type, are out of acceptable range, or are in conflict with one another."
I have used other SQL stored procedures from VB and they work but this one does not. The follwing is the code fragment.
Constring = "Provider=SQLOLEDB;SERVER=CC;DATABASE=School1;UID=" & User$ & ";PWD=" & Pwd$
adoCon.Open Constring
revloginname$ = "EXEC sp_revokedbaccess '" & revokelogin$ & "' "
revokeset.Open adoCon, revloginname$ , adOpenStatic

Can anyone help please? Thanks--jay.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top