Solved

How To send NULL value to database

Posted on 2008-06-18
2
242 Views
Last Modified: 2010-04-21
I have a stored procedure with parameters , I want to send values from VB 2008 like this

            Dim MyToStoreID As New SqlParameter("ToStoreID", Null) ' as defuat no transfer
            If ToStoreComboBox.Visible Then
                MyToStoreID.ParameterName = "ToStoreID"
                MyStoreID.Value = ToStoreComboBox.SelectedValue
            End If

How can I send a null value . ' My Table field Accept null value
0
Comment
Question by:Ahmadal_najjar2003
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
ID: 21819397
DBNull.Value should work out:


Dim MyToStoreID As New SqlParameter("ToStoreID", DBNull.Value) 

Open in new window

0
 

Author Closing Comment

by:Ahmadal_najjar2003
ID: 31468670
Yes Really I works out.

Thank a lot .

Ahmad Al-najjar
0

Featured Post

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

707 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