Re: [sqlite] SQLite 16 bits
Simon Slavin wrote: > On 25 Mar 2010, at 2:04am, Andi Suhandi wrote: > >> Is there SQLite for 16 bit OS ? >> I want to use sqlite in my program in turbo c++ and running in DOS. > > You can download SQLite as source code, and use whatever C compiler you're > using for your own software to compile it. What you probably want is the > first download link on this page: > > http://www.sqlite.org/download.html > > There is no reason that the source code supplied should not compile properly > on a 16 bit OS. However, you may need to make minor changes to some of the > compiler directives if Turbo C++ makes assumptions about word lengths, etc.. > > Simon. It will not work, there are many problems with memory allocation, huge far near etc. pointers, memory models... -- Zaga You have worked and not worked. Not working is the hardest work of all. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] debugging sqlite with gdb
Mohammad Reaz Uddin wrote: > I downloaded 'sqlite-amalgamation-3.6.16.tar.gz' and used makefile to > compile it. > sqlite is a shell script, wrapper to a compiled binary in .libs directory. -- Zaga You have worked and not worked. Not working is the hardest work of all. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] debugging sqlite with gdb
> I downloaded 'sqlite-amalgamation-3.6.16.tar.gz' and used makefile to > compile it. > sqlite is a shell script, wrapper to a compiled binary in .libs directory. -- Zaga You have worked and not worked. Not working is the hardest work of all. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] (no subject)
> Hello. > > I'm using SQLite with a VB wrapper (dhSQLite) for VB6. > > The following SQL string works fine for putting together a recordset where > the DATE field contains only the date of the last day of each month. > > > SQLString = "SELECT date(Date,'start of month','+1 month','-1 day') as > Date, " & _ > "First(Open,ID) as Open, Max(High) as High, " & _ > "Min(Low) as Low, Last(Close,ID) as Close FROM [" & sTable & > "] GROUP By Year, Month" > > > Each record represents the Open, High, Low, Close price for a complete > month, and is represented by the last day of the month. > > So we have... > > 2009-01-31 > 2009-02-28 > 2009-03-31 > 2009-04-30 > ... > > It is currently in the -mm-dd format. > > The line "date(Date,'start of month','+1 month','-1 day') as Date" is what > formats the month date to be the last day of the month. > > MY PROBLEM: > > I would like the date format to be either (mm/dd/) or (dd/mm/) > depending on the user's system date format. > > In the US, we use mm/dd/. > > I'm completely lost on how to do this within the SELECT statement above. > > Can someone suggest? > > Thanks. > > Webbiz select strftime ('%m/%d/%Y', Date,'start of month','+1 month','-1 day') from ... -- Zaga You have worked and not worked. Not working is the hardest work of all. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] initcap function (patch for icu.c)
Hello, here is a patch which adds initcap function for use with icu.c (which uses the icu4c library - International Components for Unicode). SQL syntax for use of initcap is similar to lower or upper functions (see documentation in the file ext/icu/README.txt. If you need it (or like it) use it freely. Otherwise, ignore it. :) --- patch --- diff -Nru sqlite-3.6.7-orig/ext/icu/icu.c sqlite-3.6.7/ext/icu/icu.c --- sqlite-3.6.7-orig/ext/icu/icu.c 2008-11-05 23:38:52.0 +0100 +++ sqlite-3.6.7/ext/icu/icu.c 2008-12-20 01:37:53.0 +0100 @@ -26,6 +26,8 @@ ** ** * An implementation of the LIKE operator that uses ICU to ** provide case-independent matching. +** +** gcc -shared icu.c `icu-config --ldflags` -o libSqliteIcu.so */ #if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_ICU) @@ -348,7 +350,9 @@ return; } - if( sqlite3_user_data(p) ){ + if( sqlite3_user_data(p) == (void*)2){ +u_strToTitle(zOutput, nOutput/2, zInput, nInput/2, NULL, zLocale, ); + }else if( sqlite3_user_data(p) == (void*)1){ u_strToUpper(zOutput, nOutput/2, zInput, nInput/2, zLocale, ); }else{ u_strToLower(zOutput, nOutput/2, zInput, nInput/2, zLocale, ); @@ -454,20 +458,24 @@ void *pContext; /* sqlite3_user_data() context */ void (*xFunc)(sqlite3_context*,int,sqlite3_value**); } scalars[] = { -{"regexp",-1, SQLITE_ANY, 0, icuRegexpFunc}, +{"regexp", -1, SQLITE_ANY, 0, icuRegexpFunc}, -{"lower", 1, SQLITE_UTF16,0, icuCaseFunc16}, -{"lower", 2, SQLITE_UTF16,0, icuCaseFunc16}, -{"upper", 1, SQLITE_UTF16, (void*)1, icuCaseFunc16}, -{"upper", 2, SQLITE_UTF16, (void*)1, icuCaseFunc16}, - -{"lower", 1, SQLITE_UTF8, 0, icuCaseFunc16}, -{"lower", 2, SQLITE_UTF8, 0, icuCaseFunc16}, -{"upper", 1, SQLITE_UTF8, (void*)1, icuCaseFunc16}, -{"upper", 2, SQLITE_UTF8, (void*)1, icuCaseFunc16}, +{"lower",1, SQLITE_UTF16,0, icuCaseFunc16}, +{"lower",2, SQLITE_UTF16,0, icuCaseFunc16}, +{"upper",1, SQLITE_UTF16, (void*)1, icuCaseFunc16}, +{"upper",2, SQLITE_UTF16, (void*)1, icuCaseFunc16}, +{"initcap", 1, SQLITE_UTF16, (void*)2, icuCaseFunc16}, +{"initcap", 2, SQLITE_UTF16, (void*)2, icuCaseFunc16}, + +{"lower",1, SQLITE_UTF8, 0, icuCaseFunc16}, +{"lower",2, SQLITE_UTF8, 0, icuCaseFunc16}, +{"upper",1, SQLITE_UTF8, (void*)1, icuCaseFunc16}, +{"upper",2, SQLITE_UTF8, (void*)1, icuCaseFunc16}, +{"initcap", 1, SQLITE_UTF8, (void*)2, icuCaseFunc16}, +{"initcap", 2, SQLITE_UTF8, (void*)2, icuCaseFunc16}, -{"like", 2, SQLITE_UTF8, 0, icuLikeFunc}, -{"like", 3, SQLITE_UTF8, 0, icuLikeFunc}, +{"like", 2, SQLITE_UTF8, 0, icuLikeFunc}, +{"like", 3, SQLITE_UTF8, 0, icuLikeFunc}, {"icu_load_collation", 2, SQLITE_UTF8, (void*)db, icuLoadCollation}, }; --- patch --- -- Zaga You have worked and not worked. Not working is the hardest work of all. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users