Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Powerbuilder Does Not Support Varchar(>255) ???

678 views
Skip to first unread message

jry

unread,
Mar 28, 2000, 3:00:00 AM3/28/00
to
Hello out there.
I posted a question yesterday about Powerbuilder 6.5.0 and
MS SQLServer 7 and received no response. I am trying again today with
different wording.
MS SQLServer has expanded the varchar datatype to allow much greater than
255 characters which was the previous limit. I am trying to use a comments
varchar(2000) column in a table with Powerbuilder 6.5.0 and pbmss60.dll.
I am using a standard datawindow, nothing fancy or unusual. If you do
dw_1.update() on a comments column where there are more than 255 characters
of actual data, you get the message about the row having been changed
between the time you retrieved it and tried to update it. This is incorrect
of course because it is trying to compare the 255 it retrieved to the 255+
which is actually in the database. Can someone please answer these 2
questions.
1) Can Powerbuilder 6.5.0 run with MS SQL Server 7. using the pbmss60.dll
native driver (or is there another native driver out which would work) ?
2) Can Powerbuilder datawindows support a varchar column with greater than
255 characters?
I much prefer using varchar(2000) to text but I need to get this resolved
quickly.
Thanks for any help which may be offered.
James York

Michael

unread,
Mar 28, 2000, 3:00:00 AM3/28/00
to
Just a guess (I am not using SQL Server currently), but I do recall that
there is an option on the database profile where you can set the size to be
greater than 255. Last time I was using a size of 32000 if I remember
correctly.

Michael


"jry" <jy...@orbitworld.net> wrote in message
news:pTnkE#Om$GA....@forums.sybase.com...

jry

unread,
Mar 28, 2000, 3:00:00 AM3/28/00
to
I found a packet size parameter on the "Network" tab and a text limit
parameter on the "Syntax" tab. It doesn't appear that either of these would
affect the returned data from a varchar column. The 32000 that you mentioned
is the max value for the DBTEXTLIMIT parameter (32,763) but this is for
"text" datatypes and I am trying to use "varchar". That's all I could find
that seemed even remotely connected.
Thanks for responding, though, no one from Sybase has.
James
Michael <Michael...@SierraSystems.com> wrote in message
news:q1aEqBPm$GA....@forums.sybase.com...

Michael

unread,
Mar 28, 2000, 3:00:00 AM3/28/00
to
Ooops, must have been a "text" datatype I was using last time.

Michael


"jry" <jy...@orbitworld.net> wrote in message

news:7JNClKPm$GA....@forums.sybase.com...

KMetz

unread,
Mar 28, 2000, 3:00:00 AM3/28/00
to
Maybe this is beyond my meager understanding, but we are using a 6.5
against Oracle 7.3, and have no trouble with a varchar2(2000) field,
directly.
Where I have a problem is when I set-up a computed field in the SQL
painter, and then try to assign the varchar2(2000) field to that column
after the retrieve. Then the content is truncated at somewhere between 400
and 500 characters.
Ken M.


jry <jy...@orbitworld.net> wrote in article
<pTnkE#Om$GA....@forums.sybase.com>...

jry

unread,
Mar 28, 2000, 3:00:00 AM3/28/00
to
Thanks Ken. Your comment makes it look as if Powerbuilder datawindows can
handle the varchar(>255) situation which leaves the driver, i.e. Oracle vs
Sql Server, as the culprit.
James

KMetz <klm...@kcpl.com> wrote in message
news:01bf98f8$398bd540$241e4990@klm6703ant...

Charles Ginzel

unread,
Mar 28, 2000, 3:00:00 AM3/28/00
to jry
MS SQL Server does not support varchar > 255, you must use a text type for
anything larger than 255.

-Charles

Billy Bosworth

unread,
Mar 28, 2000, 3:00:00 AM3/28/00
to
SQL Server 7 supports up to 8000 for varchar datatypes.

Charles Ginzel wrote in message <38E12491...@entergy.com>...

Billy Bosworth

unread,
Mar 28, 2000, 3:00:00 AM3/28/00
to
I had to go with the OLE DB driver to access the bigger varchar fields.
Many posts in here complained about using that driver, but to date I've had
no problems with it. I'm almost positive that if you want the new SQL
Server 7 datatypes, you have to use OLE DB.

jry wrote in message ...

Kim Berghall

unread,
Mar 28, 2000, 3:00:00 AM3/28/00
to
I found a slick way around the problem.

Change your select statement in the datawindow to something like this:

old:
Select MyTable.comment
from MyTable

new:
Select convert(text,MyTable.comment) comment
from MyTable

This code seems to maximum out at 4099 characters, but it is much better
than 255!

--
Kim Berghall
Sisu Group, Inc.
remove no_spam.
no_spam....@sisugrp.com
www.sisugrp.com

jry <jy...@orbitworld.net> wrote in message
news:pTnkE#Om$GA....@forums.sybase.com...

Dudley Nelson

unread,
Mar 29, 2000, 3:00:00 AM3/29/00
to
Maybe I have the wrong end of the stick here, but have you tried exporting
the datawindow, and changing the char(255) to a char(2000) and re-importing?

Dudley Nelson,
Senior Programmer,
Axios System Ltd.

jry

unread,
Mar 29, 2000, 3:00:00 AM3/29/00
to
Thanks for your response Billy. Our organization supports any number of
Powerbuilder applications here at Johnson Space Center and they are all
deployed using the native driver (pbmss60.dll). I am not familiar with OLE
DB but I will look into it. My concern is the cost to convert from one
deployment procedure to another and a concern for the performance and
reliability of the OLE DB, a driver with which we have no experience.
Thank you again and I will look into this method.
James York
Billy Bosworth <billy.b...@lgeenergy.com> wrote in message
news:yfwb$OQm$GA....@forums.sybase.com...

> I had to go with the OLE DB driver to access the bigger varchar fields.
> Many posts in here complained about using that driver, but to date I've
had
> no problems with it. I'm almost positive that if you want the new SQL
> Server 7 datatypes, you have to use OLE DB.
>
> jry wrote in message ...

jry

unread,
Mar 29, 2000, 3:00:00 AM3/29/00
to
Thanks for responding Kim.
I will look into this. If this were a display only column, I would feel very
confident that what you have suggested would work. The window involved is,
however, operating in query mode and is being used to perform updates to the
varchar(2000) column. I will work with this idea and see what happens.
I am beginning to observe from the responses to my posting (none of which
are from Sybase) that Powerbuilder has fallen a year behind in their support
for MS SQL Server.
Thanks again,
James York
Kim Berghall <kber...@sisugrp.com> wrote in message
news:0vCxUmRm$GA....@forums.sybase.com...

> I found a slick way around the problem.
>
> Change your select statement in the datawindow to something like this:
>
> old:
> Select MyTable.comment
> from MyTable
>
> new:
> Select convert(text,MyTable.comment) comment
> from MyTable
>
> This code seems to maximum out at 4099 characters, but it is much better
> than 255!
>
> --
> Kim Berghall
> Sisu Group, Inc.
> remove no_spam.
> no_spam....@sisugrp.com
> www.sisugrp.com
>
> jry <jy...@orbitworld.net> wrote in message
> news:pTnkE#Om$GA....@forums.sybase.com...

jry

unread,
Mar 29, 2000, 3:00:00 AM3/29/00
to
Thanks for responding Dudley. I believe you do indeed have the correct end
of the stick. I would never have thought of what you suggested but I will
look into it to see if it solves the problem. My main concern with this
approach would be with the legacy maintenance scenario. Other programmers
who come along after me might get caught in a difficult situation where they
try to modify the window and it begins to fail for mysterious (to them)
reasons which seem to have nothing to do with the changes they have made.
Nonetheless, I appreciate your response and it helps to confirm that Sybase
has not upgraded their software to support SQL Server 7.0. This is too basic
a capability on too popular a platform not to be supported by Powerbuilder.
Thanks again for your help,
James York
Dudley Nelson <dud...@axios.co.uk> wrote in message
news:dJ5#LJYm$GA....@forums.sybase.com...

> Maybe I have the wrong end of the stick here, but have you tried exporting
> the datawindow, and changing the char(255) to a char(2000) and
re-importing?
>
> Dudley Nelson,
> Senior Programmer,
> Axios System Ltd.
>

Kim Berghall

unread,
Mar 29, 2000, 3:00:00 AM3/29/00
to
My solution works very well for display and update columns, as long as the
column is varchar( 4099) or less... I would not recommend the export
solution, because it may change back if you make other changes. The solution
I described is not volatile. In addition, it will be very easy to go back
and find/fix when the full 8000 character lenghts are supported. (actually
there is no need to fix your dw's, but if you are like me I would want it to
be corrected anyway). You asked for a solution - I gave it to you - just use
it!

--
Kim Berghall
Sisu Group, Inc.
remove no_spam.
no_spam....@sisugrp.com
www.sisugrp.com

jry <jy...@orbitworld.net> wrote in message

news:wzo#HDZm$GA...@forums.sybase.com...

jry

unread,
Mar 29, 2000, 3:00:00 AM3/29/00
to
Your approach is probably the one I will use. It works for everything except
query mode and I will just disable this field when the window is in query
mode. I had already decided against the export/import technique for the same
reasons you mentioned. I suspect it would not have worked anyway because it
is beginning to look like the problem is with the API library calls being
used by pbmss60.dll.

Kim Berghall <kber...@sisugrp.com> wrote in message
news:VT1mjNZm$GA....@forums.sybase.com...

Mike Searer

unread,
Mar 29, 2000, 3:00:00 AM3/29/00
to
NOT a Sybase issue.
MS decided NOT to write SQL 7 native database drivers. If you are use
native drivers then you are stuck using the 6.5 drivers. The 6.5 drivers do
not support a varchar > 255.
So, if you need a varchar > 255 then you have to use ODBC/OLEDB.

Mike Searer

"jry" <jy...@orbitworld.net> wrote in message

news:T4B7QJZm$GA....@forums.sybase.com...

Billy Bosworth

unread,
Mar 30, 2000, 3:00:00 AM3/30/00
to
<<. In addition, it will be very easy to go back and find/fix when the full
8000 character lenghts are supported. >>

FWIW,

Unless I read the MS documentation wrong, I don't think you're ever going to
see the native drivers fix this problem because MS is moving exclusively
toward OLE DB for their stuff. We also use VB and InterDev here and through
our research on those platforms, we found that MS is strongly pushing OLE DB
everywhere. Their long-term goal is to use it to access data anywhere
(emails, spreadsheets, etc) that supports that interface and not just
relational db's.


jry

unread,
Mar 30, 2000, 3:00:00 AM3/30/00
to
I've been trying to research this and I can't find anything on it. I've
looked on the Sybase web site and the PB 6.5 Enterprise OnLine Books and
release notes. Nowhere have I been able to find anything on this method of
DB connectivity. What would be a good source of information on this?

Billy Bosworth <billy.b...@lgeenergy.com> wrote in message
news:yfwb$OQm$GA....@forums.sybase.com...
> I had to go with the OLE DB driver to access the bigger varchar fields.
> Many posts in here complained about using that driver, but to date I've
had
> no problems with it. I'm almost positive that if you want the new SQL
> Server 7 datatypes, you have to use OLE DB.
>
> jry wrote in message ...

Billy Bosworth

unread,
Apr 5, 2000, 3:00:00 AM4/5/00
to
I used the online books. Go to "Connecting to Your Database", Part 2,
Chapter 4 -- Using the OLE DB Interface.
0 new messages