Solved

ASP.net table adapter parameter query

Posted on 2011-02-21
4
819 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
[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
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

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
asp.net mvc 2 35
How to keep a record with the highest value 3 44
Applying Roles in Common Scenarios 3 22
T-SQL: How to extract records into a new table 7 24
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…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

730 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