Re: [sqlite] More on 'Works only for short strings'

2008-08-03 Thread Teg
Hello David,

Sunday, August 3, 2008, 3:29:10 PM, you wrote:

DN> PROBLEM SOLVED

DN> Thank you Hans-Jürgen.

DN> Your suggestion to disable msvc compiler optimizations seems to
DN> have solved the problem... I can now create large records.  MSVC
DN> optimizations apparently limited the size to 1024.

DN> Sorry for all the trouble I caused.  Perhaps we learned something... for
DN> sure, I did.

DN> I can't thank you enough.

DN> dave

DN> On Sun, Aug 3, 2008 at 12:40 PM, Hans-Juergen Taenzer <
DN> [EMAIL PROTECTED]> wrote:

>> David Nelson  ([EMAIL PROTECTED]) wrote:
>>
>> > Am now thinking there's something wrong with how sqlite gets
>> > compiled (using MS Vers 6 Visual Studio)
>>
>> Switch off all optimisations when compiling.
>> I more often had problems with MSVC in the past.
>>
>> Hans-Jürgen
>> ___
>> sqlite-users mailing list
>> sqlite-users@sqlite.org
>> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>>
DN> ___
DN> sqlite-users mailing list
DN> sqlite-users@sqlite.org
DN> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

My guess is this "fix" is just covering up a coding problem. I used
MSVC6 for years with 02 level optimization and never had an optimizer
problem what wasn't something I caused by assuming initializer values
or something else like that. "Whole Program" optimization though never
worked for me.

You can compile and link the optimized version with debug information
and step through it to see what's going on.

-- 
Best regards,
 Tegmailto:[EMAIL PROTECTED]

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


Re: [sqlite] More on 'Works only for short strings'

2008-08-03 Thread David Nelson
PROBLEM SOLVED

Thank you Hans-Jürgen.

Your suggestion to disable msvc compiler optimizations seems to
have solved the problem... I can now create large records.  MSVC
optimizations apparently limited the size to 1024.

Sorry for all the trouble I caused.  Perhaps we learned something... for
sure, I did.

I can't thank you enough.

dave

On Sun, Aug 3, 2008 at 12:40 PM, Hans-Juergen Taenzer <
[EMAIL PROTECTED]> wrote:

> David Nelson  ([EMAIL PROTECTED]) wrote:
>
> > Am now thinking there's something wrong with how sqlite gets
> > compiled (using MS Vers 6 Visual Studio)
>
> Switch off all optimisations when compiling.
> I more often had problems with MSVC in the past.
>
> Hans-Jürgen
> ___
> 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


Re: [sqlite] More on 'Works only for short strings'

2008-08-03 Thread Alexey Pechnikov
Hello!

See code 
http://paste.pocoo.org/show/81137/

Compile as
gcc sqlite_test.c -o sqlite_test -lsqlite3

Create table log in database log.db as
$ sqlite3 log.db
SQLite version 3.5.9
Enter ".help" for instructions
sqlite> create table log(value); 
sqlite> .q

Start program
./sqlite_test

And see result
$ sqlite3 log.db
SQLite version 3.5.9
Enter ".help" for instructions
sqlite> select length(value) from log;
3325

And "what I'm doing wrong"? :-)

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


Re: [sqlite] More on 'Works only for short strings'

2008-08-03 Thread Hans-Juergen Taenzer
David Nelson  ([EMAIL PROTECTED]) wrote:

> Am now thinking there's something wrong with how sqlite gets
> compiled (using MS Vers 6 Visual Studio)

Switch off all optimisations when compiling.
I more often had problems with MSVC in the past.

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


Re: [sqlite] More on 'Works only for short strings'

2008-08-03 Thread David Nelson
for anyone still having patience with me, here are links to the
created database and a log4.txt file which is the result of sqlite.exe
cmd line doing a select *

this is a link to the database
http://www.savoysoft.com/EvtMgrRequestx05A

this is a link to the log file (corrected)
http://www.savoysoft.com/log4.txt

Notice that each record grows in size until it gets to 1024 total.
Then, i get errors on the UPDATE.

dave

On Sun, Aug 3, 2008 at 11:06 AM, Alexey Pechnikov <[EMAIL PROTECTED]>wrote:

> Hello!
>
> В сообщении от Sunday 03 August 2008 17:57:33 David Nelson написал(а):
> > must be something i said that was confusing...  I've been developing
> > in C++ for over 20 years, programming in general for 45 years!
>
> But why you wan't to try C code? Problem may be with MCF CString or your
> compilation; it's simple to replace CString to char* and identify the
> problem.
>
> Best regards, Alexey.
> ___
> 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


Re: [sqlite] More on 'Works only for short strings'

2008-08-03 Thread David Nelson
for anyone still having patience with me, here are links to the
created database and a log4.txt file which is the result of sqlite.exe
cmd line doing a select *

this is a link to the database
http://www.savoysoft.com/EvtMgrRequestx05A

this is a link to the log file
http://www.savoysoft.com/log4.txt

Notice that each record grows in size until it gets to 1024 total.
Then, i get errors on the UPDATE.

dave

On Sun, Aug 3, 2008 at 11:36 AM, David Nelson <[EMAIL PROTECTED]> wrote:

> ok, good idea and easy to do, so i did it
>
> converted CStrings to char szQ[32768]
>
> unfortunately, same problem
>
>
> On Sun, Aug 3, 2008 at 11:06 AM, Alexey Pechnikov <[EMAIL PROTECTED]>wrote:
>
>> Hello!
>>
>> В сообщении от Sunday 03 August 2008 17:57:33 David Nelson написал(а):
>> > must be something i said that was confusing...  I've been developing
>> > in C++ for over 20 years, programming in general for 45 years!
>>
>> But why you wan't to try C code? Problem may be with MCF CString or your
>> compilation; it's simple to replace CString to char* and identify the
>> problem.
>>
>> Best regards, Alexey.
>> ___
>> 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


Re: [sqlite] More on 'Works only for short strings'

2008-08-03 Thread David Nelson
ok, good idea and easy to do, so i did it

converted CStrings to char szQ[32768]

unfortunately, same problem

On Sun, Aug 3, 2008 at 11:06 AM, Alexey Pechnikov <[EMAIL PROTECTED]>wrote:

> Hello!
>
> В сообщении от Sunday 03 August 2008 17:57:33 David Nelson написал(а):
> > must be something i said that was confusing...  I've been developing
> > in C++ for over 20 years, programming in general for 45 years!
>
> But why you wan't to try C code? Problem may be with MCF CString or your
> compilation; it's simple to replace CString to char* and identify the
> problem.
>
> Best regards, Alexey.
> ___
> 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


Re: [sqlite] More on 'Works only for short strings'

2008-08-03 Thread Alexey Pechnikov
Hello!

В сообщении от Sunday 03 August 2008 17:57:33 David Nelson написал(а):
> must be something i said that was confusing...  I've been developing
> in C++ for over 20 years, programming in general for 45 years!

But why you wan't to try C code? Problem may be with MCF CString or your 
compilation; it's simple to replace CString to char* and identify the 
problem.

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


Re: [sqlite] More on 'Works only for short strings'

2008-08-03 Thread David Nelson
must be something i said that was confusing...  I've been developing
in C++ for over 20 years, programming in general for 45 years!

dave

On Sun, Aug 3, 2008 at 9:41 AM, Alexey Pechnikov <[EMAIL PROTECTED]> wrote:

> Hello!
>
> If you can't write C++ code then write C code. I did send C example some
> time
> ago and there are a lot of examples in internet. Try to write and compile C
> code and after that you'll can start to learn C++.
>
> Best regards, Alexey.
> ___
> 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


Re: [sqlite] More on 'Works only for short strings'

2008-08-03 Thread Alexey Pechnikov
Hello!

If you can't write C++ code then write C code. I did send C example some time 
ago and there are a lot of examples in internet. Try to write and compile C 
code and after that you'll can start to learn C++.

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