Solved

Null

Posted on 2006-07-17
4
235 Views
Last Modified: 2010-04-16
How can i pass the Null value from the c# code to the StroredProcedure?.
0
Comment
Question by:Rahamathulla_J
4 Comments
 
LVL 52

Expert Comment

by:Carl Tawn
ID: 17120615
DbNull.Value;
0
 
LVL 10

Accepted Solution

by:
SystemExpert earned 125 total points
ID: 17121243
Hi,

if (hshSearchCriteria[UserID] != null)
{
      string UserID = hshSearchCriteria[UserID].ToString();
      dbCommandWrapper.AddInParameter("UserID",DbType.String, UserID);

}
else
{
      dbCommandWrapper.AddInParameter("UserID",DbType.String, DBNull.Value);
}

Thanks
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question