Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 10 of 11 total
Thread create index
Wed, May 2 2007 4:27 PMPermanent Link

Paul Waegemans
sql.add('CREATE INDEX   IF NOT EXISTS "info"   ON betalingen (info DESC); ');
execsql;


does not work in version 3.30
Wed, May 2 2007 6:06 PMPermanent Link

"Robert"

"Paul Waegemans" <paul.waegemans@imseuro.be> wrote in message
news:B2DB8B96-00BE-44AF-8D06-8885B66A78F7@news.elevatesoft.com...
> sql.add('CREATE INDEX   IF NOT EXISTS "info"   ON betalingen (info DESC);
> ');
> execsql;
>
>
> does not work in version 3.30
>

Correct.

Robert

Thu, May 3 2007 3:04 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Paul


If my aging memory serves correctly V3 didn't have the IF NOT EXISTS syntax

Roy Lambert
Thu, May 3 2007 3:54 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Paul,

<< sql.add('CREATE INDEX   IF NOT EXISTS "info"   ON betalingen (info DESC);
');
execsql;

does not work in version 3.30 >>

Roy is correct - IF NOT EXISTS did not exist (Smiley in 3.x.

--
Tim Young
Elevate Software
www.elevatesoft.com

Sat, May 5 2007 6:16 AMPermanent Link

Paul Waegemans
"Tim Young [Elevate Software]" <timyoung@elevatesoft.com> wrote:

Paul,

<< sql.add('CREATE INDEX   IF NOT EXISTS "info"   ON betalingen (info DESC);
');
execsql;

does not work in version 3.30 >>

Roy is correct - IF NOT EXISTS did not exist (Smiley in 3.x.

--
Tim Young
Elevate Software
www.elevatesoft.com


Tim,

The following code is working under 3.30:

with frmhoofdmenu.sqlindexen do
            begin
            sql.clear;
            databasename:=hoofd.datapad;
            sql.add('CREATE INDEX   IF NOT EXISTS "wedstrijddatum"   ON wed_kalender (wedstrijddatum,wed_uur); ');
            sql.add('CREATE INDEX   IF NOT EXISTS "kleedkamer"   ON wed_kalender (kleedkamer); ');
            sql.add('CREATE INDEX   IF NOT EXISTS "terrein"   ON wed_kalender (terein); ');
            sql.add('CREATE INDEX   IF NOT EXISTS "wed_type"   ON wed_kalender (wed_type); ');
            sql.add('CREATE INDEX   IF NOT EXISTS "reekscat_ID"   ON wed_kalender (reekscat_ID); ');
            sql.add('CREATE INDEX   IF NOT EXISTS "wed_type_ID"   ON wed_kalender (wed_type_ID); ');
            sql.add('CREATE INDEX   IF NOT EXISTS "WED_ID"   ON wed_kalender (wed_ID); ');
            sql.add('CREATE INDEX   IF NOT EXISTS "info"   ON betalingen (info DESC); ');
            sql.add('CREATE INDEX   IF NOT EXISTS "reekscat_ID"   ON reekscategorie (reekscat_ID); ');
            sql.add('CREATE INDEX   IF NOT EXISTS "straat"   ON leden (straat); ');
            sql.add('CREATE INDEX   IF NOT EXISTS "telefoon"   ON leden (telefoon); ');

            sql.Add('UPDATE ledenlidgeld SET betaald=false where betaald=NULL ');

            execsql;
            end;


and the error is because of the line

sql.add('CREATE INDEX   IF NOT EXISTS "info"   ON betalingen (info DESC); ');  (I added this line afterwards)

How can you explain because the error is not because of IF NOT EXISTS  ???????  


Paul.




Attachments: ERROR.jpg
Sat, May 5 2007 7:16 AMPermanent Link

Eryk Bottomley
Tim,

>
> Roy is correct - IF NOT EXISTS did not exist (Smiley in 3.x.
>

Errr ...yes it did/does. It was implemented in 3.04. The problem here is
the (attempted) field level DESC specifier isn't it? This needs to be
moved outside the parentheses?

Eryk
Sat, May 5 2007 7:26 AMPermanent Link

Paul Waegemans
Eryk Bottomley <no@way.com> wrote:

Tim,

>
> Roy is correct - IF NOT EXISTS did not exist (Smiley in 3.x.
>

Errr ...yes it did/does. It was implemented in 3.04. The problem here is
the (attempted) field level DESC specifier isn't it? This needs to be
moved outside the parentheses?

Eryk

Eryk,

IF NOT EXISTS works correctly in 3.30 but the problem is DESC

If I move out of the parenthesis I got the attached error1

sql.add('CREATE INDEX   IF NOT EXISTS "info"   ON betalingen (info) DESC; ');

Paul.



Attachments: ERROR1.jpg
Mon, May 7 2007 12:17 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Paul,

<<sql.add('CREATE INDEX   IF NOT EXISTS "info"   ON betalingen (info DESC);
');  (I added this line afterwards)

How can you explain because the error is not because of IF NOT EXISTS
???????   >>

My apologies - I had a brain fart and got my older versions mixed up.  Is
INFO a memo or blob field ?

--
Tim Young
Elevate Software
www.elevatesoft.com

Mon, May 7 2007 12:30 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Eryk,

<< Errr ...yes it did/does. It was implemented in 3.04. >>

Yes, you're right.  This is the reason why we discontinue older major
versions. Smiley

<< The problem here is the (attempted) field level DESC specifier isn't it?
This needs to be moved outside the parentheses? >>

No, the problem is most likely that Info is a memo/BLOB field.

--
Tim Young
Elevate Software
www.elevatesoft.com

Fri, May 11 2007 4:25 AMPermanent Link

Paul Waegemans
"Tim Young [Elevate Software]" <timyoung@elevatesoft.com> wrote:

Eryk,

<< Errr ...yes it did/does. It was implemented in 3.04. >>

Yes, you're right.  This is the reason why we discontinue older major
versions. Smiley

<< The problem here is the (attempted) field level DESC specifier isn't it?
This needs to be moved outside the parentheses? >>

No, the problem is most likely that Info is a memo/BLOB field.

--
Tim Young
Elevate Software
www.elevatesoft.com



Tim,

INFO is a string field...

Paul.
Page 1 of 2Next Page »
Jump to Page:  1 2
Image