twick10
April 3rd, 2003, 08:59 AM
Hi,
I am having a problem storing an Email Address in an SQL database using .net (ASP). I think the problem is in .net.
I run a storred procedure by passing parameters.
Some code:
SqlCommand1.Parameters("@Email").Value = Str(htxtEmail.Value)
SqlCommand1.Parameters("@UserID").Value = CStr(txtUserID.Value)
SqlCommand1.Parameters("@Password").Value = Password1.Value
SqlCommand1.Parameters("@FName").Value = FName.Value
SqlCommand1.Parameters("@LName").Value = LName.Value
SqlCommand1.Parameters("@Zip").Value = Zip.Value SqlCommand1.Parameters("@CountryCode").Value = RTrim(ddlCountry.SelectedItem.Value)
SqlCommand1.ExecuteScalar()
If I enter an Email Address such as tw@as.com I get this error: "Input string was not in a correct format." I think .net is interpetting a small Email address as a number somehow.
I have tried many dtring conversions and changes to Parameter collections but no help.
The Stack Trace is attached in case somebody knows how to interpet it.
Anybody have any ideas????
I am having a problem storing an Email Address in an SQL database using .net (ASP). I think the problem is in .net.
I run a storred procedure by passing parameters.
Some code:
SqlCommand1.Parameters("@Email").Value = Str(htxtEmail.Value)
SqlCommand1.Parameters("@UserID").Value = CStr(txtUserID.Value)
SqlCommand1.Parameters("@Password").Value = Password1.Value
SqlCommand1.Parameters("@FName").Value = FName.Value
SqlCommand1.Parameters("@LName").Value = LName.Value
SqlCommand1.Parameters("@Zip").Value = Zip.Value SqlCommand1.Parameters("@CountryCode").Value = RTrim(ddlCountry.SelectedItem.Value)
SqlCommand1.ExecuteScalar()
If I enter an Email Address such as tw@as.com I get this error: "Input string was not in a correct format." I think .net is interpetting a small Email address as a number somehow.
I have tried many dtring conversions and changes to Parameter collections but no help.
The Stack Trace is attached in case somebody knows how to interpet it.
Anybody have any ideas????