Jump to content

Recommended Posts

Posted

hi,all.

I use  MSSQL.au3 to populate my MS SQL database

the _MSSQL_Con, _MSSQL_AddRecord and _MSSQL_GetRecord functions are all works well, but when I work with _MSSQL_DeleteRecord and _MSSQL_UpdateRecord to update and delete SQL table items I encountered a problem.

According to their syntax explain, I wrote the wrong Parameter of $Condition, for example of _MSSQL_UpdateRecord Syntax

_MSSQL_UpdateRecord($oConnectionObj, $sTable, $sColumn , $sValue, $condition = "")

_MSSQL_UpdateRecord($oConnectionObj, $sTable, $sColumn , $sValue, are easy to know, but $condition default is all, ie, update all column values, but I need to specify only one row.

I tried to key in _MSSQL_UpdateRecord($oConnectionObj, "TestTable", "TestColume" , "100" , 1

or 

_MSSQL_UpdateRecord($oConnectionObj, "TestTable", "TestColume" , "100" , "1"

or

_MSSQL_UpdateRecord($oConnectionObj, "TestTable", "TestColume" , "100" , "id=1")

are all fail.

what is the $Condition Syntax ?

thank you 

Posted (edited)

You should really start using ADO.au3 udf.

Edited by mLipok

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...