dbTalk Databases Forums  

SQLE_SYNTAX_ERROR with UNION

sybase.public.sqlanywhere.ultralite sybase.public.sqlanywhere.ultralite


Discuss SQLE_SYNTAX_ERROR with UNION in the sybase.public.sqlanywhere.ultralite forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Usmanov A.
 
Posts: n/a

Default SQLE_SYNTAX_ERROR with UNION - 09-06-2007 , 10:09 AM






Hi.
In .NET API for PocketPC (ASA 9.0.2.3361) query with UNION raise
SQLE_SYNTAX_ERROR
query = "select 'шт.' as unit_name, 1 as unit_size, 'шт.' as show_name union
all select unit_name, unit_size, unit_name||cast(unit_size as varchar(10))
as show_name from ROSPSKUUnits where sku_id=8910 order by unit_size"
In the InteractiveSQL this query works.

This is full code to run query:
public DataTable OpenQuery(String query,ULTransaction tran) {

ULCommand cmd = new ULCommand(query, _conn,tran); //RAISE ERROR

ULDataReader rst = cmd.ExecuteReader();

ULCursorSchema schema = rst.Schema;

DataTable dt = new DataTable();

for (int i = 0; i < schema.ColumnCount; i++) {

dt.Columns.Add(schema.GetColumnName(i));

}


for (int i = 0; i < rst.RowCount; i++) {

DataRow dr = dt.Rows.Add();

for (int j = 0; j < schema.ColumnCount; j++) {

dr[j] = rst.GetValue(i);

}

}

return dt;

}

Any ideas?


--
Sincerely yours,
Alex Usmanov



Reply With Quote
  #2  
Old   
Usmanov A.
 
Posts: n/a

Default Re: SQLE_SYNTAX_ERROR with UNION - 09-07-2007 , 05:40 AM






Ok, now I read answer in manual:
UNION and FULL OUTER JOIN queries are currently supported only from the
static interfaces.

I use dynamic interface
--
Sincerely yours,
Alex Usmanov
"Usmanov A." <alex_u (AT) pochtamt (DOT) ru> сообщил/сообщила в новостях следующее:
news:46e01831 (AT) forums-1-dub (DOT) ..
Quote:
Hi.
In .NET API for PocketPC (ASA 9.0.2.3361) query with UNION raise
SQLE_SYNTAX_ERROR
query = "select 'шт.' as unit_name, 1 as unit_size, 'шт.' as show_name
union
all select unit_name, unit_size, unit_name||cast(unit_size as varchar(10))
as show_name from ROSPSKUUnits where sku_id=8910 order by unit_size"
In the InteractiveSQL this query works.

This is full code to run query:
public DataTable OpenQuery(String query,ULTransaction tran) {

ULCommand cmd = new ULCommand(query, _conn,tran); //RAISE ERROR

ULDataReader rst = cmd.ExecuteReader();

ULCursorSchema schema = rst.Schema;

DataTable dt = new DataTable();

for (int i = 0; i < schema.ColumnCount; i++) {

dt.Columns.Add(schema.GetColumnName(i));

}


for (int i = 0; i < rst.RowCount; i++) {

DataRow dr = dt.Rows.Add();

for (int j = 0; j < schema.ColumnCount; j++) {

dr[j] = rst.GetValue(i);

}

}

return dt;

}

Any ideas?


--
Sincerely yours,
Alex Usmanov





Reply With Quote
  #3  
Old   
David Fishburn
 
Posts: n/a

Default Re: SQLE_SYNTAX_ERROR with UNION - 09-07-2007 , 07:56 AM



"Usmanov A." <alex_u (AT) pochtamt (DOT) ru> wrote in news:46e12a9c@forums-1-dub of
sybase.public.sqlanywhere.ultralite:

Quote:
In .NET API for PocketPC (ASA 9.0.2.3361) query with UNION raise
Ok, now I read answer in manual:
UNION and FULL OUTER JOIN queries are currently supported only from
the static interfaces.

I use dynamic interface
UNION is supported in UL 10.x


--
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 (dbeng10 -v).

EBFs and Maintenance Releases
http://downloads.sybase.com/

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

Case-Express - to report bugs
http://case-express.sybase.com

CodeXchange - Free samples
http://ianywhere.codexchange.sybase....ctDocumentList



Reply With Quote
  #4  
Old   
Usmanov A.
 
Posts: n/a

Default Re: SQLE_SYNTAX_ERROR with UNION - 09-07-2007 , 09:11 AM



I'm glad, but we use ASA 9.0.2
By the way, now I have interested to PocketBuilder. Last version of
PocketBuilder include ASA10 or ASA9? And what about performance of UL
application written in PocketBuilder in comparasion with UL application
written in VS2005(C#)+UL (both for Windows Mobile platform)?

--
Sincerely yours,
Alex Usmanov
"David Fishburn" <fishburn_spam (AT) off (DOT) ianywhere.com> сообщил/сообщила в
новостях следующее: news:Xns99A45AD2479B4fishburnsybasecom (AT) 127 (DOT) 0.0.1...
Quote:
"Usmanov A." <alex_u (AT) pochtamt (DOT) ru> wrote in news:46e12a9c@forums-1-dub of
sybase.public.sqlanywhere.ultralite:

In .NET API for PocketPC (ASA 9.0.2.3361) query with UNION raise
Ok, now I read answer in manual:
UNION and FULL OUTER JOIN queries are currently supported only from
the static interfaces.

I use dynamic interface

UNION is supported in UL 10.x


--
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 (dbeng10 -v).

EBFs and Maintenance Releases
http://downloads.sybase.com/

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

Case-Express - to report bugs
http://case-express.sybase.com

CodeXchange - Free samples
http://ianywhere.codexchange.sybase....ctDocumentList




Reply With Quote
  #5  
Old   
Chris Keating (Sybase iAnywhere)
 
Posts: n/a

Default Re: SQLE_SYNTAX_ERROR with UNION - 09-08-2007 , 09:09 PM



The developers edition of asa9 ships with PocketBuilder. Performance
shopuld not impacted in any significant way based on client application.

Usmanov A. wrote:
Quote:
I'm glad, but we use ASA 9.0.2
By the way, now I have interested to PocketBuilder. Last version of
PocketBuilder include ASA10 or ASA9? And what about performance of UL
application written in PocketBuilder in comparasion with UL application
written in VS2005(C#)+UL (both for Windows Mobile platform)?

--
Sincerely yours,
Alex Usmanov
"David Fishburn" <fishburn_spam (AT) off (DOT) ianywhere.com> сообщил/сообщила в
новостях следующее: news:Xns99A45AD2479B4fishburnsybasecom (AT) 127 (DOT) 0.0.1...
"Usmanov A." <alex_u (AT) pochtamt (DOT) ru> wrote in news:46e12a9c@forums-1-dub of
sybase.public.sqlanywhere.ultralite:

In .NET API for PocketPC (ASA 9.0.2.3361) query with UNION raise
Ok, now I read answer in manual:
UNION and FULL OUTER JOIN queries are currently supported only from
the static interfaces.

I use dynamic interface
UNION is supported in UL 10.x


--
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 (dbeng10 -v).

EBFs and Maintenance Releases
http://downloads.sybase.com/

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

Case-Express - to report bugs
http://case-express.sybase.com

CodeXchange - Free samples
http://ianywhere.codexchange.sybase....ctDocumentList




Reply With Quote
  #6  
Old   
David Fishburn
 
Posts: n/a

Default Re: SQLE_SYNTAX_ERROR with UNION - 09-10-2007 , 08:18 PM



"Usmanov A." <alex_u (AT) pochtamt (DOT) ru> wrote in news:46e15c24$3@forums-1-dub
of sybase.public.sqlanywhere.ultralite:

UA> By the way, now I have interested to PocketBuilder. Last version of
UA> PocketBuilder include ASA10 or ASA9? And what about performance of UL
UA> application written in PocketBuilder in comparasion with UL
application
UA> written in VS2005(C#)+UL (both for Windows Mobile platform)?

This PK release 2.1.0 officially supports UL 10.
But it does not support synchronization of the UL 10 database. That
will come at some point.
--
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 (dbeng10 -v).

EBFs and Maintenance Releases
http://downloads.sybase.com/

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

Case-Express - to report bugs
http://case-express.sybase.com

CodeXchange - Free samples
http://ianywhere.codexchange.sybase....ctDocumentList


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.