Re: [sqlite] using SQLite to store test-data having C.J.K.T. characters, in it?

2010-01-05 Thread Nicolas Williams
On Wed, Jan 06, 2010 at 08:21:05AM +0530, Harsha wrote:
> I am developing a small testing application, which in vague way does
> compare/diff etc. b/w the results obtained by executing a CLI command
> under test.  The output of this command may contain Asian character
> such as Chinese(C), Japanese (J), Korean (K) and Taiwanese (T).
> 
> And these characters may be in a specific encoding based on the OS for
> example:
> 
> Chinese - GB18030 on Solaris
>UTF-8 on Linux
> Japanese - Euc-jp on Solaris
> SJIS on windows
> UTF-8 on Solaris
> Taiwanese - UFT8 on windows and linux
>   BIG5 on Solaris
> Korean -EUC-Kr on Solaris
> UTF8 on windows and linux

Solaris definitely supports UTF-8.  The thing to do is to use UTF-8.

You can do that by either: a) using only UTF-8 locales, or b) adding
code to your application to convert between UTF-8 (used by SQLite3) and
the user's locale's codeset.  That is, convert user input to UTF-8, then
use those strings with SQLite3, and convert output back to the user's
locale's codeset before displaying it to the user.

For (b) see the iconv(3C) and iconv(1) manpages to get started on
codeset conversions, and the setlocale(3C), nl_langinfo(3C) and
langinfo.h(3C) manpages to figure out how to get the current locale's
codeset (first call setlocale(), then nl_langinfo(CODESET) to get the
codeset.  These are portable interfaces, available on Solaris and Linux
both; I don't know how you'd do the same on Windows.

> I had a glance at the documentation of SQLite, all I could figure reading
> few sections of the doc. is that.. SQLite support Unicode (up to UTF-16
> LE,BE)
> Is it a good idea for me to use SQLite to store the test-data involving the
> above set of encoding?

You can store non-UTF-8, non-ASCII strings if you use BLOBs, but I
recommend (a), else (b), as described above.

Nico
-- 
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] using SQLite to store test-data having C.J.K.T. characters, in it?

2010-01-05 Thread Harsha
Hi All,

I am developing a small testing application, which in vague way does
compare/diff etc. b/w the results obtained by executing a CLI command under
test.
The output of this command may contain Asian character such as Chinese(C),
Japanese (J), Korean (K) and Taiwanese (T).

And these characters may be in a specific encoding based on the OS for
example:

Chinese - GB18030 on Solaris
   UTF-8 on Linux
Japanese - Euc-jp on Solaris
SJIS on windows
UTF-8 on Solaris
Taiwanese - UFT8 on windows and linux
  BIG5 on Solaris
Korean -EUC-Kr on Solaris
UTF8 on windows and linux

I had a glance at the documentation of SQLite, all I could figure reading
few sections of the doc. is that.. SQLite support Unicode (up to UTF-16
LE,BE)
Is it a good idea for me to use SQLite to store the test-data involving the
above set of encoding?

Please adivce.

Cheers!!
Harsha
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQLite Version 3.6.22

2010-01-05 Thread Rich Shepard
On Tue, 5 Jan 2010, D. Richard Hipp wrote:

> It has been our habit for the past several years to do at least one SQLite
> release per month. However, we are thinking of backing off from that
> schedule and releasing every other month. If we stick to this plan, it
> means the next release (3.6.23) will not occur until March.

Richard,

   You have my support for increasing the time between releases to 2-3
months.

   Thank you all for your outstanding efforts.

Rich

-- 
Richard B. Shepard, Ph.D.   |  IntegrityCredibility
Applied Ecosystem Services, Inc.|Innovation
 Voice: 503-667-4517  Fax: 503-667-8863
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] SQLite Version 3.6.22

2010-01-05 Thread D. Richard Hipp
SQLite version 3.6.22 is now available on the SQLite website

 http://www.sqlite.org/
 http://www.sqlite.org/download.html

Version 3.6.22 is a bug-fix release.  There are no new features.  The  
most important changes are that two obscure bugs have been fixed.  The  
bugs are difficult to hit, but if you do hit one it might result in an  
incorrect result from a query.  For that reason, we recommend that all  
users upgrade to version 3.6.22.  Additional information about these  
two bugs, see

http://www.sqlite.org/src/info/31338dca7e
http://www.sqlite.org/src/info/eb5548a849

It has been our habit for the past several years to do at least one  
SQLite release per month.  However, we are thinking of backing off  
from that schedule and releasing every other month.  If we stick to  
this plan, it means the next release (3.6.23) will not occur until  
March.

As always, please let us know if you encounter any difficulties with  
the new release.

D. Richard Hipp
d...@hwaci.com



___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Trigger Not working for SELECT criteria

2010-01-05 Thread Igor Tandetnik
Ram Mandavkar wrote:
> CREATE TABLE "READMODE" ("EPC" VARCHAR(50) COLLATE NOCASE ,"COUNT"
> INTEGER,"STATUS" VARCHAR)
> With 2 records
> 'e006',0,'0'
> 'e2003412DC03011808176518',0,'0'
> 
> //
> --
> Trigger on ReadMode Table
>   // --- //
> CREATE TRIGGER "main"."TR_MULTIREAD_AFTER" AFTER INSERT ON READMODE
>   WHEN( SELECT EPC AS a FROM READMODE where EPC=NEW.EPC AND COUNT=0
> collate nocase )
> 
>   BEGIN
> UPDATE READMODE SET STATUS='1';
>   END
> //
> --
> If i execute this query it works fine
> INSERT INTO READMODE ( EPC,COUNT,STATUS ) VALUES
> ('e2003412DC03011808176518',0,'0')
> 
> If i execute this query it does not work ( UPDATE statement does not get
> execute )
> INSERT INTO READMODE ( EPC,COUNT,STATUS ) VALUES ('e006',0,'0')

For me, your trigger doesn't run regardless of which values are inserted. 
Change it to

CREATE TRIGGER "main"."TR_MULTIREAD_AFTER" AFTER INSERT ON READMODE
   WHEN exists (SELECT EPC AS a FROM READMODE where EPC=NEW.EPC AND COUNT=0)
BEGIN
UPDATE READMODE SET STATUS='1';
END

For some reason, WHEN clause doesn't like a string value as a condition.


Taking a step back - what exactly is your trigger supposed to achieve? It 
doesn't make any sense to me. For one thing, you are updating all rows in 
READMODE, not just the one that was inserted. If the goal is to make sure that, 
whenever a new record is inserted with count=0, its status is set to '1', then 
you want something like this:

CREATE TRIGGER TR_MULTIREAD_AFTER AFTER INSERT ON READMODE
   WHEN new.COUNT = 0
BEGIN
UPDATE READMODE SET STATUS='1' where rowid=new.rowid;
END

Igor Tandetnik

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Trigger Not working for SELECT criteria

2010-01-05 Thread Ram Mandavkar

Hello All,

//
--
ReadMode Table
   // --- //
CREATE TABLE "READMODE" ("EPC" VARCHAR(50) COLLATE NOCASE ,"COUNT"
INTEGER,"STATUS" VARCHAR)
With 2 records
'e006',0,'0'
'e2003412DC03011808176518',0,'0'

//
--
Trigger on ReadMode Table
   // --- //
CREATE TRIGGER "main"."TR_MULTIREAD_AFTER" AFTER INSERT ON READMODE
   WHEN( SELECT EPC AS a FROM READMODE where EPC=NEW.EPC AND COUNT=0
collate nocase )

   BEGIN
UPDATE READMODE SET STATUS='1';
   END
//
--
If i execute this query it works fine  
INSERT INTO READMODE ( EPC,COUNT,STATUS ) VALUES
('e2003412DC03011808176518',0,'0')

If i execute this query it does not work ( UPDATE statement does not get
execute ) 
INSERT INTO READMODE ( EPC,COUNT,STATUS ) VALUES ('e006',0,'0')


Is there any restriction on String Length in select criteria 
as it works for 'e2003412DC03011808176518' and same query does not work for
'e006'

Can any one help me to understand what/where is the problem in select
trigger .
-- 
View this message in context: 
http://old.nabble.com/Trigger-Not-working-for-SELECT-criteria-tp27025539p27025539.html
Sent from the SQLite mailing list archive at Nabble.com.

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] OT: Sqliteman and its future

2010-01-05 Thread Artur Reilin
Hi Petr Vaněk,

i really like the sqliteman, but there are some things that's not so great.

- It seems that it don't support my databases (that are sqlite 2.8.17). I  
cannot open anyone of it. It says everytime, that this is probably not an  
database. But it is sure.
- The insert of lines in the right lower box doesn't work sometimes and do  
nothing or just delete my entries.

(cannot found currently other things)

A little bit more settings would be great and support for databases, that  
has changed. I think there is something in the documentation written, that  
the database (scheme or what is was) is changed, if you use commands like  
alter table or drop column, because they are commands from later releases.  
(If I am wrong, sorry for that. I'm not really sure about this)

And as I know some database settings need to set up at the beginning of  
creating the database. I cannot change things like the "encoding" or such.  
It would be changed, that disturbs me.

I also would like to see an option to have an "database database", there  
all my databases are listed, that I can found the better (the programm  
likes to use the main program path or tries to open the latest database  
(but if the database are moved, then an error is thrown)).

I would like to help you, if I would know how. I could help you with  
testing sqliteman on windows machines and such.

with best wishes

Artur



Am 05.01.2010, 09:02 Uhr, schrieb Petr Vaněk :

> hi all,
>
> I'm contacting you just because I have a special proposal (read: call for
> help) with Sqliteman tool.
>
>
> What is Sqliteman
>
> Sqliteman is a developer's and/or admin's GUI tool for Sqlite3 available  
> as
> opensource/gpl2. It contains the most complete feature set of all tools
> available - regarding TOra (Toad, etc.) working style (SQL based). Its
> homepage can be found at:
>
> http://sqliteman.com
>
>
> What's wrong with this tool?
>
> It's true it evolved into really valuable piece of software with good  
> adoption
> of users. But unfortunately there is only one (me) active developer. And
> situation has been changed last year:
>
> - I don't work with sqlite3 databases now. And I'm a little bit burn out  
> of
> working on something what is not so useful for me.
> - I have totally different time frame for coding just because my family  
> status
> have been changed too.
> - I don't have access to any MS Windows machine, so the Windows native  
> builds
> cannot be done by me.
>
> There are some new features available only in SVN (extensions support,  
> Mac OS
> X native build, bug fixes, editor improvements, etc.) but I cannot force
> myself to do a release - see points above.
>
>
> Conclusion
>
> I'm looking for somebody who can help me to keep this tool alive to  
> avoid lost
> of months of work and quite huge user base. Coders and packagers wanted.  
> I
> think Sqliteman is not complex SW so any development can be started  
> quickly,
> maybe as e.g. student's project (part of programming course/class) etc.  
> I can
> provide any help.
>
>
> all the best, and looking forward any feedback
> Petr Vanek
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>


-- 
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] OT: Sqliteman and its future

2010-01-05 Thread Petr Vaněk
hi all,

I'm contacting you just because I have a special proposal (read: call for 
help) with Sqliteman tool.


What is Sqliteman

Sqliteman is a developer's and/or admin's GUI tool for Sqlite3 available as 
opensource/gpl2. It contains the most complete feature set of all tools 
available - regarding TOra (Toad, etc.) working style (SQL based). Its 
homepage can be found at:

http://sqliteman.com


What's wrong with this tool?

It's true it evolved into really valuable piece of software with good adoption 
of users. But unfortunately there is only one (me) active developer. And 
situation has been changed last year:

- I don't work with sqlite3 databases now. And I'm a little bit burn out of 
working on something what is not so useful for me.
- I have totally different time frame for coding just because my family status 
have been changed too.
- I don't have access to any MS Windows machine, so the Windows native builds 
cannot be done by me.

There are some new features available only in SVN (extensions support, Mac OS 
X native build, bug fixes, editor improvements, etc.) but I cannot force 
myself to do a release - see points above.


Conclusion

I'm looking for somebody who can help me to keep this tool alive to avoid lost 
of months of work and quite huge user base. Coders and packagers wanted. I 
think Sqliteman is not complex SW so any development can be started quickly, 
maybe as e.g. student's project (part of programming course/class) etc. I can 
provide any help.


all the best, and looking forward any feedback
Petr Vanek
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users