Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!hellgate.utah.edu!peruvian.utah.edu!u-sgreen From: u-sgreen%peruvian.utah.edu@cs.utah.edu (Scott Greenman) Newsgroups: comp.sys.next Subject: Putting Text in a Text Object Message-ID: <1990Nov7.170902.19489@hellgate.utah.edu> Date: 8 Nov 90 00:09:02 GMT Organization: University of Utah CS Dept Lines: 31 I am trying to take data from a Sybase retrieval and put in into a text object (Contained in a ScrollView). This is the code I'm using: NXStream *stream; char name[46]; . . . stream = NXOpenMemory(NULL, 0, NX_WRITEONLY); dbbind(dbproc,1,STRINGBIND,(DBINT)46,name); while (dbnextrow(dbproc) != NO_MORE_ROWS) NXPrintf(stream,"%s\n",name); [[outputView docView] readText:stream]; NXCloseMemory(stream, NX_FREEBUFFER); dbbind, dbnextrow, etc are functions that send commands to Sybase. I don't think there's anything wrong with them. The variable name is given a new value everytime dbnextrow is called, and I want to put all of the values it gets into the text object. outputView is a ScrollView containing a text object (as dragged from IB Pallette) This is the first time I've tried using a stream like this and I don't know what I'm doing wrong. Any help would be greatly appreciated. Scott Greenman Univ of Utah