Search the Community
Showing results for tags 'access.au3'.
-
Hi database and SQL masters, This is my first time dealing with .mdb files and Arrays and I have a few questions. I just need to change one field in a databases of unknow # of records. The script runs on different PC's. Each PC has a database with the same structure just more or less records. Let me explain what I want to do: 1: Open .mdb 2: Get the number of records 3: Start with 1st record 4: Check DBfield "fldQSLConfByS" if Letter "Q" is in the field 5: If Letter exists goto next record 6: If not, add Letter Q to existing entry and write it back to "fldQSLConfBYs' field in DB record Put complete record (all fields) into a workable string (I think ArraytoString does that) for further processing or even better into $fieldsxy[xy] [xy] 7: next record until all records are processed. I found ADO.au3 UDF, which is over my head and an overkill to what I need to do, I think. Then I stumbled across Access.au3.I modified the example.au3 and can read the DB, display the fields etc. but I can not write back to the DB. Always get: "Error in writting Data" See Section: ; ******************************************************* ; 10 - Edit/change Record ; ******************************************************* No idea why I can not write the data back. Playing with it for a week now and can not figure it out. Is there an easier way to just edit/change one DBfield? Oh.. and how do I display or read an array value? ( $datafieldxy = $array[xy][xy] ) Is _ArrayToString($avArray_Record, "", 48,48) the only way? (48, number of field) Attached are 3 files: Access.au3 - the UDF ~~ HAMLog_AccessDB.au3 - Scripy ~~ testdb.mdb - Database Thanks for any help HAMLog_AccessDB.au3 testdb.mdb Access.au3