473,396 Members | 1,996 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How pass null to stored proc

How do I pass a null to a stored proc? This doesn't seem to work....

MyCommand.Parameters.AddWithValue("@RecurranceStor age", System.DBNull)
Jun 27 '08 #1
3 796
System.DBNull.Value

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - Expression

"Cirene" <ci****@nowhere.comwrote in message
news:OA**************@TK2MSFTNGP04.phx.gbl...
How do I pass a null to a stored proc? This doesn't seem to work....

MyCommand.Parameters.AddWithValue("@RecurranceStor age", System.DBNull)

Jun 27 '08 #2
Thanks Mark... as usual
"Mark Fitzpatrick" <ma******@fitzme.comwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
System.DBNull.Value

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - Expression

"Cirene" <ci****@nowhere.comwrote in message
news:OA**************@TK2MSFTNGP04.phx.gbl...
>How do I pass a null to a stored proc? This doesn't seem to work....

MyCommand.Parameters.AddWithValue("@RecurranceSto rage", System.DBNull)


Jun 27 '08 #3
You're very welcome!

Mark

"Cirene" <ci****@nowhere.comwrote in message
news:OT**************@TK2MSFTNGP05.phx.gbl...
Thanks Mark... as usual
"Mark Fitzpatrick" <ma******@fitzme.comwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
>System.DBNull.Value

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - Expression

"Cirene" <ci****@nowhere.comwrote in message
news:OA**************@TK2MSFTNGP04.phx.gbl...
>>How do I pass a null to a stored proc? This doesn't seem to work....

MyCommand.Parameters.AddWithValue("@RecurranceSt orage", System.DBNull)


Jun 27 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

110
by: Mr A | last post by:
Hi! I've been thinking about passing parameteras using references instead of pointers in order to emphasize that the parameter must be an object. Exemple: void func(Objec& object); //object...
4
by: Andrew Baker | last post by:
I have the following code that calles a stored proc in SQLServer. When the output parameter @custref is null (System.DBNull) I cant seem to find a test for this and I get an exception. I know I...
4
by: CsharpGuy | last post by:
I took over an web app (C#) were the developer put everything in a has table then called a method to execute a stored procedure, now I'm running into some issues were if I do an update and a NULL...
10
by: syntego | last post by:
I think I have discovered a bug in the handling of null values (vs NULL values) passed as parameters to a stored proc. I have always believed that the database handled NULL and null the same. ...
14
by: krishna1412 | last post by:
Currently i am working in a project of report generation in MS ACCESS. The tables are in sql server 2000. I have to write stored proc in ms access. Illustration: I am having a stored proc...
0
by: JG | last post by:
Hi, I am using Python 2.4 and cx_Oracle. I have a stored proc that takes two arguments. First is an NUMBER, second is a BOOLEAN. How do you call that stored procedure? After properly...
12
by: ArunDhaJ | last post by:
Hi Friends, Is it possible to pass a table as a parameter to a funtion. whos function declaration would look some thing like this.... ALTER FUNCTION TempFunction (@TempTable TABLE, @nPId INT) ...
7
by: belangerg | last post by:
I am trying to pass parameters to a stored proc via the InputParameters on the form. I set up the Proc with a couple of parameters with the LIKE operator (e.g. LIKE @p_File_Type) On the form,...
3
by: bogdan | last post by:
Hi, I have a stored procedure that returns a single value. Example: SELECT @RowCount = COUNT(*) FROM t WHERE RETURN @RowCount I created a data set, table adapter, and adapter's method...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.