Newsgroups: comp.lang.smalltalk
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!news.mathworks.com!udel!gatech!ncar!uchinews!news
From: kit@delphi.bsd.uchicago.edu (Kit Transue)
Subject: PPVW 2.0 ObjectLens->Sybase: No TEXT support?
Message-ID: <1994Nov4.173116.27056@midway.uchicago.edu>
Sender: news@uchinews.uchicago.edu (News System)
Organization: University of Chicago -- Academic Information Technologies
Date: Fri, 4 Nov 1994 17:31:16 GMT
Lines: 52

Probably a Smalltalk newbie question.

I'm using VisualWorks 2.0 and the Object Lens adaptor to access a Sybase  
database.  Works real neat so far.  Except:

I need to access Sybase's text datatype.  The ObjectLens Data Modeller  
seems to have little difficulty with this datatype.  I create a table in  
the database:
create table foo (
      ssn ssn not null,
      description text
)
grant the VW user access, add a row of data, etc.--the same way I've done  
for the other tables.  The table's visible from the DataModeller..View..
Database Tables viewer.  I can create a DataLens Object for that table.   
If I examine the mapping for the newly created Foo class, the Mapping Tool  
reports that description is a variable of type ByteString, and column type  
Text.  This strikes me as ideal.  Moreover, nothing in the variable... or  
column... options looks more appropriate.  And it checks with the database  
and installs without difficulty.

I then create a new dataform to access this class, say, a multiple row  
viewer.  All goes well, I install the form, and then try and open [test]  
it.  I log into the database sucessfully, and then get an error dialog:
"Operation Terminated.  Unable to fetch one or more rows of data."

There are rows of data to be fetched.  The process outlined above works  
for tables that do not contain a text column.  I have tried putting only  
the ssn on the data form, in the hope that perhaps not trying to retrieve,  
edit, or display the description field would solve this problem.  This did  
not work.  I've tried making viewers instead of editors.

I can't find ByteString in the ObjectReference, except that ByteArray has  
an asByteString: method [forgive me if I decimate the terminology].  I can  
try and tell the object modeller that the text is a ByteArray, but then  
the column type options are less appropriate (image, binary, ...).

I don't quite know where to go browsing in the sources.  I don't think  
it's an adaptor/editor problem, since I can't retrieve rows even if I only  
want an ssn.  My grasp on how exactly the object modeller works is shaky,  
but I'll gladly delve deeper if someone could point me in a promising  
direction.

Does anyone have experience in this matter?  Any help would be greatly  
apprecieated....

thanks!
kit transue
kit@delphi.bsd.uchicago.edu

university of chicago, division of biological sciences, mis department  
(administrative computing), etc....
