vb command

elly00

New member
Joined
Jul 29, 2011
Messages
2
Programming Experience
Beginner
Hi have this code.
As it's inlcuded ina procedure that should generate a document reading data from the table populated by the store procedure.
The document is not generated (no error displayed).
How can I check if it can read correctly data from store procedure?
Do I have to open sql connection before the store procedure call?

=============
Dim dr As SqlClient.SqlDataReader = DataClass.RunSPReturnDR ("store procedure name",params)

Dim constcodart As Integer = 2
Dim constcodlotto As Integer = 44


If dr.HasRows
While dr.Read
If cDoc.RigaAttiva.RigaCorr > 0 Then
cDoc.RigaAttiva.RigaCorr=rigacorr+1
Else
cDoc.RigaAttiva.RigaCorr=1
End If
CDoc.RigaAttiva.ValoreCampo(constcodart) = dr("ARTICOLO")
CDoc.RigaAttiva.ValoreCampo(constcodlotto) = dr("LOTTO")
 
Back
Top