how can i save a null value from web control to an integer field in the data base

  • Thread starter Thread starter casper_992
  • Start date Start date
C

casper_992

i've a data base that has an integer field ,and i wanna save null value
to that field, but it gives me an error "Input string was not in a
correct format. " when i click a button to save.
 
i've a data base that has an integer field ,and i wanna save null value
to that field, but it gives me an error "Input string was not in a
correct format. " when i click a button to save.

try passing null instead of an empty string.

if(string == string.Empty())
parm.value = null;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top