Solved

ASP.net table adapter parameter query

Posted on 2011-02-21
4
818 Views
Last Modified: 2012-06-22
Hi

In ASP.net 4 I have a table adapter with a parameter query. How do I pass a NULL value
into a parameter query?
0
Comment
Question by:murbro
  • 2
4 Comments
 
LVL 20

Accepted Solution

by:
informaniac earned 250 total points
ID: 34949038
SqlDbValue.Null?
0
 
LVL 39

Expert Comment

by:Pratima Pharande
ID: 34949039
Use System.DBNull.Value
0
 
LVL 39

Assisted Solution

by:Pratima Pharande
Pratima Pharande earned 250 total points
ID: 34949040
dim Parameter as SqlParameter
for each Parameter in comm.Parameters
      if Parameter.Value is null then
            Parameter.Value = DBNull.Value
      end if
next
0
 

Author Closing Comment

by:murbro
ID: 34949082
Thanks very much
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used.

792 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