Technology & Fun
Programming | Computer | Tutorial | Mobile | Gaming | Fixing Errors | Yoga | Kitchen
Inserting null values into database from TextBox using StoredProcedure:
1. First you have to allow null to your column what you have created in table
2. Allow null to that column too in stored procedure parameter like this:
create procedure sp_PassNullValueInSp
(@id varhcra(10), @name varchar(10)= null)
3.c# code
if(txtMobileNumber.Text!="")
cmd.Parameters.Add("@name",SqlDbType.BigInt).Value
= txtname.Text);
Please visit to our YouTube Channel for .net and other tech tutorial Thanks
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment