![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Help with Null please How can I pass a Null value to an update script. Here is what I am currently using. However, instead of filling in 01/01/1900 I want the value in the field to be blank. Sub DoUpdateAccession if strADate = "" then strADate = 01/01/1900 Else strADate = strADate End if Set rsUpdateAccession = server.createobject("adodb.recordset") conn.webqry_UpdateAccession strADate End Sub |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Help with Null please RICK wrote: Quote: > How can I pass a Null value to an update script. > hi Rick, As best I recall, an UNINITIALIZED vbs variable will return a null, if tested. Your "" value refers an empty STRING (not a null). To test for null, you can use the IsNull function, or you can use VarType and test for vbNull. cheers, jw ____________________________________________________________ You got questions? WE GOT ANSWERS!!! ..(but, no guarantee the answers will be applicable to the questions) |
My System Specs![]() |
| | #3 (permalink) |
| | Re: Help with Null please "RICK" <RICK@xxxxxx> wrote in message news:CCD68295-DBA6-48DA-84C8-C4EA3B5A3E7B@xxxxxx Quote: > How can I pass a Null value to an update script. Here is what I am > currently > using. However, instead of filling in 01/01/1900 I want the value in the > field to be blank. > > Sub DoUpdateAccession > > if strADate = "" then > strADate = 01/01/1900 > Else strADate = strADate > End if > > Set rsUpdateAccession = server.createobject("adodb.recordset") > conn.webqry_UpdateAccession strADate > > End Sub > > > > generally you cannot simply assign a blank string. With AD objects you must use the PutEx method and pass the ADS_PROPERTY_CLEAR constant (which has a value of 1) to it. This clears the attribute. For example see this link: http://www.microsoft.com/technet/scr.../usmdvb06.mspx I don't know what you are updating, but I suspect a similar limitation applies. -- Richard Mueller MVP Directory Services Hilltop Lab - http://www.rlmueller.net -- |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| [string]$a = $null; $a -eq $null; $a -eq "" | PowerShell | |||
| why is $_.Name null for this? | PowerShell | |||
| Why is this null? | PowerShell | |||
| Re: "Error: 'null' is null or not an object" when trying to view video | Vista performance & maintenance | |||
| Gotcha: $null to [string] IS NOT $null | PowerShell | |||