Sign in to follow this  
Followers 0
miguelsanchez

Execute in Oracle

6 posts in this topic

Hi all!!

How to execute in Oracle INSERTs or UPTATEs?

Thanks, Miguel.

Share this post


Link to post
Share on other sites

$sql = "update prestamo set prestamo.centro = '" & $id_centro_destino & "' where prestamo.id_agenda = '" & $id_agenda & "'"
_update($sql)

Func _update($sql)
    $adors = ObjCreate( "ADODB.RecordSet" )
    With $adors
        .ActiveConnection = $ado
        .Execute = $sql
        .Open
    EndWith
    $adors.Close
    Return
EndFunc

Error???

>Running:(3.2.9.0):C:\Archivos de programa\AutoIt3\beta\autoit3.exe "C:\Scripts\Cambiar de Centro una Agenda\Cambiar Centro - Agenda.au3"   
C:\Scripts\Cambiar de Centro una Agenda\Cambiar Centro - Agenda.au3 (230) : ==> The requested action with this object has failed.: 
.Execute = $sql 
.Execute = $sql^ ERROR
->AutoIT3.exe ended.rc:1
>Exit code: 1   Time: 13.002

Share this post


Link to post
Share on other sites

$sql = "update prestamo set prestamo.centro = '" & $id_centro_destino & "' where prestamo.id_agenda = '" & $id_agenda & "'"
_update($sql)

Func _update($sql)
    $adors = ObjCreate( "ADODB.RecordSet" )
    With $adors
        .ActiveConnection = $ado
        .Execute( RecordsAffected, Parameters, Options )
        .Open
    EndWith
    $adors.Close
    Return
EndFunc

\\

Share this post


Link to post
Share on other sites

.Execute( RecordsAffected, Parameters, Options )

Any example please??

Share this post


Link to post
Share on other sites

@

Parameters and Option are these for example

Global Const $adOpenDynamic = 2
Global Const $adOpenStatic = 3
Global Const $adLockReadOnly =1
Global Const $adLockPessimistic = 2
Global Const $adLockOptimistic = 3
Global Const $adLockBatchOptimistic = 4
Global Const $adUseClient = 3
Global Const $adSchemaTables = 20oÝ÷ Ù8b²+!£­³)ík!¢é]m殶­sdgVæ2öFõWFFU&V6÷&Bb33c¶EF&ÆRÂb33c¶D6öÂÂb33c¶EVW'Âb33c¶F46öÂÂb33c¶DFF b33c¶EVW'Ò6"3fײb33c¶EVW'fײ6"3  b4ö&¢b33c¶ôDòÒFVâ&WGW&â6WDW'&÷" b33c¶õ&V2ÒöFô÷Vå&V6÷&G6WB´ö&¤7&VFRgV÷C´DôD"å&V6÷&G6WBgV÷C² b4ö&¢b33c¶õ&V2ÒFVâ&WGW&â6WDW'&÷""  b33c¶õ&V2ä7W'6÷$Æö6FöâÒb33c¶EW6T6ÆVç@ b33c¶õ&V2ä÷VâgV÷CµUDDRgV÷C²fײb33c¶EF&ÆRfײgV÷C²4UBgV÷C²fײb33c¶EF&ÆRfײgV÷C²å²gV÷C²fײb33c¶F46öÂfײgV÷CµÒÒb33²gV÷C²fײb33c¶DFFfײgV÷C²b33²tU$RgV÷C²fײb33c¶EF&ÆRfײgV÷C²å²gV÷C²fײb33c¶D6öÂfײgV÷CµÒÒgV÷C²fײb33c¶EVW'fײgV÷C²gV÷C²Âb33c¶ôDòÂb33c¶D÷Vå7FF2Âb33c¶DÆö6´÷FÖ7F2  bW'&÷"ÒFVà VÇ6P &WGW&â6WDW'&÷"2Ãà VæD`¤VæDgVæ2²fÇC³ÓÓÒfwC²öFõWFFU&V6÷&B

regards,

ptrex

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  
Followers 0