Showing posts with label breaks. Show all posts
Showing posts with label breaks. Show all posts

Tuesday, February 14, 2012

Character is not valid error

Here's my code:
Dim Cmd as New SQLCommand(sqlString, conn)
cmd.CommandType=CommandType.StoredProcedure
Breaks Here -->>cmd.parameters.add(New SQLParameter(@.OrdAlias, OrdNum))
cmd.parameters.add(New SQLParameter(@.AliasSourceCode, 4))
The error says:
compilation error - -
then, on the line that is in red:
Compiler Error Message:BC30037: Character is not valid.
I have 'OrdNum' declared globally, and OrdNum is assigned right away in the Page_Load event. I've checked the spelling of the SQL parameters (OrdAlias is a varchar, and AliasSourceCode is a tinyInt)
After all this - then, this code runs
Any ideas why I'm getting this error??

Try surrounding your'@.OrdAlias' and the other one, with double quotes