Lepton Posted June 18, 2010 Posted June 18, 2010 (edited) I am trying to do the following in AutoIT.. Note: This is the current code that I am using in KiXtart/KiXForms and works fine with adding a NULL Value in to a SQL database. $rs.Open($cmd) If Not $rs.EOF ReDim $var $rs.fields.item("Value").value = $var $ID.text = $rs.fields.item("CustomerNumber").value $Status_results.text = $rs.fields.item("Value").value $CustomerIDbox.Text = "Process is complete" Else $Status_results.text = "No action taken" EndIf $rs.update $rs.close I can do it with $Var = "", but does not really set a NULL in the SQL Database. Converting this over to AutoIT, we get: If Not $adoRs.EOF Then ;$var = Chr(0) ;$adoRs.fields.item("Value").value = $var ;SQL UPDATE is used in the interim until sort out how to do the recordset.update $cmdtxt = "UPDATE SomeTable SET [Value] = NULL where Number = '" & $Number & "'" $adoRs = $adoCon.Execute($CMDtxt) GUICtrlSetData($ID, $number) ;GUICtrlSetData($Status_Results, $adoRs.fields.item("Value").value) GUICtrlSetData($Status_Results, "Process is complete") GUICtrlSetState($CustomerIDbox, $GUI_FOCUS) ;$adoRs.update Else GUICtrlSetData($Status_Results, "No action taken") GUICtrlSetState($CustomerIDbox, $GUI_FOCUS) EndIf ;$adoRs.close $adoCon.Close() Else.... What can I use to Update $Value with a NULL value? Thanks, Kent Edited June 18, 2010 by Lepton
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now