in

System.Data.SQLite

An open source ADO.NET provider for the SQLite database engine

Bug or My Error?

Last post 11-17-2008 7:11 AM by rhencke. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 11-15-2008 11:01 AM

    • rkulp
    • Top 10 Contributor
    • Joined on 06-28-2008
    • Rural Coffee County, Tennessee
    • Posts 73

    Bug or My Error?

    This is probably just my ignorance. If I try to execute the following query in the designer in VS 2005, the program crashes and restarts:

    SELECT * FROM tablename WHERE date(DateVar) BETWEEN '2008-02-01' AND '2008-10-31' ORDER BY Var1,Var2

    Assume that Var1 and Var2 are string variables and DateVar is a datetime variable. Is this an invalid query, a bug or something else?

    Filed under: ,
  • 11-15-2008 11:22 AM In reply to

    • rkulp
    • Top 10 Contributor
    • Joined on 06-28-2008
    • Rural Coffee County, Tennessee
    • Posts 73

    Re: Bug or My Error?

    This works fine in the designer:

    SELECT * FROM tablename WHERE DateVar BETWEEN @DateVar1 AND @DateVar2 ORDER BY Var1,Var2

     

  • 11-15-2008 1:46 PM In reply to

    Re: Bug or My Error?

    I think your query is okay.  It may be a bug in the designer.

  • 11-15-2008 2:00 PM In reply to

    Re: Bug or My Error?

    Without an error message I couldn't say.  I doubt its a designer bug.  Most all of the code in the query designer is VS code.

     

  • 11-16-2008 6:34 AM In reply to

    • rkulp
    • Top 10 Contributor
    • Joined on 06-28-2008
    • Rural Coffee County, Tennessee
    • Posts 73

    Re: Bug or My Error?

    Robert,

    This is what was in the event viewer:

    Log Name:      Application
    Source:        Application Error
    Date:          11/16/2008 7:22:57 AM
    Event ID:      1000
    Task Category: (100)
    Level:         Error
    Keywords:      Classic
    User:          N/A
    Computer:      ***-PC
    Description:
    Faulting application devenv.exe, version 8.0.50727.867, time stamp 0x45d2c842, faulting module vdt80.dll, version 8.0.50727.762, time stamp 0x45716c58, exception code 0xc0000005, fault offset 0x0004f839, process id 0x1a64, application start time 0x01c947ee2fd2c320.
    Event Xml:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
      <System>
        <Provider Name="Application Error" />
        <EventID Qualifiers="0">1000</EventID>
        <Level>2</Level>
        <Task>100</Task>
        <Keywords>0x80000000000000</Keywords>
        <TimeCreated SystemTime="2008-11-16T13:22:57.000Z" />
        <EventRecordID>9245</EventRecordID>
        <Channel>Application</Channel>
        <Computer>***-PC</Computer>
        <Security />
      </System>
      <EventData>
        <Data>devenv.exe</Data>
        <Data>8.0.50727.867</Data>
        <Data>45d2c842</Data>
        <Data>vdt80.dll</Data>
        <Data>8.0.50727.762</Data>
        <Data>45716c58</Data>
        <Data>c0000005</Data>
        <Data>0004f839</Data>
        <Data>1a64</Data>
        <Data>01c947ee2fd2c320</Data>
      </EventData>
    </Event>

    It is clearly the date function. I ran

    SELECT * FROM Attendance WHERE DateOfService BETWEEN @Date1 AND @Date2

    and it worked perfectly. However

    SELECT * FROM Attendance WHERE date(DateOfService) BETWEEN @Date1 AND @Date2

    caused a crash without error message.

  • 11-17-2008 7:11 AM In reply to

    Re: Bug or My Error?

    Sorry, Robert.. I should have clarified.  I didn't mean the SQLite-specific portion of the designer, just that it wasn't in the query itself.
Page 1 of 1 (6 items)
Powered by Community Server (Commercial Edition), by Telligent Systems