Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
NextRecordSet
Message
From
19/05/2002 21:55:13
Larry Santos
Local Data System
Philippines
 
 
To
All
General information
Forum:
Visual Basic
Category:
Database DAO/RDO/ODBC/ADO
Title:
NextRecordSet
Miscellaneous
Thread ID:
00658747
Message ID:
00658747
Views:
38
Hi,

Anybody can help me!!

I have query but looks like hang in my application when i used NextRecordSet of ADO. My code is include here....


cmd.CommandTimeout = 5
cmd.CommandType = adCmdStoredProc
cmd.CommandText = "SP_SalLedAuditTrail"
Set prmFrom = cmd.CreateParameter("dFrom", adDate, adParamInput)
prmFrom.Value = Format(DTPicker1.Value, "mm/dd/yyyy")
cmd.Parameters.Append prmFrom
Set prmTo = cmd.CreateParameter("dTo", adDate, adParamInput)
prmTo.Value = Format(DTPicker2.Value, "mm/dd/yyyy")
cmd.Parameters.Append prmTo
Set RS = cmd.Execute
If Not RS.EOF Then
Dim rptApp As CRAXDRT.Application
Dim rptReport As CRAXDRT.Report
Set rptApp = New CRAXDRT.Application
Set rptReport = rptApp.OpenReport("c:\source\rpt\SOSSalLedAudTrail.rpt")
rptReport.Database.SetDataSource RS, 3, 1
frmRpt.CRViewer1.ReportSource = rptReport
frmRpt.CRViewer1.ViewReport
frmRpt.Show vbModal
Else
MsgBox "No record to be printed....", vbInformation + vbOKOnly, "Empty Record"
End If


NOTE:

When i execute in Query Analyser they have records...

TIA
Reply
Map
View

Click here to load this message in the networking platform