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
Blackberry browser 400 error - socketexception Connection reset
Website slow to load first time, fine subsequent times
How do I assign a default value in TextBox fields in DetailsView for Insert mode
Are there font conflicts with Snow Leopard and applications built using File Maker Pro?
Migration of SQL Server 2008 database to oracle
NTLDR is Missing on HP Proliant ML350 G4 with Windows 2003 SP2
How to avoid zero(s) in front of number(s) disappears in array
Raid 1 Hard drive failed PowerEdge 1850
Remote Web Workplace Setup
class sessions vars