I believe the max size of varchar for SQL server is 255.
- Thomas -
Ravi T wrote:
>
> Hi Jacek,
>
> I tried even the following method still it didn't worked.
> String xyz = rset.getString("col_name");
>
> Iam using Weblogic's type 4 jdbc driver of version 4.5
> My problem is still unsolved. If you've any alternative suggestions then
> please let me know.
>
> Thanks,
> Ravi.
>
> >From: "Wuwer, Jacek M." <[EMAIL PROTECTED]>
> >Reply-To: "A mailing list for discussion about Sun Microsystem's Java
> > Servlet API Technology." <[EMAIL PROTECTED]>
> >To: [EMAIL PROTECTED]
> >Subject: Re: Reading a large string.
> >Date: Tue, 2 Nov 1999 08:04:25 -0800
> >
> >Hi,
> >I think it heavily depends on the JDBC driver you're using. I'm actually
> >inserting such a filed in my servlet by calling a stored procedure - it
> >gets
> >retrieved later through ODBC. I'm using an older WebLogic type 2 driver and
> >MSSQL 7.0.
> >Have you tried String buf = rset.getString( your_column_id ) ?
> >
> >Again, it may be your driver limitations, earlier versions of MSSQl
> >supported only up to 256 character in varchar.
> >
> >Jacek
> >
> >
> > > -----Original Message-----
> > > From: Ravi T [SMTP:[EMAIL PROTECTED]]
> > > Sent: Tuesday, November 02, 1999 00:48
> > > To: [EMAIL PROTECTED]
> > > Subject: Reading a large string.
> > >
> > > Hi all,
> > >
> > > My problem might be a bit off-topic please don't mind.
> > >
> > > In one of my servlets Iam using JDBC to access SQLServer7.0.
> > > One of the tables in the database had a column whose data type is
> >varchar
> > > of
> > > size 8000.
> > > When Iam trying to retrieve the value of this column Iam getting the
> >value
> > > only of the first 255 characters. Iam using the following method to
> > > retrieve
> > > the value of this field.
> > >
> > > BufferedReader reader=new BufferedReader(new
> > > InputStreamReader(rst.getBinaryStream(1)),4000);
> > > String in=reader.readLine();
> > > while(in != null)
> > > {
> > > sout.println(in);
> > > in=reader.readLine();
> > > }
> > >
> > > If anyone had a solution to retrieve the whole string stored in that
> >field
> > > in the database then please let me know that solution.
> > >
> > > Thanks in advance,
> > > Ravi Kumar.
> > >
> > > ______________________________________________________
> > > Get Your Private, Free Email at http://www.hotmail.com
> > >
> > >
> >__________________________________________________________________________
> > > _
> > > To unsubscribe, send email to [EMAIL PROTECTED] and include in the
> > > body
> > > of the message "signoff SERVLET-INTEREST".
> > >
> > > Archives: http://archives.java.sun.com/archives/servlet-interest.html
> > > Resources: http://java.sun.com/products/servlet/external-resources.html
> > > LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
> >
> >___________________________________________________________________________
> >To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> >of the message "signoff SERVLET-INTEREST".
> >
> >Archives: http://archives.java.sun.com/archives/servlet-interest.html
> >Resources: http://java.sun.com/products/servlet/external-resources.html
> >LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
> >
>
> ______________________________________________________
> Get Your Private, Free Email at http://www.hotmail.com
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html