dim objconn as new OleDbConnection("Provider=OraOLEDB.Oracle; Data Source=orcl;User Id=sal4net;Password=sal4net;")

dim offerta as string="1"

dim sql_nr_tab as string="select distinct ID_TAB from PROD_OFFERTE WHERE ID_OFFERTA='" & id_offerta & "'"

dim objcmd_nr_tabss as new oledbcommand(sql_nr_tab, objconn)
dim objreader_nr_tabbba as OledbdataReader
try
objreader_nr_tabbba=objcmd_nr_tabss.executeReader
catch
end try



Dim distinct_id_tab As Integer = objreader_nr_tabbba.GetOrdinal("ID_TAB")
dim nr_tabbbbeeee as string="0"
do while objreader_nr_tabbba.read
nr_tabbbbeeee = objreader_nr_tabbba.getvalue(distinct_id_tab)

dim sql_prod_offerte as string="select * from PROD_OFFERTE WHERE ID_OFFERTA='" & id_offerta & "' and NOT(PADRE IS NULL ) and id_tab=" & nr_tabbbbeeee & " order by ordine"

dim objcmd_padri as new oledbcommand(sql_prod_offerte, objconn)
dim objreader_padri as OledbdataReader


Objreader_padri=objcmd_padri.executeReader <--------MI DA ERRORE

LOOP
___________________________

Usando una sola connessione non riesco ad eseguire l'istruzione sql che si trova dentro il ciclo do while. Come posso fare?
Per favore potete rispondermi? Grazie