trend Posted July 13, 2005 Posted July 13, 2005 Dim MyCommand As New OleDbCommand(("exec Write_Logins '" & Date.Now.Date & "','" & Date.Now.ToLongTimeString & "','" & UsernameTry & "','" & PasswordTry & "', '" & TheirIP & "','" & Payload & "'"), MyConnection) I get this error: Failed to log attempt to db:Could not find stored procedure 'Write_Logins'., Database Closed I know Write_Login is there.. becuase i can run this query from Query Analyzer: exec Write_Logins '1','1','1','1','1','1' and that works.. the Myconnection string worked when I didn't use stored procedures. any ideas? Quote
trend Posted July 13, 2005 Author Posted July 13, 2005 Dim MyCommand As New OleDbCommand(("exec Write_Logins '1','1','1','1','1','1'"), MyConnection) does it too... Quote
trend Posted July 13, 2005 Author Posted July 13, 2005 Easy one.. sorta. It just delt with SP and permissions.. So I just added the user to db admin, had him login and create the 2 SP.. and then go on the way. But, my question is.. I tried changing permissions of the SP (I know i did..) and my user was even db admin, but I still couldn't execute the SP. How can I get this working? thanks Lee Quote
Administrators PlausiblyDamp Posted July 13, 2005 Administrators Posted July 13, 2005 What database are you using? Also if you are going to the trouble of using stored procs you really should look at using parameter objects rather than string concatenation to execute them. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
trend Posted July 13, 2005 Author Posted July 13, 2005 hah.. sorry left that out.. MS SQL 2000 On win2k3 (..well that is my test environment.. the real server is win2k) Quote
Administrators PlausiblyDamp Posted July 13, 2005 Administrators Posted July 13, 2005 If you are using SQL you might be better off using the classes from System.Data.SqlClient rather than the OleDb ones. Also under SQL object name resolution will vary depending on who owns / created it. e.g. if it was created by a user called trend then it would need to be called like trend.Write_Logins - this is one reason most objects are created with dbo as the owner. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.