|
-
Jul 17th, 2006, 03:39 AM
#1
Thread Starter
Member
error : [server has not yet been opened] - HELP ME PLEASE
Hi Everybody....
could you please help me to see the code below???
[Highlight=VB]
Dim appl As New CRAXDRT.Application
Dim report As New CRAXDRT.report
Dim con As New ADODB.Connection
Dim rs As New ADODB.Recordset
Private Sub Form_Load()
Set con = New ADODB.Connection
con.Open "PROVIDER=SQLOLEDB.1;SERVER=DEBBIE;INITIAL CATALOG=WIS;USER id=sa;PASSWORD=sql ;PROMPT=NOPROMPT"
Set rs = New ADODB.Recordset
sql = "select mat_cd, matname, loccode, qty, qty_available " & _
"from m_rawmat inner join wi_matxloc on mat_cd = matcode"
rs.Open sql, con, adOpenForwardOnly, adLockReadOnly
rs.Filter = "mat_cd = '" & Form2.Text1.Text & "'"
Set report = appl.OpenReport(App.Path & "\report\inventory.rpt")
report.DiscardSavedData
report.Database.Tables(1).SetDataSource rs, 3
CRViewer1.ReportSource = report
CRViewer1.ViewReport
End Sub
[Highlight=VB]
I'm so frustated about this.....
It always prompt me this errror msg [Server has not yet been opened]
I dont understand where the problem lies ....
Please kindly help me to correct my code...
I'm in urgent...
Thanks in advance ....
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|