Jump to content

Newbie with problems in uses DB


anunes
 Share

Recommended Posts

Hi, I'm new in AutoIt and DataBases. I am writing a program that register students in a High School. My problem is, I don't know how to connect my script with the database.

I just did the GUI, because of this I won't post here the code, but what I want is:

- Get the name typed on input fill (and the other input fills), so write this in the DataBase name column.

I'm trying to use SQLite.

Thanks.

Link to comment
Share on other sites

Hi, I'm new in AutoIt and DataBases. I am writing a program that register students in a High School. My problem is, I don't know how to connect my script with the database.

I just did the GUI, because of this I won't post here the code, but what I want is:

- Get the name typed on input fill (and the other input fills), so write this in the DataBase name column.

I'm trying to use SQLite.

Thanks.

You need to play with some of the _SQL examples. Search for the sqlite threads in example scripts and when you have some code that you are stuck on post your code and ask for help.
Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

You need to play with some of the _SQL examples. Search for the sqlite threads in example scripts and when you have some code that you are stuck on post your code and ask for help.

Here's a simple code

#include <SQLite.au3>
#include <SQLite.dll.au3>

$open = _SQLite_Open("C:\Downloads\sqlite-3_6_11\teste.db")
$teste = _SQLite_Exec($open, "create table teste(test_id integer, test_nome varchar(40));")
_SQLite_Exec($open, "insert into teste values (1, 'Test Anunes');")

It should works? What I try to write was open an database named "teste.db", then create a table named "teste" in this, and insert one value! Now, if it works, how do I do to it show me the values?

In SQL the command is "select * from teste;". But I don't know how to do this in AutoIt.

Link to comment
Share on other sites

It should works? What I try to write was open an database named "teste.db", then create a table named "teste" in this, and insert one value! Now, if it works, how do I do to it show me the values?

In SQL the command is "select * from teste;". But I don't know how to do this in AutoIt.

See the Function _SQLite_Query in the help for an example.

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...