my query fails under a simple 'select * from Events', so the query is not
the problem.

further, i have experimented by slicing up the 2048 char string into 16
columns
of 128 each, and it works fine when each column is only a few bytes, but it
fails when each column gets to be about 64 chars, indicating to me that the
problem is with the total size of the record, not the individual column
size.

On Sat, Aug 2, 2008 at 3:08 PM, David Nelson <[EMAIL PROTECTED]> wrote:

> i have attached ther database -- only 14k
>
> and i use sqlite3.exe, not the command line
>
>
> On Sat, Aug 2, 2008 at 3:03 PM, Robert Simpson <[EMAIL PROTECTED]>wrote:
>
>> Can you give us a download link to the database?  Does your select
>> statement
>> fail in the sqlite3.exe command-line util?
>>
>> -----Original Message-----
>> From: [EMAIL PROTECTED]
>> [mailto:[EMAIL PROTECTED] On Behalf Of David Nelson
>> Sent: Saturday, August 02, 2008 11:44 AM
>> To: [EMAIL PROTECTED]; General Discussion of SQLite Database
>> Subject: Re: [sqlite] Resources for newbies.
>>
>> OK, P Kishor, here is my problem:
>>
>> Getting "logic error or bad data" when using largw data strings:
>>
>>
>> I create the database as follows:
>>    create table Event( Key TEXT[unique], DateTime DATE, Event TEXT,
>> PRIMARY
>> KEY (Key) )
>>
>>
>> I add records to the database as follows:
>>    insert or replace into Event values( 'strKey', '07/25/2008 08:00:00',
>> 'data string' )
>>
>> And I query the database as follows:
>>    SELECT * FROM [Event]  WHERE    ([Event] LIKE "*foo*" AND [Event] LIKE
>> "*bar*") AND    [Date/Time] BETWEEN DateAdd("n",-5,Now()) AND Now()
>>
>>
>>
>> The query works fine when my inserted data strings are small, like < 256
>> bytes.
>>
>> However, I get 'logic error' on the query if my data strings are largere,
>> like 2048 bytes.
>>
>>
>> Can someone explain what I need to do to support larger data strings?
>>
>> (using C++ under Win/XP and amalgom version of sqlite compiled directly in
>> the app)
>>
>>
>>
>>
>> On Sat, Aug 2, 2008 at 2:39 PM, P Kishor <[EMAIL PROTECTED]> wrote:
>>
>> > On 8/2/08, David Nelson <[EMAIL PROTECTED]> wrote:
>> > > Rich,
>> > >  Thanks for your response... I appreciate your suggested references.
>> > >
>> > >  The problem is that while I am an expert on some/many things, SQLite
>> > >  and SQL in general is not among them.  Nor do I have a strong
>> interest
>> > >  in becoming an expert -- I simply have a simple logging application
>> > which
>> > >  has worked fine under Windows Access, but fails under SQLite with an
>> > >  error message which is less than enlightening.
>> > >
>> > >  I was hoping to find an interactive blog where experts would enjoy
>> > helping
>> > >  newbies
>> > >  with specific suggestions.
>> >
>> > This *is* such an "interactive blog." This is the place where experts
>> > and non-experts enjoy helping experts and non-experts with specific
>> > and generic suggestions.
>> >
>> > Just ask, and ye shall be rewarded.
>> >
>> >
>> > >
>> > >  Thanks again.
>> > >  dave
>> > >
>> > >  On Sat, Aug 2, 2008 at 10:03 AM, Rich Shepard <
>> [EMAIL PROTECTED]
>> > >wrote:
>> > >
>> > >
>> > >  > On Fri, 1 Aug 2008, David Nelson wrote:
>> > >  >
>> > >  > > You addressed Dwight's example, but not his question -- which is
>> > whether
>> > >  > > there is a resource for answering questions like this.
>> > >  >
>> > >  > dave,
>> > >  >
>> > >  >   I thought that my recommendation of Mike Owens' book was a
>> pointer
>> > to a
>> > >  > reference that would answer questions such as this.
>> > >  >
>> > >  >   Regardless, here's another one: Rick van der Laan's "Introduction
>> to
>> > SQL,
>> > >  > 4th Edition." It is an outstanding introduction to DDL (Data
>> > Definition
>> > >  > Language; that is, how to design and normalize a database schema)
>> and
>> > DML
>> > >  > (Data Manipulation Language; that is, how to enter, retrieve, and
>> > alter
>> > >  > data
>> > >  > in tables).
>> > >  >
>> > >  >   And for those who want to refine their knowledge and skills, I
>> > highly
>> > >  > reccomend any of Joe Celko's books. I read his columns in Data
>> Based
>> > >  > Advisor
>> > >  > in the 1980s and 1990s as well as his books. Last year I had a need
>> to
>> > >  > better understand time-based queries so I wrote to him for pointers
>> to
>> > >  > resources. He recommended Rick's book.
>> > >  >
>> > >  >   As an aside, most dbms have datetime data types but do not fully
>> (or
>> > even
>> > >  > adequately) support time as presented in the SQL standard. Because
>> > most
>> > >  > business (and scientific) databases have a very strong time element
>> > >  > associated with queries and reports this lack surprises me.
>> > >  >
>> > >  >   Anyway, Dave, if that's not sufficient, please ask and I'll try
>> to
>> > >  > provide
>> > >  > better answers.
>> > >  >
>> > >  > Rich
>> > >  >
>> > >  > --
>> > >  > Richard B. Shepard, Ph.D.               |  Integrity
>> >  Credibility
>> > >  > Applied Ecosystem Services, Inc.        |            Innovation
>> > >  > <http://www.appl-ecosys.com>     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-users mailing list
>> > >  sqlite-users@sqlite.org
>> > >  http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>> > >
>> >
>> >
>> > --
>> > Puneet Kishor http://punkish.eidesis.org/
>> > Nelson Institute for Environmental Studies http://www.nelson.wisc.edu/
>> > Open Source Geospatial Foundation (OSGeo) http://www.osgeo.org/
>> > _______________________________________________
>> > 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-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

Reply via email to