Jump to content
Sign in to follow this  

sqlite help

Recommended Posts

I'm trying to add search button to (Example_browser.au3) but I don't know whats wrong with my code?

I cann't sort it out, how can I get all column from cus table. and another problem find recourds.

Waiting for help and advice.

this is my simple code:

#include <GuiConstants.au3>
#Include <GuiListView.au3>
#include "sqlite.au3"

Global $listview
GuiCreate("Search", 392, 316,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS))
$Combo_1 = GuiCtrlCreateCombo("=", 250, 40, 110, 21)
$Combo_2 = GuiCtrlCreateCombo("", 30, 40, 210, 21)
$Input_3 = GuiCtrlCreateInput("", 30, 80, 210, 25)
$Button_4 = GuiCtrlCreateButton("Search", 250, 80, 110, 30)
Dim $sReturn
$sql = DllOpen ("SQLiteAU3.dll")
$result = DllCall($sql, "int", "SQLite_Open", "str", "myDB.db")
$result = DllCall($sql, "int", "SQLite_Exec", "str", "SELECT * FROM cus WHERE id LIKE "& $Combo_1 And $Input_3 &";", "str", $sReturn)
$listview = GUICtrlCreateListView ("ID     |Data  ",30,120,330,170, $result[2])
DllCall($sql, "int", "SQLite_Close")

While 1
    $msg = GuiGetMsg()
    Case $msg = $GUI_EVENT_CLOSE
    Case Else

Share this post

Link to post
Share on other sites

I don't know why you use dllcall instead of using the UDFs defined in "sqlite.au3" .

I think them is a better approach all the burden is done by the included files.

look at the signature of piccaso for the latest download if needed

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...