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

ResultSet can not re-read row data for column

41 views
Skip to first unread message

Roy Tan

unread,
Mar 20, 2002, 9:54:28 PM3/20/02
to
Hi,
I realised that the assignment of values in a recordset must be be in
accordance with the table structure.
E.g.
while(rsSelect.next())
{
int intAddressbookID = rsSelect.getInt("addressbookid");
String strLastName = rsSelect.getString("lastname");
String strFirstName = rsSelect.getString("firstname");
}

If the lastname is the column after firstname in table created, the
above statement will throw the following exception:
Exception java.sql.SQLException: [Microsoft][SQLServer JDBC
Driver]ResultSet can not re-read row data for column 5.

Column 5 is <firstname>. With other JDBC drivers, the above problem does
not occur. Just wondering if there is any workaround or must I declare the
assignments accordingly?

Best Regards,
Roy Tan


noper

unread,
Mar 21, 2002, 8:51:01 PM3/21/02
to
set the cursor.....


The above error happens if you attempt to re-read a ResultSet column or read
a column less then the last column read.

This can be over come if you use
conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_UPDA
TABLE)

instead of the default createStatement(). The reason is that that default
generates TYPE_FORWARD_ONLY ResultSets.

"Roy Tan" <roy...@hotmail.com> wrote in message
news:unA43MI0BHA.1584@tkmsftngp04...

Roy Tan

unread,
Mar 22, 2002, 5:11:23 AM3/22/02
to
Thanks for the info.
Will give it a try
"noper" <1...@home.com> wrote in message
news:96wm8.227998$Dl4.25...@typhoon.tampabay.rr.com...

Sridhar Paladugu[MS]

unread,
Mar 26, 2002, 2:50:31 PM3/26/02
to
Thanks guys. But we are fixing this by next RTM.

Sridhar Paladugu
Microsoft Developer Support
JDBC Webdata


This posting is provided "AS IS" with no warranties, and confers no rights.

Are you secure? For information about the Strategic Technology Protection
Program and to order
your FREE Security Tool Kit, please visit
<http://www.microsoft.com/security>.


Christophe GOGUYER DESSAGNES

unread,
May 6, 2002, 9:38:22 AM5/6/02
to
When will this release be available ?
Thx.

-----
Christophe GOGUYER DESSAGNES
Product Manager
Arcad Software

Mail : mailto:c...@arcadsoftware.com
ICQ : 16336625
Web : http://www.arcadsoftware.com
"Sridhar Paladugu[MS]" <sr...@online.microsoft.com> a écrit dans le message
de news: n#m1w9P1BHA.1752@cpmsftngxa07...

Neil Pike

unread,
May 6, 2002, 3:55:47 PM5/6/02
to
Christophe - it's been available for several days - www.microsoft.com/sql


> When will this release be available ?

Neil Pike MVP/MCSE. Protech Computing Ltd
(Please post ALL replies to the newsgroup only unless indicated otherwise)


Christophe GOGUYER DESSAGNES

unread,
May 7, 2002, 2:47:29 AM5/7/02
to
I've download it, but the problem still remain !
I've always the same error in my application server.
Is this error been resolved in this relase ?
Thx

--


-----
Christophe GOGUYER DESSAGNES
Product Manager
Arcad Software

Mail : mailto:c...@arcadsoftware.com
ICQ : 16336625
Web : http://www.arcadsoftware.com

"Neil Pike" <neil...@compuserve.com> a écrit dans le message de news:
VA.00005c7...@compuserve.com...

Sridhar Paladugu[MS]

unread,
May 7, 2002, 11:33:50 AM5/7/02
to
Hi,

The problem will be with data types such as IMAGE or any long datatypes. What
happens here is if you are using any data types which contains long data the
driver opens pointer to that buffer instead of storing that data in the local
buffer. So If your SELECT list contains any long data columns(text, ntext,
image) then you will not be able to reread data in the resultset based on the
current driver implementation. So the simple work around is to process the
result in order or to avoid longdata columns when you do not want them in
current logic.

I hope this might help you.

Regards,

Christophe GOGUYER DESSAGNES

unread,
May 7, 2002, 12:33:08 PM5/7/02
to
Will it be some evolution to the current implementation ?
Because, I can't change the way as my AppServer CMP reads the data.
I made some try with inetsoftware opta2000 and it works,
so do you know if some updates are scheduled ?
Thx.

--
-----
Christophe GOGUYER DESSAGNES
Product Manager
Arcad Software

Mail : mailto:c...@arcadsoftware.com
ICQ : 16336625
Web : http://www.arcadsoftware.com

"Sridhar Paladugu[MS]" <sr...@online.microsoft.com> a écrit dans le message
de news: wKuudyd9BHA.2252@cpmsftngxa08...

Sridhar Paladugu[MS]

unread,
May 8, 2002, 11:08:33 AM5/8/02
to
Hi,

This behaviour change might change some time later. But for now we do not have
any plans to change this behaviour.

Thanks,

Christophe GOGUYER DESSAGNES

unread,
May 13, 2002, 3:21:21 AM5/13/02
to
Is there a way to put this behaviour as default for all statement ?
ie :
conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_UPDA
TABLE)

Thx.

--
-----
Christophe GOGUYER DESSAGNES
Product Manager
Arcad Software

Mail : mailto:c...@arcadsoftware.com
ICQ : 16336625
Web : http://www.arcadsoftware.com
"Sridhar Paladugu[MS]" <sr...@online.microsoft.com> a écrit dans le message

de news: TDOU7Iq9BHA.1764@cpmsftngxa07...

Sridhar Paladugu[MS]

unread,
May 21, 2002, 9:08:53 AM5/21/02
to
Hi,
I would say no to this from the driver side.
0 new messages