shlvy Posted August 20, 2004 Posted August 20, 2004 Hi I try to convert my code from access to SQL, the origin code is: dim objCmd as new OleDbCommand _ ("SELECT * FROM tblUsers WHERE UserName ='" + Server.HtmlEncode(Request.Cookies("dan").Value) + "'", Conn) When i tried to write the next code: dim objCmd as new SQLConnection _ .. I got the next error: Overload resolution failed because no accessible 'New' accepts this number of arguments. Why is that? Thank's. Quote
Administrators PlausiblyDamp Posted August 20, 2004 Administrators Posted August 20, 2004 The first bit you are using a command, the second bit you are using a Connection - you probably meant to use a SQLCommand object. 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.