Edifice Posted February 27, 2009 Posted February 27, 2009 This is my function so far: Func data_query() Local $aResult, $iRows, $iColumns, $iRval $iRval = _SQLite_GetTable2d (-1, "SELECT * FROM datas;", $aResult, $iColumns, $iRows) If $iRval = $SQLITE_OK Then _SQLite_Display2DResult($aResult) EndIf EndFunc The Display 2d part was really just a testing thing, and I' not planning to use it for anything. Anyway, I now need a way to get a single row of data loaded into different GUI-controls. I would express it like this: "Select this row" -> "put this colum into that GUICtrl" -> "put this one into that" ... and so on. However Auto-it doesn't understand I tried the helpfile but I think it's a bit weak when it comes to SQLite - or I'm just to stupid to find it Any help is appreciated!
KaFu Posted February 27, 2009 Posted February 27, 2009 I'm quiet sure AU can handle anything SQLite can throw at it, just look at my SMF program as an example ... It's just a question how to do that. Read the SQLite result into an array, loop through that array and perform your tasks depending on your data-structure / rowid you choose. $array = data_query() if IsArray($array) Then for $i = 1 to UBound($array) - 1 ; do something per returned result Next Else ; do error handling EndIf Func data_query() Local $aResult, $iRows, $iColumns, $iRval $iRval = _SQLite_GetTable2d (-1, "SELECT * FROM datas;", $aResult, $iColumns, $iRows) If $iRval <> $SQLITE_OK Then ConsoleWrite("SQLite Error Code: " & _SQLite_ErrCode() & @tab & "SQLite Error Message: " & _SQLite_ErrMsg() & @crlf) Return 0 Else Return $aResult EndIf EndFunc OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2024-Oct-13) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Oct-13) HMW - Hide my Windows (2024-Oct-19) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2025-May-18) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16)
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now