Solved

ASP.net table adapter parameter query

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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

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…
How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

688 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