dbTalk Databases Forums  

Query with convert() an replicate()

comp.databases.btrieve comp.databases.btrieve


Discuss Query with convert() an replicate() in the comp.databases.btrieve forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Michael Schwarz
 
Posts: n/a

Default Query with convert() an replicate() - 04-14-2010 , 08:47 AM






Hi,

I've built the following simple query to generate a bar of the length of
the number of users (as an example):
select convert(replicate('#', count(*)), SQL_CHAR) from "X$User"
This works great with Pervasive 9.50. But using Pervasive 9.71 or 10.30
the ControlCenter returns a message "java.io.EOFException".
Is there anything wrong in the query or is that a bug in newer Pervasive
engines?

I've found the following workaround:
select CAST(replicate('#', count(*)) as VARCHAR(200)) from "X$User"
works on all mentioned Engines, so my acute problem is solved. But I
can't find an error in the query. Any idea?

Thanks in advance,
Michael

Reply With Quote
  #2  
Old   
BtrieveBill
 
Posts: n/a

Default Re: Query with convert() an replicate() - 04-20-2010 , 02:29 PM






Looks like a problem with the PCC/JDBC only.

When I run my tests on PSQLv10, the first two statements work, the last
two fail:

select replicate('#', 5);
select convert(replicate('#', 5), SQL_LONGVARCHAR);
select convert(replicate('#', 5), SQL_VARCHAR);
select convert(replicate('#', 5), SQL_CHAR);


If I run them in ODBCTest instead, they all work.

Either convert to SQL_LONGVARCHAR, or eliminate the CONVERT altogether.
Goldstar Software Inc.
Pervasive-based Products, Training & Services
Bill Bach (From Honolulu, HI)
BillBach (AT) goldstarsoftware (DOT) com
http://www.goldstarsoftware.com
*** PSQL Service & Support Class - June 2010 ***


Michael Schwarz wrote:
Quote:
Hi,

I've built the following simple query to generate a bar of the length of
the number of users (as an example):
select convert(replicate('#', count(*)), SQL_CHAR) from "X$User"
This works great with Pervasive 9.50. But using Pervasive 9.71 or 10.30
the ControlCenter returns a message "java.io.EOFException".
Is there anything wrong in the query or is that a bug in newer Pervasive
engines?

I've found the following workaround:
select CAST(replicate('#', count(*)) as VARCHAR(200)) from "X$User"
works on all mentioned Engines, so my acute problem is solved. But I
can't find an error in the query. Any idea?

Thanks in advance,
Michael

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 - 2012, Jelsoft Enterprises Ltd.