Jump to content

SQLite semi Embedded database functionality in AutoIt


ptrex
 Share

Recommended Posts

Hello

Thank you for this wonderful udf Its really useful

I dont really know sql and I need to build a database in a language other then english (hebrew) ,

But when I try to INSERT new values in the database I get

!   SQLite.au3 Error
--> Function: _SQLite_Exec

Anything that I can do? , Anyway to make it work with other languages other then English?

Thanks.

Link to comment
Share on other sites

@Oren

I am not sure SQLite supports UNICODE.

But a quick search on the net give you this workaround

UNICODE workaround

[EDIT]

SQLite does support UNICODE but you need to set the paramaters correct before creating the DB.

More info here :

PRAGMA encoding;

PRAGMA encoding = "UTF-8";

PRAGMA encoding = "UTF-16";

PRAGMA encoding = "UTF-16le";

PRAGMA encoding = "UTF-16be";

In first form, if the main database has already been created, then this pragma returns the text encoding used by the main database, one of "UTF-8", "UTF-16le" (little-endian UTF-16 encoding) or "UTF-16be" (big-endian UTF-16 encoding). If the main database has not already been created, then the value returned is the text encoding that will be used to create the main database, if it is created by this session.

The second and subsequent forms of this pragma are only useful if the main database has not already been created. In this case the pragma sets the encoding that the main database will be created with if it is created by this session. The string "UTF-16" is interpreted as "UTF-16 encoding using native machine byte-ordering". If the second and subsequent forms are used after the database file has already been created, they have no effect and are silently ignored.

Once an encoding has been set for a database, it cannot be changed.

Databases created by the ATTACH command always use the same encoding as the main database.

Regards,

ptrex

Edited by ptrex
Link to comment
Share on other sites

Well Now I really do have a problem the _SQLite_Open command does not allow me to open a database with a directory in language other then english (I'm trying from a hebrew directory..)

#include <GUIConstantsEx.au3>
#include <EditConstants.au3>
#include <sqlite.au3>
#include <sqlite.dll.au3>
#include <Date.au3>
#include <array.au3>
_SQLite_Startup()
ConsoleWrite(@scriptdir & @crlf )
_SQLite_Open(@scriptdir &"\Database.db")
Exit

the consolewrite command sow me

C:\שמור\parkproject
!   SQLite.au3 Error
--> Function: _SQLite_Open
--> Error:  Library used incorrectly

Anyway to fix this problem?

Link to comment
Share on other sites

  • 1 month later...

Well Now I really do have a problem the _SQLite_Open command does not allow me to open a database with a directory in language other then english (I'm trying from a hebrew directory..)

#include <GUIConstantsEx.au3>
#include <EditConstants.au3>
#include <sqlite.au3>
#include <sqlite.dll.au3>
#include <Date.au3>
#include <array.au3>
_SQLite_Startup()
ConsoleWrite(@scriptdir & @crlf )
_SQLite_Open(@scriptdir &"\Database.db")
Exit

the consolewrite command sow me

C:\שמור\parkproject
!   SQLite.au3 Error
--> Function: _SQLite_Open
--> Error:  Library used incorrectly

Anyway to fix this problem?

Hi,

A complete solution for full Unicode support with SQLite (and Console) is well underway. A little patience will be soon rewarded.

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

  • 1 month later...

Thanks for SQLite UDF. I used it in several my projects and it's awesome!

I have found very nice and free manager for SQLite databases - it's free also with sources

Sqliteman - Sqlite Databases Made Easy

http://sqliteman.com/

EDIT: screenshot

http://sqliteman.com/data/phoo/2007_08_26/sqliteman2.png

Edited by Zedna
Link to comment
Share on other sites

  • 4 weeks later...

Also give a try to another excellent tool (Windoze only) :

SQLite Expert

You can download a free version which offers almost every option the payware Pro version has. Both versions are loaded with useful [and usable] features.

The author is very friendly and responsive.

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

Link to comment
Share on other sites

  • 2 weeks later...
Link to comment
Share on other sites

If your a firefox user theres a nice little sql addon that i use
SQLite Manager Add on for Firefox

It was used here, too. See here, please.

AFireFox_Full can do this fine.

There is just one task - The SQLite+WEB.Au3+FireFox trick to open SQLite Manager on server-side.

post-9395-12501624668821_thumb.jpg

The point of world view

Link to comment
Share on other sites

  • 5 months later...

Hi,

Where can I download the latest UDF/examples/...?

I did grab the zip file with the dll stuff but on the first post if I click on downlaods it just brings me to the index page..

Thx

This UDF is now part of standard Autoit's UDFs

C:\Program Files\AutoIt3\Include\SQLite.au3

Functions/examples are in Autoit's helpfile.

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