Microsoft
Software
Hardware
Network
Question : How to connect to crystal reports 8.x from vb6 in Windows 7
Hi! I have a vb6 application which runs crystal reports 8.x reports via the OCX control. The system ran just fine under Windows XP and MSDE using the following connection string:
'SQL Server driver - use for MSDE connections
gstrRptConnectString = _
"uid=sa;" & _
"pwd=;" & _
"driver={SQL Server};" & _
"server=(local);" & _
"database=FLDACM;" & _
"dsn = ''"
When I launch the reports, I set to report OCX''s Connect property to that connection string:
Me.CRpt1.Connect = gstrRptConnectString
And everything works just fine.
Now I am trying to migrate the application to run under Windows 7 and SQL Express 2005. I have had to change my main login to a new driver and format, e.g.,
gstrRptConnectString = _
"Provider=SQLNCLI.1;Integr
ated Security=SSPI;" & _
"Persist Security Info=True;" & _
"Trusted_Connection=no;" & _
"Persist Security Info=True;" & _
"Server=servername\instanc
ename;" & _
"Initial Catalog=FLDACM;" & _
"User ID=username;" & _
"Password=password"
And this works with the ADO in my vb6 applicationn the new Windows 7 / SQL Express 2005 environment. But when I try to launch the Crystal Reports reports from my application I get the following error:
Error # 20599 - Cannot open SQL Server.
I have tried all these other connection strings, with no success launching crystal reports in the Windows 7 / SQL Express 2005 environment:
'Setup the crystal reports connection string - works on development machine, not on lenovo
'this uses the same connection as the front end - doesn't work at all
' gstrRptConnectString = gstrConnectString
'this uses a system DSN - doesn't work at all
' gstrRptConnectString = "DSN=FLDACM;" & _
' "Uid=sa;" & _
' "Pwd=Welcome1"
'this is the standard sql connection - doesn't work at all
gstrRptConnectString = "Server=servername\instanc
ename; " & _
"Database=FLDACM; " & _
"UID=username; " & _
"PWD=password; "
'This is the SQL Native Client 9.0 - doesn't work at all
gstrRptConnectString = "Provider=SQLNCLI; " & _
"Server=servername\instanc
ename; " & _
"Database=FLDACM; " & _
"Uid=username; " & _
"Pwd=password; "
gstrRptConnectString = "Data Source=servername\instance
name; " & _
"Initial Catalog=FLDACM; " & _
"User Id=username " & _
"Password=password;"
gstrRptConnectString = "Driver={SQL Native Client}; " & _
"Server=servername\instanc
ename; " & _
"Database=FLDACM; " & _
"Uid=username " & _
"Pwd=oasswird; "
I have also verified that all the necessary support DLLs reside in theWindows 7 / SQL Express 2005 environment, so I do not think it is a missing DLL issue.
Is there any connection string format that will work with Crystal Reports 8 and Windows 7 / SQL Express 2005?
Regards,
Jay Meredith
Answer : How to connect to crystal reports 8.x from vb6 in Windows 7
you need to check the hide from address book option under the advanced tab
Random Solutions
Generated Migration Scripts for Models via Console
I am having trouble opening a .bat file in a VBA Excel Macro
Operation Must Use an Updateable Query
Clearing a submit form once submitted
Cannot open help files in WIN7
Extract Objects from Stream
What is the best cms to use with dreamweaver
2 IP to same windows 2003 server for RDP and VPN issue
object required error
Your log in to the Switchboard timed out. Please click OK to reload or Cancel to quit.