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

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



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!
***************************


"Kivak Wolf" wrote:

> 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
>
>
.



Relevant Pages

  • Re: [PHP] 2 Questions.
    ... My question is in the db wrapper, ... SQL then you'll have to parse the given SQL and rewrite it ... ... use generators or sequences or 'auto increment ids' or whatever your DB ... my soul that the guys that built it know the difference between an order ...
    (php.general)
  • Re: Generating SQL
    ... Java reflection is uuuuuugly. ... Some of SQL is easy to wrap and some is ... > wrapper. ... cannot find the documentation for your custom query API, ...
    (comp.object)
  • Re: Invoking .NET dll from SQL Server
    ... > We have an existing ASP application that is supported by SQL 2000. ... > on utilizing a third party COM object for which we'll be writing a ... > stored procedures offered by SQL Server to invoke the wrapper, ... it from SQL Server. ...
    (microsoft.public.sqlserver.programming)
  • Re: [PHP] 2 Questions.
    ... The only small concern I have is the chance that somebody orders ... I have no idea what you mean by 'extra time column' and/or using it to keep ... My second question is I've designed a very simple Postgres database wrapper. ... SQL then you'll have to parse the given SQL and rewrite it ... ...
    (php.general)
  • Re: Computing Averages in MS Excel
    ... > particular wrapper. ... If the underlying engine was incapable of passing missing data toSQL as ... SQL was less than satisfactory in its presentation of the data. ... > theory while I do recall that in practice there was definitely a ...
    (comp.databases.theory)