realbasic-plugins
[Top] [All Lists]

Re: RBDB API question: Create Index - (bug found)

To: REALbasic Plugins <realbasic-plugins at lists dot realsoftware dot com>
Subject: Re: RBDB API question: Create Index - (bug found)
From: Marco Bambini <marco at sqlabs dot net>
Date: Sat, 29 Jan 2005 10:48:42 +0100
Delivered-to: realbasic-plugins at lists dot realsoftware dot com
References: <BE2074E0 dot 28541%sunshine at public dot kherson dot ua>

On Jan 28, 2005, at 10:01 PM, Ruslan Zasukhin wrote:

Will, Joe,

One of our developers see this 100%
I have see this by own eyes also.

We simply in the GUI of REALbasic
    create new table,
    define 2 fields,
    click button Indexed, set name of index and choose fields
    click Ok.

REALbasic now calls us with

    CREATE TABLE ...

And then

    create index IndexName ON (f1, f2)

I believe we have made everything correctly.


OK, I think I have discovered the bug...

I have tried this sequence with our SQLitePluginPro, and when I call
the create index button I get an "Error: syntax error near (" message.

This is due to the lack of the table name in the sql statement, but at
this point the table isn't yet created because you haven't pressed the OK
button in the table creation dialog...

So this is a bug in the RB GUI because the Create Index button
should be enabled ONLY if the table is already created.

If you first create the table (and press OK) and then create the index,
all works fine.

With some hacking we can make this working,
We can insert the name of table self...
Just now I wonder that you did not see this. Strange.

This isn't the correct behavior, because the create index statement
is executed before the create table statement...

So my short answer is: Yes, there is a bug, but in the RB GUI and not
in the sql statements that RB sends to the db engine...

Best,
Marco Bambini
SQLabs.net

_______________________________________________
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>