Hi
I have a vb6 form,SQL server 2000 as a backend and CR9 report.In my VB6 form I have a button "SAVE".Upon clicking on this button the report of a specific record is generated and saved automatically as a doc file.
the code is:
VB Code:
  1. Set rep = appl.OpenReport("C:\Book\report4.rpt", 1)
  2. rep.DiscardSavedData
  3. rep.RecordSelectionFormula = "{Btest.BID} =" & ni
  4. rep.ExportOptions.DiskFileName = "C:\test.doc"
  5. rep.ExportOptions.DestinationType = crEDTDiskFile
  6. rep.ExportOptions.FormatType = 14
  7. rep.Export False
What should I need to add into my code because this message appears and the report is not saved:
Logon failed
Details ADO Error Code:0x80040e4d
Source:Microsoft OLEDB Provider for SQL server
Description:Login failed for user 'svuser'
SQL State=42000
Native Error:18456

Pls help
thanks in advance