|
Home > Archive > SQL Anywhere ultralite > February 2006 > insert from select in asa9 on palm
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 |
insert from select in asa9 on palm
|
|
| Michal Seliga 2006-02-06, 11:23 am |
| i use sybase asa 9.0.2.3249, static c++, library with a5jumptable and all this
with codewarrior 9.3
in project i used such statement
insert into itineraryrows(itn_id
,itnr_nr,cus_id,itnr
_seqno,itnr_flags)
select ? as itnid, /*primary key*/
ifnull(max(itnr_nr),
1,max(itnr_nr)+1),
/*primary key*/
cast(? as integer),
ifnull(max(itnr_seqn
o),1,max(itnr_seqno)
+1),
cast(? as integer)
from itineraryrows
where itn_id=itnid
this worked flawlessly with asa7.0.4. i used this to save new row to table which
belonged to one header independent on how many rows already belonged to this header
this is not working in 9.0.2. if i add more rows it saves only first one and on
all others i get sqlcode -193
i don't know if i should report this as bug or if there is any reason why this
doesn't work.... (i know that in asa9 i should use dynamic api... but rewriting
everything will take a lot of time).
so far i have workaround with one select which gives me the biggest itnr_nr
value and simple insert to save data so i don't really rely on this, its mainly
curiosity....
| |
| David Fishburn 2006-02-07, 9:23 am |
| Michal Seliga <michal.seliga@visicom.sk> wrote in
news:43e781a7$1@foru
ms-2-dub of sybase.public.sqlanywhere.ultralite:
MS> this worked flawlessly with asa7.0.4. i used this to save new row to
MS> table which belonged to one header independent on how many rows
MS> already belonged to this header
MS>
MS> this is not working in 9.0.2. if i add more rows it saves only first
MS> one and on all others i get sqlcode -193
If you have a reproducable, it is best to submit this to technical
support.
The code looks fine to me.
--
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]
| |
| Michal Seliga 2006-02-07, 1:23 pm |
| ok, i submitted it as case #11202566
|
|
|
|
|