Brain farts happen to us all ... ;-)
--
Jeff Mason Custom Apps, Inc.
Jeff@c...
-----Original Message-----
From: Jack Dunstan [mailto:jdunstan7@h...]
Sent: Wednesday, July 31, 2002 3:19 PM
To: professional vb
Subject: [pro_vb] RE: Sql Server Syntax for NULL
Thanks - Jeff - I just figure that out - boy that was dumb - hopefully
nobody else well waste their time on this question - sorry.
Jack
----- Original Message -----
From: "Jeff Mason" <jeffm.ma.ultranet@r...>
To: "professional vb" <pro_vb@p...>
Sent: Wednesday, July 31, 2002 3:14 PM
Subject: [pro_vb] RE: Sql Server Syntax for NULL
> Assign the recordset's field value to NULL (no quotes), as:
>
> rsVacRec("Vac_Cert_Expir_Date").Value = Null
> rsVacRec.Update
>
> --
> Jeff Mason Custom Apps, Inc.
> Jeff@c...
>
> -----Original Message-----
> From: Jack Dunstan [mailto:jdunstan7@h...]
> Sent: Wednesday, July 31, 2002 2:51 PM
> To: professional vb
> Subject: [pro_vb] Sql Server Syntax for NULL
>
>
> Hi,
>
> I can do this is Query Analyzer
>
> UPDATE Vaccinations
> set Vac_Cert_Expir_Date = NULL
> where year = 'XXXX' and id = 'XXXXX'
>
> Vac_Cert_Expir_Date is a smalldatetime, allow NULLs
>
>
> But I can't remember/don't know how - to get it to work in my vb code.
I'm
> using an adodb recordset:
>
> none of these work:
> rsVacRec("Vac_Cert_Expir_Date").Value = vbNull or "NULL" or vbNullChar
> rsVacRec.Update
>
> I know the updating working correctly because it works if I do something
> like:
>
> rsVacRec("Vac_Cert_Expir_Date").Value = "07/31/02"
> rsVacRec.Update
>
> Would someone have a minute to "enlighten" me on the correct way to do
this.
>
> Thanks,
> Jack
>
>
>
>
>
> ---
> Visual C# - A Guide for VB6 Developers
> This book will make it easy to transfer your skills
> from Visual Basic 6 to C#, the language of choice
> of the .NET Framework.
> http://www.wrox.com/ACON11.asp?ISBN=1861007175&p2p0059
>
>
>
>
> ---
> Visual C# - A Guide for VB6 Developers
> This book will make it easy to transfer your skills
> from Visual Basic 6 to C#, the language of choice
> of the .NET Framework.
> http://www.wrox.com/ACON11.asp?ISBN=1861007175&p2p0059
>
>
---
Visual C# - A Guide for VB6 Developers
This book will make it easy to transfer your skills
from Visual Basic 6 to C#, the language of choice
of the .NET Framework.
http://www.wrox.com/ACON11.asp?ISBN=1861007175&p2p0059