Jump to content

SQLite semi Embedded database functionality in AutoIt


ptrex
 Share

Recommended Posts

@gadzail

Or you mean the new functionality in SQLite 3.3.13

Yes I mean the functionality in the new DLL's. Because the UDF's written don't expose the new functionality automatically.

Regarding using SQLite over a network and at the same time :

The first part is not a problem. But accessing the DB simultaniously that's an other part.

SQLite was not designed to work in a Client/Server environment.

I might work but DB curruptions might occor.

You can read more about this over here : http://www.sqlite.org/whentouse.html

Read

Situations Where Another RDBMS May Work Better

But I know there is a paid version around that can handle the client/server situation.

Regards,

ptrex

Link to comment
Share on other sites

Yes I mean the functionality in the new DLL's. Because the UDF's written don't expose the new functionality automatically.

it depends on what you mean...

new functions like randomBlob() and Hex() do work

but there is a new prepare method i didnt see bevore.

I have to read the manual first but i probably makes sence switching sqlite3_prepare_v2

anything else (on the api side) i missed? :whistle:

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

  • 2 weeks later...

I have a real need for SQL functionality in AutoIt, and I have been reading this forum and trying to understand.

I have a few questions?

Quote from entry two:

"the LiteX COM wrapper of http://republika.pl/roed/litex/

Download the zip file extract and copy the DLLs to your c:\windows\system32 dir.

Use the command regsvr32 sqlite3.dll. or REregister after an upgrade"

Question one:

If I write a program using $oDb = ObjCreate( "LiteX.LiteConnection" )

It must first install and register sqlite3.dll? Is that the only dll that must be delivered and installed?

Question two:

If I compile my program using the latest beta, and write the program using the

#include <SQLite.au3>

and

_SQLite_Startup()

must my program still download, install, and register sqlite3.dll, or is this all taken care of?

Just trying to understand exactly what is required.

Talking Clockhttp://www.autoitscript.com/forum/index.php?showtopic=20751Talking Headlineshttp://www.autoitscript.com/forum/index.php?showtopic=20655Sometimes, I sits and thinkssometimes, I just sits

Link to comment
Share on other sites

@leecole

OK I understand the confursion. Because there are 2 ways of playing around with SQLite.

One is the SQLiteX COM DLL which needs registering on each machine that uses it.

The other one is the NATIVE SQLITE DLL that can be downloaded from the SQLite website.

And the SQLite UDF #include <SQLite.au3> is distributed with the AUTOIT disctribution, see help file.

The native SQLite3.dll is needed on each computer that runs your application.

And NO this DLL does not require any registration, because it is not a COM DLL.

You can access this DLL using the SQLite UDF natively.

I hope that this gives you a directions to get you going.

regards

ptrex

Link to comment
Share on other sites

@leecole

OK I understand the confursion. Because there are 2 ways of playing around with SQLite.

One is the SQLiteX COM DLL which needs registering on each machine that uses it.

The other one is the NATIVE SQLITE DLL that can be downloaded from the SQLite website.

And the SQLite UDF #include <SQLite.au3> is distributed with the AUTOIT disctribution, see help file.

The native SQLite3.dll is needed on each computer that runs your application.

And NO this DLL does not require any registration, because it is not a COM DLL.

You can access this DLL using the SQLite UDF natively.

I hope that this gives you a directions to get you going.

regards

ptrex

Yes, that helps. So in either case, my application must:

1) deliver a dll, or otherwise inform the user about where to obtain the dll and how to install it?

The application will be used on other systems, and in playing around with SQL myself, I had lost track of

what I installed, and why. So I wanted to understand the requirement's of either method.

Thanks, and great work!

Talking Clockhttp://www.autoitscript.com/forum/index.php?showtopic=20751Talking Headlineshttp://www.autoitscript.com/forum/index.php?showtopic=20655Sometimes, I sits and thinkssometimes, I just sits

Link to comment
Share on other sites

@leecole

one last tip :

you can use fileInstall to include the DLL in your EXE distributable

See helpfile for more info.

FileInstall("C:\Temp\Sqlite3.dll", "c:\Windows\Sqlite3.dll")

Success with your appl.

ptrex

Edited by ptrex
Link to comment
Share on other sites

sorry ptrex i have to correct you :whistle:

@leecole

about you question two:

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

and you dont have to worry about the dll anymore

the dll bundled with autoit is a bit out of date.

if you want to build your own SQLite.dll.au3, there is a tool in the repository (see my sig)

if you cant build it on your own pn me and i'll update the SQLite.dll.au3 in the repository

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

@leecole

one last tip :

you can use fileInstall to include the DLL in your EXE distributable

See helpfile for more info.

FileInstall("C:\Temp\Sqlite3.dll", "c:\Windows\Sqlite3.dll")

Success with your appl.

ptrex

Yes, I had thought of this.

Thanks, for your help, and for all your work.

Talking Clockhttp://www.autoitscript.com/forum/index.php?showtopic=20751Talking Headlineshttp://www.autoitscript.com/forum/index.php?showtopic=20655Sometimes, I sits and thinkssometimes, I just sits

Link to comment
Share on other sites

sorry ptrex i have to correct you :whistle:

@leecole

about you question two:

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

and you dont have to worry about the dll anymore

the dll bundled with autoit is a bit out of date.

if you want to build your own SQLite.dll.au3, there is a tool in the repository (see my sig)

if you cant build it on your own pn me and i'll update the SQLite.dll.au3 in the repository

For the functions that I use, the current dll will probably suffice. My aplications currently use the COM solution,

but avoiding having to ship, and install the dll, will make it worthwhile, switching to the SQLite functions.

Thanks,

Talking Clockhttp://www.autoitscript.com/forum/index.php?showtopic=20751Talking Headlineshttp://www.autoitscript.com/forum/index.php?showtopic=20655Sometimes, I sits and thinkssometimes, I just sits

Link to comment
Share on other sites

@piccaso

the dll bundled with autoit is a bit out of date

Thanks for the update.

But if you use the standand SQLite.au3 you don't need the SQLite.dll.au3, correct ?

I just wanted to keep it less confusing as it already is for the outsiders.

Regards

Patrick

Link to comment
Share on other sites

  • 2 weeks later...

you can get the latest version from that link in my sig.

to update replace SQLite.au3 and SQLite.dll.au3 in your include Directory.

for a changelog on sqlite.au3 your better off looking into the repository (Here)

The wrapper in the Repository is an 'in development' version and not complete tested.

but as soon as i get that done i'll send it in...

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

  • 2 weeks later...

The SQLite in the beta version is old I'm guessing because when I ran a script that had SQLite in it, it gave me the new error about stack corruption, I put the new vers from your sig in there and it works fine.

Link to comment
Share on other sites

  • 1 month later...

I have stupid question but I have to ask it .. :">

I an building client/server app that use SQLite db with the sqlitx dll option.

Is there any metohod/solution to allow the client retrieve the DataBase path remotely?(which obviously reside on the serer machine)

My client designed to contact the database directly.

Be Green Now or Never (BGNN)!

Link to comment
Share on other sites

there is no such thing like a server for sqlite but there is a ODBC wrapper.

http://www.ch-werner.de/sqliteodbc/

but it should not be a trivial task to make your own sqlite server.

since autoit supports sockets and binary transfer...

Well I guess the SQLite is not appropriate solution for my application.

I will stick with MySQL server and probably will have to improve the MySQL udf library for my needs.

Thanks piccaso, you waked me up!.

BTW: Drop a note if you here that someone invented the wheel again ... :)

Be Green Now or Never (BGNN)!

Link to comment
Share on other sites

I have stupid question but I have to ask it .. :">

I an building client/server app that use SQLite db with the sqlitx dll option.

Is there any metohod/solution to allow the client retrieve the DataBase path remotely?(which obviously reside on the serer machine)

My client designed to contact the database directly.

Out of curiosity, why would the client not talk to the server, and the server work with the database?

I think that this could possibly be built in some how, but SQLite isn't setup as a server application. You could create a wrapper that would give it some functionality that you are looking for. SQLite is a single file database. The ODBC fix is one way, and one persons response to what you are wanting to do. Unfortunately it seems you have decided to go with MySQL. Another great database option, but requires an install on a machine for it to work. I am personally a fan of small, fast, and portable.

I hope this helps a bit more,

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

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

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