Sign in to follow this  
Followers 0
alexlimlexart

sqlite3 feature not responding

11 posts in this topic

#1 ·  Posted (edited)

I made a simple sample script with sqlite and it was working fine in my laptop but then when i executed it at the office, it wasn't responding. I thought that sqlite is zero configuration. Any reason why this has happened?

I have also tried the sample scripts that came with the help file.. still not responding.

THANKS!

Edited by alexlimlexart

Share this post


Link to post
Share on other sites



Did you included SQLite.dll.au3 ???

Share this post


Link to post
Share on other sites

alexlimlexart,

First of all welcome to the forum.

When you encounter this or that problem, please try to be a little more specific. That will make using our crystal balls useless and, so to speak, crystal balls _do_ break over time!

What AutoIt version did you install? Which release, beta, minimal, full? Which system do you run it on? 32- or 64-bit compile, or run from SciTe? What error do you get?

Nonetheless I'll risk a diagnosis: you installed the latest 3.3.8.0 release on a system where AutoIt never ran.

You have issue running it on a corporate machine, probably behind a corporate firewall.

The 3.3.8.0 release changed the way sqlite3.dll and sqlite3_64.dll are distributed. In previous releases the DLLs were embedded in SQLite.Dll.au3 so the executable was actually self-contained. The latest release changed that: if the relevant DLL isn't found on your target system, it is _downloaded_ from the AutoIt repository. Doing so depends on the machine being able to access this site, obviously.

Read to see what you need to do: download the right DLL version.


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)

Share this post


Link to post
Share on other sites

Thank you for the warm welcome and quick reply.

I'd like to introduce myself so you guys could help me at my level of understanding. =)

I am a nurse and i have some self learned and experience with softwares, networking, etc. Now i am doing a project that autoit could be of really help. I don't have administrative privileges so autoit and sqlite3 are the perfect tools. Going to the topic.

I installed the latest 3.3.8.0 release in my laptop and all working well. i was learning sqlite and its amazing. Im running 32bit and at the hospital as well. I converted the au3 to exe and all going well. But when i opened it at work it wasn't responding. All it did was sit on the system tray silently which i had to manually exit.

I guess you are right that it isn't available in the hospital and yes it is running under proxy (that i am sure) or probably a firewall. Is there any way of makit sqlite3 available by just copy and pasting that dynamic library and/or add environment variables? I am just guessing.

thanks! =)

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Simply download the up-to-date 32-bit DLL version (sqlite3.dll) from the AutoIt download directory for SQLite and install it in your application folder. That should work flawlessly.

Now if you intend to distribute your application on several computers, you will find it easier to FileInstall the DLL (lookup in the help file). That will make it self-contained.

Since you find SQLite a convenient engine, I highly recommend you try SQLite Expert. This is a stand-alone SQLite DB manager loaded with features. It comes in both unlimited freware and Pro payware versions. You can do a lot of things within it without having to code a single line of AutoIt.

You're always welcome to chime if anything goes wrong or if you have questions using AutoIt or SQLite in particular.

Edited by jchd

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)

Share this post


Link to post
Share on other sites

Yes I do plan to distribute. Do you mean that i should include this line in my script?

FileInstall("C:\sqlite3.dll", "D:\mydir\sqlite3.dll") - example

Sqlite Expert is also great. Actually the file I used to test was the dbdemos.db3 from sqlite expert.

Share this post


Link to post
Share on other sites

Yes do something like that, but leave the last parameter as default or 0 (don't overwrite if file exists).

OK I see you're on the right tracks. Just ask again if you need guidance for your DB design or usage, I'll be pleased to help.


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)

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

Got it buddy. It is so nice to have you around. Thanks a lot! Oh.. one more thing, is there a way around to export data to PDF without having to have another application, like i would just include an export button in my script? SqliteExpert can print and export to PDF.. something like that.. because i will be distributing this to several computers. THANKS

Edited by alexlimlexart

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

I'd say you have a few solutions to create PDF reports. Selecting the "right" one largely depends on your actual context, needs, budget, and possibly even more on future needs.

A poor man's way, which nonetheless goes a long way to provide ample room for flexibility, would be to use Autoit. Create a template html document with all the style[sheet], decoration and layout that suits you. Provide an empty html table which will be filled later. Split the baby into a header and a trailer (you should easily find adequate tools to properly cut flesh in your environment!).

Now use _SQLite_GetTable to make the select you want, but include the formatting needed for html in the output, like this:

Local $table = _SQLite_GetTable($hDB, "select '<tr><td>' || column1 || '</td><td>' || column2 || '</td><td>' || column3 || '</td></tr>' from MyTable join ... where ... order by ...', $rows, $nrows, $ncols)

Now all you have to do is use _ArrayToString (beware row 0 contains headers), prepend the html header part to the stringized table and append the trailer part. Display that stuff in a hidden IE and print to a free PDF printer toward the file path/name you want.

Granted, it was a poor man's thing! Yet it lets you master every aspect but it won't be practical for maintaining a large number of complex or varying reports. Don't dismiss that possibility too fast either, it isn't that hard to code and may give you a temporary solution. You can adapt this to some other format (OpenOffice, RTF, Excel, whatever) using the same idea.

Else you can blackmail your boss to make them crank up the site license of Expert, for instance. It has the advantage (in the paid Pro version) to enjoy a complete report builder with all bells and whistles you dream of. I'm sure Bogdan will offer a bargain price for you if I ask him to do so. Other third-party SQLite manager and report builders can certainly fit as well but I don't know of an affordable one in particular.

In between there are a number of options, including building your PDF reports using AutoIt alone (look around here for PDF UDFs, there are a few but don't ask me how well they perform). I wouldn't recommend going this way as I don't believe it's worth the pain and effort.

BTW, I forgot to mention: don't even contemplate to share an SQLite DB over any network. I may come up sooner or later with a reliable solution for unlimited SQLite DB sharing but don't hold your breath.

OTOH you can freely and reliably share any local SQLite DB among a number of processes. If you need to do that just say so and I'll tell you how to arrange your code so that things go smoothly with premium reliability.

Hope this gives you some directions, even if I don't have a very simple PDF reporting solution handy. Maybe others will come up with a smarter way, just curious.

Edited by jchd

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)

Share this post


Link to post
Share on other sites

You are great man! This really helped me a lot. I have tried the fileinstall and it worked perfect. About the html template I think it will flow nicely. Im gonna give it a try. You rock. Thanks a lot! =)

Share this post


Link to post
Share on other sites

Great? No, only tall!

Glad it could be of some help.

Best of luck, you know were we are.


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)

Share this post


Link to post
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
Sign in to follow this  
Followers 0