Jump to content
Sign in to follow this  
hamsteren

question about SQLite UDF

Recommended Posts

hamsteren

I created a DB with tables in SQLite

#include <SQLite.au3>
#include <SQLite.dll.au3>
Local $hQuery, $aRow, $sMsg, $aNames

_SQLite_Startup ('C:\Program Files\AutoIt3\sqlite3.dll')
_SQLite_Open('c:\CMDB\CMDB.db')
;_SQLite_Exec (-1, "CREATE TABLE CMDB_users (user_id INTEGER PRIMARY KEY, firstname, lastname, username );") ; CREATES THE USERS TABLE
;_SQLite_Exec (-1, "CREATE TABLE CMDB_installed_machines (installed_id INTEGER PRIMARY KEY,computer_id,user_id,install_date);") ; CREATE TABLE FOR THE INSTALLED WORKSTATION LIST
;_SQLite_Exec (-1, "CREATE TABLE CMDB_computers (computer_id INTEGER PRIMARY KEY,computername,servicetag,vendor,model,memory,ipaddress);") ; CREATES THE COMPUTERS TABLE
;_SQLite_Exec (-1, "CREATE TABLE CMDB_software (software_id INTEGER PRIMARY KEY,application_name,standard_software,location,filecheck);") ; CREATES THE SOFTWARE LIST TABLE
;_SQLite_Exec (-1, "CREATE TABLE CMDB_installed_software (installed_id INTEGER PRIMARY KEY,computer_id,software_id,install_date);") ; CREATE TABLE FOR THE INSTALLED SOFTWARE LIST

_SQlite_Query (-1, "SELECT * FROM CMDB_computers;", $hQuery) ;test query

msgbox(0,'test','start')
While _SQLite_FetchData ($hQuery, $aRow) = $SQLITE_OK
    msgbox(0,'test','result :' & $aRow[0])
WEnd
msgbox(0,'test','end')
_SQLite_Close()
_SQLite_Shutdown()

this is my code, but there will be no result when running the code

SOLVED, I HAD THE DB STILL OPEN

Edited by hamsteren

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  

×