Problem with JServerResultSetMetaData

Hi
  On the JServerResultSetMetaData class there is a method to set the
size of the result set column being sent called
'setColumnDisplaySize()'.

Although I'm specifying this to be 30, the char column is being sent
back as 255. Code snippet follows, ...

-----
 JServerResultSetMetaData  jsrsmd =
JContext.createServerResultSetMetaData();
  jsrsmd.setColumnCount(1);

  jsrsmd.setColumnDisplaySize(1, 30);
  jsrsmd.setColumnType(1, Types.CHAR);
  jsrsmd.setColumnName(1, "name");

  JServerResultSet jsrs = JContext.createServerResultSet(jsrsmd);

  jsrs.next();

  jsrs.setString(1, "test");
  jsrs.next();

jsrs.done();
  -----

On the client side (isql for the moment), the the column "name" is a
char 255. In case this has been fixed, I'm using "Version 2.0 Build
20043 on WinNT
Sep 2 1998"

Any help appreciated
Thanks
Asanka


0
Asanka
12/2/1998 7:07:11 PM
sybase.easerver 11371 articles. 0 followers. Follow

5 Replies
611 Views

Similar Articles

[PageSpeed] 49
Get it on Google Play
Get it on Apple App Store

Is this limited to MASP or does it happen with a Java client as well,
checking using the ResultSetMetaData.

Dave Wolf
EAServer Product Team

Asanka Kinigama wrote:

> Hi
>   On the JServerResultSetMetaData class there is a method to set the
> size of the result set column being sent called
> 'setColumnDisplaySize()'.
>
> Although I'm specifying this to be 30, the char column is being sent
> back as 255. Code snippet follows, ...
>
> -----
>  JServerResultSetMetaData  jsrsmd =
> JContext.createServerResultSetMetaData();
>   jsrsmd.setColumnCount(1);
>
>   jsrsmd.setColumnDisplaySize(1, 30);
>   jsrsmd.setColumnType(1, Types.CHAR);
>   jsrsmd.setColumnName(1, "name");
>
>   JServerResultSet jsrs = JContext.createServerResultSet(jsrsmd);
>
>   jsrs.next();
>
>   jsrs.setString(1, "test");
>   jsrs.next();
>
> jsrs.done();
>   -----
>
> On the client side (isql for the moment), the the column "name" is a
> char 255. In case this has been fixed, I'm using "Version 2.0 Build
> 20043 on WinNT
> Sep 2 1998"
>
> Any help appreciated
> Thanks
> Asanka

0
David
12/2/1998 7:09:29 PM
I have also seen this behaviour using MASP, with ISQL as the client.  We
have ignored it for now, since our client code (PowerBuilder) will have
the string lengths hard-coded (i.e. in the datawindow definitions)

- Josh Grant


Asanka Kinigama wrote:

> Hi
>   On the JServerResultSetMetaData class there is a method to set the
> size of the result set column being sent called
> 'setColumnDisplaySize()'.
>
> Although I'm specifying this to be 30, the char column is being sent
> back as 255. Code snippet follows, ...
>
> <code deleted>

0
Josh
12/2/1998 9:39:27 PM
I havent tried with a Java Client yet (it would take some time as well
since
I havent gone through the java client side APIs etc)

In my case we *have* to use MASP as the client is Sybase Replication
Server! It is expecting a result set containing the charset in a char(30)
column... and as Jaguar sends it as a char(255) Rep Server throws it out.

Any ideas on maybe how to get around this for now ?

Asanka

David Wolf wrote:

> Is this limited to MASP or does it happen with a Java client as well,
> checking using the ResultSetMetaData.
>
> Dave Wolf
> EAServer Product Team
>
> Asanka Kinigama wrote:
>
> > Hi
> >   On the JServerResultSetMetaData class there is a method to set the
> > size of the result set column being sent called
> > 'setColumnDisplaySize()'.
> >
> > Although I'm specifying this to be 30, the char column is being sent
> > back as 255. Code snippet follows, ...
> >
> > -----
> >  JServerResultSetMetaData  jsrsmd =
> > JContext.createServerResultSetMetaData();
> >   jsrsmd.setColumnCount(1);
> >
> >   jsrsmd.setColumnDisplaySize(1, 30);
> >   jsrsmd.setColumnType(1, Types.CHAR);
> >   jsrsmd.setColumnName(1, "name");
> >
> >   JServerResultSet jsrs = JContext.createServerResultSet(jsrsmd);
> >
> >   jsrs.next();
> >
> >   jsrs.setString(1, "test");
> >   jsrs.next();
> >
> > jsrs.done();
> >   -----
> >
> > On the client side (isql for the moment), the the column "name" is a
> > char 255. In case this has been fixed, I'm using "Version 2.0 Build
> > 20043 on WinNT
> > Sep 2 1998"
> >
> > Any help appreciated
> > Thanks
> > Asanka



0
Asanka
12/3/1998 12:13:16 PM
The best thing to do would be to open a technical support case so an engineer
can investigate this.  1-800-8SYBASE.

Dave Wolf
EAServer Product Team

Asanka Kinigama wrote:

> I havent tried with a Java Client yet (it would take some time as well
> since
> I havent gone through the java client side APIs etc)
>
> In my case we *have* to use MASP as the client is Sybase Replication
> Server! It is expecting a result set containing the charset in a char(30)
> column... and as Jaguar sends it as a char(255) Rep Server throws it out.
>
> Any ideas on maybe how to get around this for now ?
>
> Asanka
>
> David Wolf wrote:
>
> > Is this limited to MASP or does it happen with a Java client as well,
> > checking using the ResultSetMetaData.
> >
> > Dave Wolf
> > EAServer Product Team
> >
> > Asanka Kinigama wrote:
> >
> > > Hi
> > >   On the JServerResultSetMetaData class there is a method to set the
> > > size of the result set column being sent called
> > > 'setColumnDisplaySize()'.
> > >
> > > Although I'm specifying this to be 30, the char column is being sent
> > > back as 255. Code snippet follows, ...
> > >
> > > -----
> > >  JServerResultSetMetaData  jsrsmd =
> > > JContext.createServerResultSetMetaData();
> > >   jsrsmd.setColumnCount(1);
> > >
> > >   jsrsmd.setColumnDisplaySize(1, 30);
> > >   jsrsmd.setColumnType(1, Types.CHAR);
> > >   jsrsmd.setColumnName(1, "name");
> > >
> > >   JServerResultSet jsrs = JContext.createServerResultSet(jsrsmd);
> > >
> > >   jsrs.next();
> > >
> > >   jsrs.setString(1, "test");
> > >   jsrs.next();
> > >
> > > jsrs.done();
> > >   -----
> > >
> > > On the client side (isql for the moment), the the column "name" is a
> > > char 255. In case this has been fixed, I'm using "Version 2.0 Build
> > > 20043 on WinNT
> > > Sep 2 1998"
> > >
> > > Any help appreciated
> > > Thanks
> > > Asanka

0
David
12/3/1998 1:30:27 PM
Has anyone gotten resolution on this?  I am seeing the same behavior with MASP.

Mark Gendein
Gendein Consulting


David Wolf wrote:

> The best thing to do would be to open a technical support case so an engineer
> can investigate this.  1-800-8SYBASE.
>
> Dave Wolf
> EAServer Product Team
>
> Asanka Kinigama wrote:
>
> > I havent tried with a Java Client yet (it would take some time as well
> > since
> > I havent gone through the java client side APIs etc)
> >
> > In my case we *have* to use MASP as the client is Sybase Replication
> > Server! It is expecting a result set containing the charset in a char(30)
> > column... and as Jaguar sends it as a char(255) Rep Server throws it out.
> >
> > Any ideas on maybe how to get around this for now ?
> >
> > Asanka
> >
> > David Wolf wrote:
> >
> > > Is this limited to MASP or does it happen with a Java client as well,
> > > checking using the ResultSetMetaData.
> > >
> > > Dave Wolf
> > > EAServer Product Team
> > >
> > > Asanka Kinigama wrote:
> > >
> > > > Hi
> > > >   On the JServerResultSetMetaData class there is a method to set the
> > > > size of the result set column being sent called
> > > > 'setColumnDisplaySize()'.
> > > >
> > > > Although I'm specifying this to be 30, the char column is being sent
> > > > back as 255. Code snippet follows, ...
> > > >
> > > > -----
> > > >  JServerResultSetMetaData  jsrsmd =
> > > > JContext.createServerResultSetMetaData();
> > > >   jsrsmd.setColumnCount(1);
> > > >
> > > >   jsrsmd.setColumnDisplaySize(1, 30);
> > > >   jsrsmd.setColumnType(1, Types.CHAR);
> > > >   jsrsmd.setColumnName(1, "name");
> > > >
> > > >   JServerResultSet jsrs = JContext.createServerResultSet(jsrsmd);
> > > >
> > > >   jsrs.next();
> > > >
> > > >   jsrs.setString(1, "test");
> > > >   jsrs.next();
> > > >
> > > > jsrs.done();
> > > >   -----
> > > >
> > > > On the client side (isql for the moment), the the column "name" is a
> > > > char 255. In case this has been fixed, I'm using "Version 2.0 Build
> > > > 20043 on WinNT
> > > > Sep 2 1998"
> > > >
> > > > Any help appreciated
> > > > Thanks
> > > > Asanka

0
Mark
1/29/1999 1:59:02 PM
Reply: