Re: How to convert NULL value to a empty string?

From: Brian Bushay TeamB (BBushay_at_Nmpls.com)
Date: 01/21/04


Date: Tue, 20 Jan 2004 20:42:05 -0600


>Hello forum,
>i like to excecute the following "insert into" statement to a Access
>Database via ADO.
>
> tmpSQL := 'INSERT INTO Tab1 ( PosSorteID, AuftragID, Storage ) '+
> 'SELECT ID, AuftragID, '+
>==> 'Field1+" "+Code'+
> 'FROM Tab2 WHERE ID = '+varID;
> CommandText := tmpSQL;
> Execute;
>
>Because the Field "Code" sometimes has no data (IS NULL)
>i get no result value for the field "storage" at some records.

If code is a Tfield use the AsString method
AdoDataset1.fieldbyName('code').asString

--
Brian Bushay (TeamB)
Bbushay@NMPLS.com


Relevant Pages

  • Re: how to show that there is a detail record
    ... Brian Bushay TeamB wrote: ... Yes, I want to show it in the same grid, but only something like a bool field that there is a detail dataset available or not. ...
    (borland.public.delphi.database.ado)
  • Re: Problems with Bookmark
    ... Something is very strange here. ... the table and not from the record I click in the DBGrid?? ... Brian Bushay (TeamB) ...
    (borland.public.delphi.database.ado)
  • Re: MaxRecords
    ... >> I tested this using the Northwind database and Employees table ... >> MaxRecords I had no problem getting MaxRecords to work. ... >> Brian Bushay (TeamB) ...
    (borland.public.delphi.database.ado)
  • Re: Pb while closing ADO query
    ... > Search your hard drive and see if you can find multiple copies of this ... > Brian Bushay (TeamB) ... Prev by Date: ...
    (borland.public.delphi.database.ado)
  • Re: Field width
    ... In SQL server the following code will populate AdoDataset1 with the field ... Brian Bushay (TeamB) ...
    (borland.public.delphi.database.ado)