Jump to content

SQLite semi Embedded database functionality in AutoIt


ptrex
 Share

Recommended Posts

@JSThePatriot

I can understand all your questions, it's not so easy after all if you jumpt in a thread that contains an application based, on 2 concepts and not being compatible.

OK. here we go :

1. The SQLite_Gui.au3 is for 100% connected to the SQLite COM (LiteX) DLL.

2. The SQLite.au3 is 100% connected to the standard SQLite DLL.

So you can't mix them.

This means you create a AutoIT GUI with the SQLite.au3 Include, but then you can't use the SQLite_GUI.au3 as a starting point.

So if you want to start creating a DB using a GUI interface you are stuck with the option 1 described above.

Unless you create you own DB management tool based in combination 2.

Or you can try to rewrite the GUI for combination 2, so I don''t have to do it :)

I hope to have set you in the right direction.

Link to comment
Share on other sites

@JSThePatriot

I can understand all your questions, it's not so easy after all if you jumpt in a thread that contains an application based, on 2 concepts and not being compatible.

OK. here we go :

1. The SQLite_Gui.au3 is for 100% connected to the SQLite COM (LiteX) DLL.

2. The SQLite.au3 is 100% connected to the standard SQLite DLL.

So you can't mix them.

This means you create a AutoIT GUI with the SQLite.au3 Include, but then you can't use the SQLite_GUI.au3 as a starting point.

So if you want to start creating a DB using a GUI interface you are stuck with the option 1 described above.

Unless you create you own DB management tool based in combination 2.

Or you can try to rewrite the GUI for combination 2, so I don''t have to do it :)

I hope to have set you in the right direction.

I understand your's uses the COM LiteX DLL, and the other uses the SQLite DLL with DLLCall(). What I am trying to accomplish is a .db file with the tables>fields setup without me having to write some SQL and/or my own functions based on those just for a simple .db creation effort that I will only need to create once.

I will be including the .db with my program. I will use SQLite.au3 in my program to access the data IN the *.db. This should work... like if I used COM to build a MySQL database, and then PHP to access and manipulate the data.

See what I am saying now? I am 90% certain that this is possible, but I was wanting to be 100% before proceeding :(

JS

AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Link to comment
Share on other sites

@Valuater

I am not 100% sure either because I never used it that way.

I think it should work out, nevertheless there are issues with DB compatability to consider.

This means a DB created with SQLite version 3.1.5 might not be accessible with an anplication based on SQLite 3.3.5, or visa versa.

PS : there work arounds for that as well of course. You can always export the data from an DB 3.1.5 and import in a DB created with a later version.

Let us know what you experience in this case, I am interested too.

Edited by ptrex
Link to comment
Share on other sites

@Valuater

I am not 100% sure either because I never used it that way.

I think it should work out, nevertheless there are issues with DB compatability to consider.

This means a DB created with SQLite version 3.1.5 might not be accessible with an anplication based on SQLite 3.3.5, or visa versa.

PS : there work arounds for that as well of course. You can always export the data from an DB 3.1.5 and import in a DB created with a later version.

Let us know what you experience in this case, I am interested too.

I will definitely post my progress...

Your's is the 3.1.5 right? As they havent updated the COM wrapper?

The DLLCall() version should be 3.3.5, no?

Thanks,

JS

AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Link to comment
Share on other sites

Just wanted to congratulate all the developers that have helped with the SQLite.au3 and other programs in this thread as it just made sticky.

JS

AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Link to comment
Share on other sites

Hi @piccaso,

When I click on column for sort, in "Example List View", the first item is always index 2.

Best, Randall

the first line is cut off because it contains the header information displayed in the listview header...

just a silly mistake in the sample.

well i should rework this example :)

GUICtrlRegisterListViewSort() didnt exist at that time, if you just want to sort a listview better use that one, its faster :(

Just wanted to congratulate all the developers that have helped with the SQLite.au3 and other programs in this thread as it just made sticky.

JS

i wonder how that happend...

thank you :D

CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map
Link to comment
Share on other sites

Added support for Default Keyword for all Optional parameters

Added 'SQlite Syntax help' by ptrex

SQLite.zip

to deliver an UDF to JdeB, our UDF integrator, you need to follow some rules in the tree where the file are stored. I did a reorganisation in the attached .zip.

I correct the naming of the examples for the doc.

I beginning to update _SQLite_Open.(too many word strating with an uppercase)

You still miss several help files I put 0 length files to warn which one.

I also discover that the return/error are not very coherent some time result/error are return sometime they go in @error. When you write the complete doc you will see what I mean just cross check between functions.

I don't know where the .dll and the .exe whould go. It could be helpfull this file have a version. If you can recompile with that will help. :)

Link to comment
Share on other sites

If my understanding is correct there are three versions of the SQLite.au3 script... Is this correct?

If that is the case... does each one do pretty much the same thing as the others just with different back ends? (DLLCall() vs COM Objects)

Has anyone thought of standardizing all of the function names so that a single GUI could be written for all three, and you in your options just select which one you want? I know this would possibly require a great deal of effort, and team work, but I really think it would further benefit your project.

Does piccaso's DLLCall() use have a GUI already created for it? I want to make sure that when I create this database. It is most up to date, and is compatible as I will be using the DLLCall() version for accessing my data.

I have finished everything I can. I am now to the database part. I need to make sure I have all of my facts straight :).

Thanks,

JS

AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Link to comment
Share on other sites

@JSThePatriot

Hi again !!

Status report :

- The COM (and GUI) is finished.

- The DLLCall is in the middle of standardizing. But not yet ready.

When it is ready, we are aiming to have this included as a standard UDF !!

So all depends on how much time you have, because I can' t tell how much longer it will take to finish.

Maybe @piccaso can give you more details on this ?

If you need a Gui for the DLLCall, look in the Example folder of @picasso's contribution for "example_browser.au3"

Link to comment
Share on other sites

@JSThePatriot

Hi again !!

Status report :

- The COM (and GUI) is finished.

- The DLLCall is in the middle of standardizing. But not yet ready.

When it is ready, we are aiming to have this included as a standard UDF !!

So all depends on how much time you have, because I can' t tell how much longer it will take to finish.

Maybe @piccaso can give you more details on this ?

If you need a Gui for the DLLCall, look in the Example folder of @picasso's contribution for "example_browser.au3"

hrm... piccaso doesnt seem to get on here much =/... I do need this pretty rapidly. I would hate to have to change my script much because of the standardization.

Has anyone thought about one GUI that could use either the DLLCall() or the COM methods? With a radio button? That would be the easiest... I would think.

I am guessing though that the COM option isnt kept as up to date as the official sqlite.dll is correct?

JS

AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Link to comment
Share on other sites

piccaso doesnt seem to get on here much

That"s because he is working hard on the standard UDF.

Has anyone thought about one GUI that could use either the DLLCall() or the COM methods

No, because it's a waste of time.

I am guessing though that the COM option isnt kept as up to date as the official sqlite.dll is correct?

That's correct. But you have a choise, either go fast and use COM or wait for DLLCall UDF.

Regards

ptrex

Link to comment
Share on other sites

hrm... piccaso doesnt seem to get on here much =/... I do need this pretty rapidly. I would hate to have to change my script much because of the standardization.

well you cant buy time in store :)

there will be some changes in order to make this library more uniform to autoit functions...

about COM vs DllCall

The Litex COM dll exports the same function as the original distribution so it can be used by 'sqlite.au3'

it would be the same as using an old version of sqlite3.dll

and the new version(s) can read databases created by old version(s) but once converted you can only dump and Reimport the data...

Try this tool if you want something that uses the dll that you supply.

maybe not the best thing around...

CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map
Link to comment
Share on other sites

25.05.06 Added _SQLite_Encode()

25.05.06 Changed _SQLite_QueryNoResult() -> _SQLite_Execute()

SQLite.zip

So now its possible to use 'encoded' data inline in the query (see Tests\_SQLite_Encode.au3) but there is no way to get i back out save (its truncated by a chr(0) )

maybe i'll add a optional parameter to _SQLite_FetchData() to pass out a BinaryString...

btw: i posted a link to this wrapper on SQLite's wiki some days ago. 435 Downloads ...

wow...

there must be many people that use AutoIt and dont come to the forums :)

Edited by piccaso
CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map
Link to comment
Share on other sites

I appreciate all of the hard work and efforts! I really do.

Great set of functions. I look forward to using the more in the future! I will definitely as I have stated many times be using them on my current project.

JS

AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Link to comment
Share on other sites

I am sorry... I am failing to see how to actually "CREATE" the DATABASE file (*.db).

I can see in the COM how to do it through the code, but there arent any examples of createing the actual database from code. How would one go about creating this file?

Thanks again,

JS

Edit: I got a file made, I had to use FileOpenDialog() with the create if it doesnt exist option. Is that the only way to create the file? That to me seems a little odd. There should be some method for creating the file.

Edited by JSThePatriot

AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

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