VB.NET Null to SQL Null (ASP.NET 2.0 GridView)

K

Kivak Wolf

Hey,

I have everything working now except for this. I have some fields that
I am getting data from, then I am sending them to a SQL database. Now
the empty string and VB.NET null are different than the SQL Null (type:
"System.DBNull"). So, i need some way of cenverting the values into a
"System.DBNull" object and then send them to the database. Any ideas?

BTW: The parameter called: "ConvertEmptyStringToNull" does not work.
Microsoft said there is a bug and it will be fixed for the release
date.

Thanks,
Kivak Wolf
 
G

Guest

One option is to create your own wrapper and have it take the VB Null and
make it a SQL null. This will allow you to switch to
ConvertEmptyStringToNull() when it is fixed without having a major
application rewrite (change in your wrapper method only).

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
 
K

Kivak Wolf

I understand that is what I have to do. It is just a matter of
implementing it. I have no idea how to do it because I don't know how
to access the data members in the GridView.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top