Sign in to follow this  
Followers 0
jokke

Com obj. ADODB connection.

2 posts in this topic

#1 ·  Posted (edited)

Hiya!

Working with a mysql odbc object, where wondering if anyone know how i should get recaffected (last row affected) when i have done a execution.

As of now i use a simple workaround:

ID = rownum
Insertion -->"INSERT INTO `TableX` (id,userid) VALUES (NULL,'jokke');"
Retrieve <---"SELECT `id` FROM `TableX` WHERE `userid` LIKE 'jokke' ORDER BY `id` DESC LIMIT 0 , 1;"

Iwe used this site as a referance: http://www.w3schools.com/ADO/ev_conn_execute.asp for the object properties.

Edited by jokke

UDF:Crypter a file encrypt / decrypt tool with no need to remember a password again. Based on Caesar cipher using entire ASCII Table.Script's: PixelSearch Helper, quick and simple way to create a PixelSeach.Chatserver - simplified, not so complicated multi-socket server.AutoIT - Firewall, simple example on howto create a firewall with AutoIt.

Share this post


Link to post
Share on other sites



Hiya!

Working with a mysql odbc object, where wondering if anyone know how i should get recaffected (last row affected) when i have done a execution.

As of now i use a simple workaround:

ID = rownum
Insertion -->"INSERT INTO `TableX` (id,userid) VALUES (NULL,'jokke');"
Retrieve <---"SELECT `id` FROM `TableX` WHERE `userid` LIKE 'jokke' ORDER BY `id` DESC LIMIT 0 , 1;"

Iwe used this site as a referance: http://www.w3schools.com/ADO/ev_conn_execute.asp for the object properties.

That appears to be a parameter passed by an event, not a property you can read. Look in the help file under OBJ/COM Reference, in the section titled "COM Events", and also at the ObjEvent() function.

It would look something like:

$oAdoDbEvent = ObjEvent($oAdoDb, "_AdoDbEvent_")

; ...perform $oAdoDb.Execute()

Func _AdoDbEvent_ExecuteComplete($recaffected, $objerror, $status, $objcomm, $objrs, $objconn)
    MsgBox(64, "ADODB Event", "Execute Complete: recaffected = " & $recaffected)
EndFunc

...or similar.

:P


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

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