engnouna
Sep 7th, 2006, 01:32 AM
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:
Set rep = appl.OpenReport("C:\Book\report4.rpt", 1)
rep.DiscardSavedData
rep.RecordSelectionFormula = "{Btest.BID} =" & ni
rep.ExportOptions.DiskFileName = "C:\test.doc"
rep.ExportOptions.DestinationType = crEDTDiskFile
rep.ExportOptions.FormatType = 14
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
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:
Set rep = appl.OpenReport("C:\Book\report4.rpt", 1)
rep.DiscardSavedData
rep.RecordSelectionFormula = "{Btest.BID} =" & ni
rep.ExportOptions.DiskFileName = "C:\test.doc"
rep.ExportOptions.DestinationType = crEDTDiskFile
rep.ExportOptions.FormatType = 14
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