Jump to content
Sign in to follow this  

$adRS.Update issue

Recommended Posts

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.

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"
    $Status_results.text = "No action taken"

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)
    GUICtrlSetData($Status_Results, "No action taken")
    GUICtrlSetState($CustomerIDbox, $GUI_FOCUS)

What can I use to Update $Value with a NULL value?



Edited by Lepton

Share this post

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...