|
-
Mar 9th, 2006, 09:54 AM
#1
Thread Starter
Frenzied Member
[RESOLVED] @-quoting
In a system we're developing admin users can add users to the system. So i would add a user such as "Domain\fishcake" and then check to see if that user already exists.
However the value of txtAccount.text = @"Domain\fishcake" and when passed in as a parameter to a stored procedure to check if it's a duplicate it returns false even if "Domain\fishcake" is in there.
How can i get around this?
-
Mar 9th, 2006, 09:56 AM
#2
Re: @-quoting
If the stored procedure is doing all the work, then I think we would need to see what is happening there.
-
Mar 9th, 2006, 10:09 AM
#3
Re: @-quoting
\ -- is an escape character in C#. You would need to prefix any string that needs \ with an @ sign.
So when you pass it to a stored procedure you should be prefix it with @ there also.
Can you post the code how you are calling the stored procedure and how you are adding the parameter.
Use [code] source code here[/code] tags when you post source code.
My Articles
-
Mar 9th, 2006, 10:18 AM
#4
Thread Starter
Frenzied Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|