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: Ruslan Zasukhin <sunshine at public dot kherson dot ua>
Date: Sat, 29 Jan 2005 12:37:11 +0200
Delivered-to: realbasic-plugins at lists dot realsoftware dot com
On 1/29/05 11:48 AM, "Marco Bambini" <marco at sqlabs dot net> wrote:

Hi Marco,

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

Well, I see your point, although I should say that we dis steps:
    
    - define fields
    - create indexes
    - click OK to create table,

And RB have send us in the correct order:

    CREATE TABLE
    CREATE INDEX.

So it looks like REALbasic have internally construct string of CREATE Index,
And it have construct it with absent name.

I think another solution for REAL can be not disable button as you suggest,
But deffer construction of SQL command CREATE Index, and build it After
CREATE TABLE command was finished.

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

I can say:
    they have bug in the order of creation of SQL strings for commands.


-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft dot com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------


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