B
Bryan
i have created a form to submit data to an sql database, and it seems to
work, except for one glitch. one of the fields, the "creditcardnumbertxt"
text box, when entering a number with more that 7 characters, does not work.
sql says it will be truncated. in the asp code, the database, and the sql
procedure, the field is correctly set to allow a (sql datablase) char type
of 18 characters in size.
here is the error it spits back
----------------------------------
String or binary data would be truncated.The statement has been
terminated..Net SqlClient Data Provider
-----------------------------------
in the code behind the page, these are the relevant lines:
------------------------------------
cmd.Parameters.Add(New SqlParameter("@credit_card_nbr", SqlDbType.Char, 18))
cmd.Parameters.Item("@credit_card_nbr").Value = RegCreditcardnumberTXT.Text
-----------------------------------
the relevant lines in the procedure in the sql server is
-----------------------------------
@credit_card_nbr char(18),
------------------------------------
any help would be great
thanks for the help
bryan
work, except for one glitch. one of the fields, the "creditcardnumbertxt"
text box, when entering a number with more that 7 characters, does not work.
sql says it will be truncated. in the asp code, the database, and the sql
procedure, the field is correctly set to allow a (sql datablase) char type
of 18 characters in size.
here is the error it spits back
----------------------------------
String or binary data would be truncated.The statement has been
terminated..Net SqlClient Data Provider
-----------------------------------
in the code behind the page, these are the relevant lines:
------------------------------------
cmd.Parameters.Add(New SqlParameter("@credit_card_nbr", SqlDbType.Char, 18))
cmd.Parameters.Item("@credit_card_nbr").Value = RegCreditcardnumberTXT.Text
-----------------------------------
the relevant lines in the procedure in the sql server is
-----------------------------------
@credit_card_nbr char(18),
------------------------------------
any help would be great
thanks for the help
bryan