|
-
Dec 8th, 2007, 04:23 PM
#1
Thread Starter
Lively Member
I can't Solve crystal report runtime error 20599 Cannot Open SQL Server
I am using VB6.0 and
crystal reports 8.5
and the code which i have written is as below
**********************************************************
GenerateDSN
With MAIN.CR
.Reset: MAIN.InitCrys
.ReportFileName = App.Path & "\Reports\rptVanInv.rpt"
.Connect = "DSN=" & App.Path & "\rptCN.dsn;PWD=philiprj"
.SelectionFormula = "{qry_WeeklyInv.VanInvFK} = " & nsdLoading.BoundText
.WindowTitle = "Van Inventory Report"
.ParameterFields(0) = "prBussAddr;" & CurrBiz.BUSINESS_ADDRESS & ";True"
.ParameterFields(1) = "prmBussContact;" & CurrBiz.BUSINESS_CONTACT_INFO & ";True"
.ParameterFields(2) = "prmTitle;VAN INVENTORY REPORT;True"
.ParameterFields(3) = "prmVanName;" & nsdLoading.getSelValueAt(3) & ";True"
.ParameterFields(4) = "prmDate;" & nsdLoading.getSelValueAt(2) & ";True"
.PageZoom 100
.Action = 1
End With
RemoveDSN
End If
*********************************************************
th error is
run-time error 20599 Cannot open SQl Server
Thanks
-
Dec 9th, 2007, 04:17 AM
#2
Thread Starter
Lively Member
Re: I can't Solve crystal report runtime error 20599 Cannot Open SQL Server
PLZ any one have a solution
-
Dec 11th, 2007, 05:10 PM
#3
Lively Member
Re: I can't Solve crystal report runtime error 20599 Cannot Open SQL Server
Is your connection string correct?
ie .Connect = "DSN=" & App.Path & "\rptCN.dsn;PWD=philiprj"
Does the report work when you test it in Crystal Reports?
Working in VB2005 and SQL2005
-
Dec 12th, 2007, 06:06 AM
#4
Thread Starter
Lively Member
Re: I can't Solve crystal report runtime error 20599 Cannot Open SQL Server
 Originally Posted by SunshineBH
Is your connection string correct?
ie .Connect = "DSN=" & App.Path & "\rptCN.dsn;PWD=philiprj"
Does the report work when you test it in Crystal Reports?
yes its work
-
Dec 12th, 2007, 11:34 AM
#5
Re: I can't Solve crystal report runtime error 20599 Cannot Open SQL Server
What are the contents of the DSN file.
Comment out the line RemoveDSN and rerun the program. Does that make a difference?
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
|