Home > Archive > SQL Anywhere ultralite > October 2005 > 9.0.2.3137 - INSERT crashes ulisql









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author 9.0.2.3137 - INSERT crashes ulisql
rr12

2005-10-27, 7:41 am

When I run the following sql statement in ulisql...

CREATE TABLE test (ID LONG VARCHAR NOT NULL PRIMARY KEY)

followed by...

INSERT INTO test (ID) values ('Test Value')

ulisql crashes.

Can anyone (1) duplicate this error or (2) tell me what I'm doing wrong?

Thanks

rr12


Tom Slee

2005-10-27, 7:41 am

This is a ulisql limitation to do with LONG VARCHAR columns.

UltraLite has some limits on what it can do with LONG VARCHAR (see
"UltraLite Database User's Guide > SQL Language Elements > Data types in
UltraLite" where it says "The only operations allowed on LONG VARCHAR
columns are to insert, update, or delete them, or to include them in the
select-list of a query.") ulisql tries to convert between LONG VARCHAR
and a string, an operation that is not supported.

So, yes it is a limitation and one that will not be present in the next
major release. However, I would also ask if you really need a LONG
VARCHAR as a primary key (or did you supply this just as the simplest
possible reproducible case?)

Tom Slee
iAnywhere Solutions

rr12 wrote:
> When I run the following sql statement in ulisql...
>
> CREATE TABLE test (ID LONG VARCHAR NOT NULL PRIMARY KEY)
>
> followed by...
>
> INSERT INTO test (ID) values ('Test Value')
>
> ulisql crashes.
>
> Can anyone (1) duplicate this error or (2) tell me what I'm doing wrong?
>
> Thanks
>
> rr12
>
>

rr12

2005-10-27, 7:41 am

Yes, that was just a test. The actual long varchar field I'm using is not
part of any key.

FYI - I upgraded to 3193 and now the result is slightly different. The
INSERT now works but the database is now corrupted and unusable. Any
further operations, including just opening it crash ulisql. Shouldn't there
be some sort of error thrown so that we don't hose our databases
accidentally?

rr12

"Tom Slee" <Tom.Slee@ianywhere.com> wrote in message
news:434289de$1@foru
ms-2-dub...[color=darkred]
> This is a ulisql limitation to do with LONG VARCHAR columns.
>
> UltraLite has some limits on what it can do with LONG VARCHAR (see
> "UltraLite Database User's Guide > SQL Language Elements > Data types in
> UltraLite" where it says "The only operations allowed on LONG VARCHAR
> columns are to insert, update, or delete them, or to include them in the
> select-list of a query.") ulisql tries to convert between LONG VARCHAR and
> a string, an operation that is not supported.
>
> So, yes it is a limitation and one that will not be present in the next
> major release. However, I would also ask if you really need a LONG VARCHAR
> as a primary key (or did you supply this just as the simplest possible
> reproducible case?)
>
> Tom Slee
> iAnywhere Solutions
>
> rr12 wrote:

David Fishburn

2005-10-27, 7:41 am

"rr12" <abc@123.com> wrote in news:4342b187$1@foru
ms-2-dub of
sybase.public.sqlanywhere.ultralite:

rr12> Yes, that was just a test. The actual long varchar field I'm using
is
rr12> not part of any key.
rr12>
rr12> FYI - I upgraded to 3193 and now the result is slightly different.
rr12> The INSERT now works but the database is now corrupted and
unusable.
rr12> Any further operations, including just opening it crash ulisql.
rr12> Shouldn't there be some sort of error thrown so that we don't hose
our
rr12> databases accidentally?

Yes, of course. You should submit your test cases via CaseXpress, so we
have a reproducable and can correct the issue.

Really, UL should give an error when a user attempts to create a table
with a primary key of type LONG VARCHAR.

Can you repeat your test using an INT DEFAULT AUTOINCREMENT as the
primary key.

--
David Fishburn
Certified ASA Developer Version 8
iAnywhere Solutions - Sybase
Professional Services
Please only post to the newsgroup
Please ALWAYS include version and MORE importantly BUILD number with
EACH post (dbeng9 -v).

EBFs and Maintenance Releases
http://downloads.sybase.com/swx/sdmain.stm

Developer Community / Whitepapers
http://www.ianywhere.com/developer

CaseXpress - to report bugs
http://casexpress.sybase.com

CodeXchange - Free samples
[url]http://ianywhere.codexchange.sybase.com/servlets/ ProjectDocumentList[
/url]

rr12

2005-10-27, 7:41 am

Ok. I just was trying to nail things down a bit before I submitted a case.

If I use...

CREATE TABLE testX (ID INT DEFAULT AUTOINCREMENT PRIMARY KEY,
TASK LONG VARCHAR NOT NULL)

....and then...

INSERT INTO testX (ID, TASK) VALUES (5, 'Hello')

....then there is no crash.

However, if I use "Select * from testX" then I only see the 'H' in the task
column.

rr12


"David Fishburn" <fishburn_spam@off.ianywhere.com> wrote in message
news:Xns96E58B5E7A6B
7fishburnsybasecom@1
27.0.0.1...
> "rr12" <abc@123.com> wrote in news:4342b187$1@foru
ms-2-dub of
> sybase.public.sqlanywhere.ultralite:
>
> rr12> Yes, that was just a test. The actual long varchar field I'm using
> is
> rr12> not part of any key.
> rr12>
> rr12> FYI - I upgraded to 3193 and now the result is slightly different.
> rr12> The INSERT now works but the database is now corrupted and
> unusable.
> rr12> Any further operations, including just opening it crash ulisql.
> rr12> Shouldn't there be some sort of error thrown so that we don't hose
> our
> rr12> databases accidentally?
>
> Yes, of course. You should submit your test cases via CaseXpress, so we
> have a reproducable and can correct the issue.
>
> Really, UL should give an error when a user attempts to create a table
> with a primary key of type LONG VARCHAR.
>
> Can you repeat your test using an INT DEFAULT AUTOINCREMENT as the
> primary key.
>
> --
> David Fishburn
> Certified ASA Developer Version 8
> iAnywhere Solutions - Sybase
> Professional Services
> Please only post to the newsgroup
> Please ALWAYS include version and MORE importantly BUILD number with
> EACH post (dbeng9 -v).
>
> EBFs and Maintenance Releases
> http://downloads.sybase.com/swx/sdmain.stm
>
> Developer Community / Whitepapers
> http://www.ianywhere.com/developer
>
> CaseXpress - to report bugs
> http://casexpress.sybase.com
>
> CodeXchange - Free samples
> [url]http://ianywhere.codexchange.sybase.com/servlets/ ProjectDocumentList[
/url]
>



David Fishburn

2005-10-27, 7:41 am

"rr12" <abc@123.com> wrote in news:4342cfcf$1@foru
ms-1-dub of
sybase.public.sqlanywhere.ultralite:


rr12> However, if I use "Select * from testX" then I only see the 'H' in
the
rr12> task column.

I believe Tom's response covered that, due to conversion.
--
David Fishburn
Certified ASA Developer Version 8
iAnywhere Solutions - Sybase
Professional Services
Please only post to the newsgroup
Please ALWAYS include version and MORE importantly BUILD number with
EACH post (dbeng9 -v).

EBFs and Maintenance Releases
http://downloads.sybase.com/swx/sdmain.stm

Developer Community / Whitepapers
http://www.ianywhere.com/developer

CaseXpress - to report bugs
http://casexpress.sybase.com

CodeXchange - Free samples
[url]http://ianywhere.codexchange.sybase.com/servlets/ ProjectDocumentList[
/url]

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com