Solved

ASP.net table adapter parameter query

Posted on 2011-02-21
4
814 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
Comment Utility
SqlDbValue.Null?
0
 
LVL 39

Expert Comment

by:Pratima Pharande
Comment Utility
Use System.DBNull.Value
0
 
LVL 39

Assisted Solution

by:Pratima Pharande
Pratima Pharande earned 250 total points
Comment Utility
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
Comment Utility
Thanks very much
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Hi all, It is important and often overlooked to understand “Database properties”. Often we see questions about "log files" or "where is the database" and one of the easiest ways to get general information about your database is to use “Database p…
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

728 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now