anunes Posted February 25, 2009 Share Posted February 25, 2009 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 More sharing options...
martin Posted February 25, 2009 Share Posted February 25, 2009 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 More sharing options...
anunes Posted February 25, 2009 Author Share Posted February 25, 2009 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 More sharing options...
martin Posted February 25, 2009 Share Posted February 25, 2009 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 More sharing options...
anunes Posted February 26, 2009 Author Share Posted February 26, 2009 See the Function _SQLite_Query in the help for an example.Thanks, that problem was solved. Now I have a new one.I did a func Search. What I want to know is, how do I do to show the results in a DB View table?Something like this:http://www.funk.eu/wp-content/uploads/0811...les_5_large.jpg Link to comment Share on other sites More sharing options...
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