passing a datetime parameter to a stored procedure in SQL2000

Joined
Jul 7, 2005
Messages
1
Reaction score
0
hey,iam working on a software project on and am using this piece of code to generate a report from a SQL 2000 stored procedure using Vb 6.0 environment by passing a datetime parameter.i have used it before to generate the same report using Ms access and it has worked,but using the same in SQL it,s giving me an error.please if anyone has an idea of how i can solve the head ache problem am appreciating for your assistance.

Public Sub GenerateIn(thedate As Date)

check_RS2
rs2.Open "exec cin #" & thedate & "#", Cnn
With rptIn
Set .DataSource = rs2

With .Sections("Section4").Controls
For i = 1 To .Count
If TypeOf .Item(i) Is RptLabel Then
If .Item(i).Name = "lblDate" Then
.Item(i).Caption = thedate
End If
End If
Next i
End With

.Refresh
'Unload frmReports
.Show vbModal
End With
rs2.Close
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top