in 1º congratz for your software. is good and easy to use.
well now to the problem :)
my problem is the next... im trying to do 2 invoices.
Private Function GetInvoiceData(ByVal Connection As SqlConnection, ByVal data1 As String, ByVal data2 As String, ByVal tipe As Integer) As SqlDataReader
'Creates a DataReader for the Invioce
Dim command As SqlCommand = Connection.CreateCommand()
command.CommandText = "query1"
Dim DataReader As SqlDataReader = command.ExecuteReader()
Return DataReader
End Function
Private Function GetInvoiceData2(ByVal Connection2 As SqlConnection, ByVal data1 As String, ByVal data2 As String, ByVal tipe As Integer) As SqlDataReader
'Creates a DataReader for the Invioce
Dim command2 As SqlCommand = Connection2.CreateCommand
command2.CommandText = "query2"
Dim DataReader2 As SqlDataReader = command2.ExecuteReader()
Return DataReader2
End Function
the problem is that when is going to do the 2 query it gives me a error that say : "There is already an open DataReader associated with this Command which must be closed first."
i tryied to close and open but i didnt resolve the problem :| glad if you could help :)
Multi invoices.
Re: Multi invoices.
Support · Aug 27, 2007Hello,
The error you are getting is because of the open connections and the datareader. You will have to close this when using another datareader with same database. Without completing the operations of one datareader you can not use another datareader. You can also use the dataset with a dataadaptor and these will automativcally open and closes the connections once you get the data into the dataset.
Thanks,
ceTe Software Support Team.
Re: Multi invoices.
Forum member · Aug 27, 2007well i did the thing but its giving some errors. :S
there is no exemple of how to work with 2 draw invoices?
Re: Multi invoices.
Support · Aug 27, 2007Hello,
Can you please send a mail to our [^a|mailto:support@cete.com|Support Team^] and they can send you a sample example which gets the data using two datareaders and displays in the PDF.
Thanks,
ceTe Software Support Team.