----- Original Message -----
Sent: Tuesday, December 24, 2002 9:28
AM
Subject: RES: [enterprise-list] URGENTE -
Problema driver SQL Server
Por
incrivel que pare�a, isso est� previsto na especifica��o do JDBC, olhe esse
trecho do javadoc:
The ResultSet interface provides getter methods
(getBoolean, getLong, and so on) for retrieving
column values from the current row. Values can be retrieved using either the
index number of the column or the name of the column. In general, using the
column index will be more efficient. Columns are numbered from 1. For
maximum portability, result set columns within each row should be read in
left-to-right order, and each column should be read only once.
Se
voc� quer garantir a portabilidade entre bancos, vai ter que ler em
ordem, e apenas uma vez cada campo.
Para
resolver esse problema, h� um tempo atr�s, eu criei um sistema que lia os
valores do resultset e os colocava em uma Hashtable (tudo autom�tico), depois
eu pegava os dados direto da Hashtable.
Pessoal, estou tendo um problema com o driver
JDBC da Microsoft para SQL Server 2000.
Ao recuperar registros do BD e tentar fazer um
loop, obtenho o seguinte erro
...."SQLExcpetion - Can not re-read row data
for column XXXXXXXXX....."
Este problema � amplamente discutido nos f�runs
da Sun e parece que at� no MSDN da Microsfot est� registrado. A solu��o
(rid�cula por sinal) � colocar os getString do resultset na ordem dos campos
definidos nas tabelas. E al�m disso, tem de fazer uma �nica vez o getString,
atribuindo para uma vari�vel e depois se for preciso utilizar de novo, tem
de ler da vari�vel. Algu�m j� teve este problema? O que fez para resolver?
Alguma id�ia?
Muito obrigado
Giovani Salvador
PROCERGS
RS
---
Incoming mail is certified Virus Free.
Checked by
AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.423 / Virus
Database: 238 - Release Date: 25/11/2002
---
Outgoing mail is certified Virus Free.
Checked by
AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.423 / Virus
Database: 238 - Release Date: 25/11/2002
---------------------------------------------------------------------
Para
cancelar a subscri��o, envie mensagem para:
[EMAIL PROTECTED]
Para comandos adicionais, envie
mensagem para: [EMAIL PROTECTED]