Search the Community
Showing results for tags 'insert or update'.
-
autoit firebird odbc insert or Update
GarnetDagger posted a topic in AutoIt General Help and Support
I would love to have some help or guidance I am able to Query from my database but I am not able to Update or insert etc because I lack the knowledge for it this is my code for to retrieve some data from and works perfect Dim $ueberschriften = "" Dim $anzahl = 0 Dim $dsncount = 1 Global $DSN = "MTXXV5" Global $Query = "Select * from VIEWS" Func SSSQL($SSQuery) ;SuperSonicSQL ConsoleWrite($SSQuery & @LF) $cmboVal = "" $adoCon = ObjCreate("ADODB.Connection") $adoCon.Open($DSN) $adoRs = ObjCreate("ADODB.Recordset") $adoSQL = $SSQuery $adoRs.CursorType = 2 $adoRs.LockType = 3 $adoRs.Open($adoSQL, $adoCon) With $adoRs Global $QueryAnswer = .GetRows EndWith Return $QueryAnswer EndFunc ;==>SSSQL and this is my failed attempt, The Query is correct but I want to able to use it in autoit instead of have to manual update or insert into flamerobin $SS_SQL_Insert_or_Update = "INSERT INTO DETECTION (DNAME,DTYPE,WINNAME,AREA,COLOR,MOUSE) VALUES ('PopUpTradeInviteYes s ','SEARCH','XXX','175,240,550,240,65,228,82,234','5062478','0') " Func SSSQLIU($SS_SQL_Insert_or_Update) ;SuperSonicSQL :P $cmboVal = "" $adoCon = ObjCreate("ADODB.Connection") $adoCon.Open($DSN) $adoRs = ObjCreate("ADODB.Record") $adoSQL =$SS_SQL_Insert_or_Update ;~ $adoRs.CursorType = 2 $adoRs.LockType = 4 $adoRs.Open($adoSQL, $adoCon) ;~ With $adoRs ;~ Global $QueryAnswer = .GetRows ;~ EndWith ;~ Return $QueryAnswer EndFunc ;==>SSSQL I am at a total loss and I am just trying this at random but I am also going to sleep now I would love to have some minor examples "C:\_CC_V10_DetectionTAB.au3" (174) : ==> The requested action with this object has failed.: $adoRs.Open($adoSQL, $adoCon) $adoRs^ ERROR