realbasic-nug
[Top] [All Lists]

Re: Stupid number formatting error...

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: Stupid number formatting error...
From: Phil M <phil at mobleybros dot com>
Date: Thu, 28 Sep 2006 11:09:12 -0700
Delivered-to: listarchive at realsoftware dot com
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <E6C777A4-A7A3-4B58-AE70-D25AEB853F53 at mobleybros dot com> <588988DF-3BEC-4F97-86F3-534D5AA90A1D at great-white-software dot com> <3A20637A-6750-4393-831E-5DC724B77A1D at mobleybros dot com> <07D5B1DF-3DA7-4C9B-AD9B-57E3CF58652A at great-white-software dot com> <27C66315-CE04-4BAE-B72D-C04E74A67827 at mobleybros dot com> <AB1A7CE0-98AD-4A6D-A1EC-9BE58A3A79CD at great-white-software dot com>
On Sep 28, 2006, at 10:40 AM, Norman Palardy wrote:

Hard to know if it SQLite forgiving things that it should not or just the error not being reported A quick test here suggest SQLIte does give you an error when there are more values than columns in something like

        create table test ( a integer , b varchar(100) )
        insert into test ( a , b ) values ( 1,1,1,1 )

In my test app using the older SQLIte plugin I do get an error saying "4 values for 2 columns"

Trying to reproduce the issue here in a sample app, I get a similar error message. In other words, REALSQLdatabase is behaving as expected.

I need to look into this more.  My code below:

-----------

  Dim DB As New REALSQLDatabase
  Dim rs As RecordSet

  If Not DB.Connect Then
    MsgBox "Cannot connect to the In-Memory database."
  Else
DB.SQLExecute("CREATE TABLE testTable ( ivalue INTEGER , dvalue DOUBLE )")
    If DB.Error Then
MsgBox "Error on CREATE TABLE: [" + Str(DB.ErrorCode) + "] " + DB.ErrorMessage
    Else
      DB.Commit
    End If
  End If

DB.SQLExecute("INSERT INTO testTable ( ivalue, dvalue ) VALUES ( 15, 103,58 )")

  If DB.Error Then
MsgBox "Error on INSERT: [" + Str(DB.ErrorCode) + "] " + DB.ErrorMessage
  Else
    DB.Commit
  End If

  rs = DB.SQLSelect("SELECT dvalue FROM testTable")

If Not (rs Is Nil) Then MsgBox Format(rs.RecordCount, "0") + " records."

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>