Jump to content

Database (sqlite) examples with GUI?


Recommended Posts

Hi everybody!

I 'm new in autoit and I want to use it for database applcations creation (I want to replace ms Access with autoit apps).

I 'm trying to find some examples of db apps with GUI, preferrably using a SQLite database.

I have found some but they don't work, eg: KindEbook Wishlist. Au3 Script Database, addrbook

Are there any examples that run as they should?

I 'm using ISN Autoit Studio 1.07.

 

Link to comment
Share on other sites

Hi @panoss, and welcome to the AutoIt forum :)

Take a look at _SQLite* functions in the Help file :) There are a lot of very well documented examples about SQLite :)

For the GUI, you can look at Koda Form Designer.

By the way, if you write in the Help file GUI or _GUI, there a lot of examples about all the controls you can implement in your application :)

If you have any other question, feel free to ask :)

 

Best Regards.

Edited by FrancescoDiMuro

Click here to see my signature:

Spoiler

ALWAYS GOOD TO READ:

 

Link to comment
Share on other sites

Thanks for the welcome.

Yes I've seen the SQLite functions.

I 'm looking for an integrated example (db+GUI).

I found this one (even thoug it 's not SQLite), it works fine when I run it by double clicking on the .au3 file but not when I run a project in ISN Autoit Studio made out of the same .au3 file!!:o

It looks like the debugger halts it even though I click the resume button.

EDIT: I deactivated the debugger and I can run it at ISN Autoit Studio ...I guess the debugger has some issues.

Edited by panoss
Link to comment
Share on other sites

9 hours ago, AutoBert said:

http://ritzelrocker04.bplaced.net/wordpress/sqlite-tutorials/ are some tut's for SQLite and AutoIt (German language).

I 'm running this tutorial and I get an error message:

'SQLite.dll konnte nicht gelanden werden' (translated by translate.google: 'SQLite.dll could not be loaded ').

In the same directory with the script, I have these files:

_Biespel.sql

sqlite.au3

SQLite.dll.au3

sqlite.def

sqlite.dll

sqlite3_300801000.dll

 

It 's caused by the '_SQLite_Startup()' line 60.

 

EDIT: I placed in the script 's directory the 2 files (sqlite3.dll and sqlite3.def) contained in the zip file 'sqlite-dll-win32-x86-3240000.zip'
downloaded from https://sqlite.com/download.html seems to run.

Edited by panoss
Link to comment
Share on other sites

I run this tutorial.

I created a new project in ISN Autoit Studio based on the file 0021_Sqlite_StarterDB_Gui.au3. (I uploaded the whole project in the attachment)

In order to run it in  ISN Autoit Studio you have to comment out lines 12-16.

;Global Const $SS_SIMPLE = 0xB
;Global Const $SS_SUNKEN = 0x1000
;Global Const $ES_AUTOHSCROLL = 128
;Global Const $ES_READONLY = 2048
;Global Const $GUI_EVENT_CLOSE = -3

This way it runs in Studio.

I compiled it with these lines commented out and the exe would show an error and not run.

 

I removed the comments from these lines, compiled and the exe now would run properly!

 

What is happening?

02_SQLiteStarter-Tut.zip

Edited by panoss
Link to comment
Share on other sites

What a pitty! It would be so nice if it worked as expected.

 

So, what would you suggest that I should use?

I 'm thinking of:

1. Editor: Scite

2. Debugger: AutoIt Debugger 0.47.0.0 (I see it has not been updated since 2011...)

3. Forms' editor: Koda

Edited by panoss
Link to comment
Share on other sites

You might benefit from looking at this thread:

 

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Link to comment
Share on other sites

  • 3 weeks later...
On 9.7.2018 at 11:08 AM, panoss said:

In order to run it in  ISN Autoit Studio you have to comment out lines 12-16.

;Global Const $SS_SIMPLE = 0xB
;Global Const $SS_SUNKEN = 0x1000
;Global Const $ES_AUTOHSCROLL = 128
;Global Const $ES_READONLY = 2048
;Global Const $GUI_EVENT_CLOSE = -3

This way it runs in Studio.

Hi!

I am the developer of the ISN AutoIt Studio..and i will expanin this behavior for you:
At first it makes a difference if you have the advanced debugging enabled. If it´s enabled, the isn "injects" some code to you script (to make it debuggable) when you run it. And this code has it own includes with already includes stuff like $SS_SIMPLE and so on. So if you have advanced debugging enabled it will crash at your declarations because they are already declared through the injected code.
And when you compile the script (or run it wit advanced debugging disabled)..the debug code is (of corse) not included...and so the constants are missing in this way -> Crash. :P

Solution?
The solution to this is pretty simple: Just use the official includes (where the constants are defined) and do not redifine it at your own. AutoIt Includes are marked as #include-once..so they can in theory stand 100 times in your script, it will only include the stuff in it once.

And in your case simply remove the constants from your script and update your includes to this and it should work. (In the ISN with or without advanced debugging and compiled)

#Region          ;************ Includes ************
    #include <EditConstants.au3> ;for $ES_AUTOHSCROLL and $ES_READONLY
    #include <GUIConstantsEx.au3> ;for $GUI_EVENT_CLOSE
    #include <StaticConstants.au3> ;for $SS_SIMPLE and $SS_SUNKEN
    #include <SQLite.au3>
#EndRegion ;************ Includes ************


Feel free to send me a message about ISN questions ;)

 

Edited by ISI360
Link to comment
Share on other sites

21 hours ago, ISI360 said:

And in your case simply remove the constants from your script and update your includes to this and it should work. (In the ISN with or without advanced debugging and compiled)

#Region          ;************ Includes ************
    #include <EditConstants.au3> ;for $ES_AUTOHSCROLL and $ES_READONLY
    #include <GUIConstantsEx.au3> ;for $GUI_EVENT_CLOSE
    #include <StaticConstants.au3> ;for $SS_SIMPLE and $SS_SUNKEN
    #include <SQLite.au3>
#EndRegion ;************ Includes ************


Feel free to send me a message about ISN questions ;)

 

Hi ISI360, thank you for sharing your program, it certainly is VERY useful!

I did as you suggested, runs fine!

 

But I have another issue.

I want to have my projects in disk f (f:/Autoit3).

So, I make a project and save it in folder:  f:/Autoit3/project_1.

But when I compile it (F7) the exe (and other necessary files) are moved to C:\Users\Panagiotis\Documents\ISN AutoIt Studio

 

I tried compile settings - project settings (shift+F7) but didn't find anything...

 

 

 

 

 

 

 

 

Edited by panoss
Link to comment
Share on other sites

First, check the folders in the ISN settings. Go to File -> Settings -> Program Paths. Here you will find "path for finisehd projects". This is the default folder ISN will move compileds projects to.
And you can also adjust this behavior as follows:  Check Project -> Project settings -> Compile settings.  Here you can choose 2 modes. First is to move the compiled porject in the "finished projects" folder (default) or second to simply create an subfolder in the project which contains the compiled stuff.

And for much more personalisation you could also make a makro to a macroslot. So..what the hell are macrosolots? These are simply 1-7 Slots you can assin custom actions to. They will be displayed in the toolbar and the "tools" menu. You can create these under Project -> Marcros. For example you could create a macro that compiles you file 1, 2, 3.. to custom directories and so on. Assin this to a macroslot an you can simply "trigger " the macro by a click. Hell you could also assign a hotkey in the settings to an macroslot ;);)

I think, some of that will help you ;)

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...