Sign in to follow this  
Followers 0
Riz

Help with insert to sqlite db use GUI from

4 posts in this topic

Hi all,

This is my first post.

I have looked at sqlite UDF and other staffs. Its really amazing work, I just wonder can I use GUI from to insert data to the database.

Regards

Share this post


Link to post
Share on other sites



Hi all,

This is my first post.

I have looked at sqlite UDF and other staffs. Its really amazing work, I just wonder can I use GUI from to insert data to the database.

Regards

Maybe this code will helps you :D but I don't know about GUI from, somebody else will help you don't worry.

Dim $sReturn
$sql = DllOpen ("SQLiteAU3.dll")
$result = DllCall($sql, "int", "SQLite_Open", "str", "myDB.db")
$result = DllCall($sql, "int", "SQLite_Exec", "str", "CREATE TABLE tbTrids (id integer, descr varchar(20));", "str", $sReturn)

$result = DllCall($sql, "int", "SQLite_Exec", "str", "INSERT INTO tbTrids SELECT 5, 'aaaaaa';", "str", $sReturn)
$result = DllCall($sql, "int", "SQLite_Exec", "str", "INSERT INTO tbTrids SELECT 6, 'bbbbbbbb';", "str", $sReturn)
$result = DllCall($sql, "int", "SQLite_Exec", "str", "INSERT INTO tbTrids SELECT 7, '123456789012345678901234567890';", "str", $sReturn)

$result = DllCall($sql, "int", "SQLite_Exec", "str", "SELECT * FROM tbTrids;", "str", $sReturn)
MsgBox (0, "title", $result[2])
DllCall($sql, "int", "SQLite_Close")
DllClose($sql)

Share this post


Link to post
Share on other sites

Thanks for you reply. but really need form. :D

like this from below. when press add the data insert to myDB.db

#include <GuiConstants.au3>

GuiCreate("MyGUI", 392, 316,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS))

$Input_1 = GuiCtrlCreateInput("Input1", 60, 60, 110, 20)
$Input_2 = GuiCtrlCreateInput("Input2", 60, 100, 110, 20)
$Input_3 = GuiCtrlCreateInput("Input3", 60, 140, 110, 20)
$Button_4 = GuiCtrlCreateButton("Add", 220, 90, 70, 30)

GuiSetState()
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case Else
    ;;;
    EndSelect
WEnd
Exit

Share this post


Link to post
Share on other sites

Any Idea, Advice, suggestion plesae? :D:D

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