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
Networking a work laptop with a home network
VBScript to check if a account exist then what memebership it has
Enabling bluetooth in Ubuntu 10.04
Sharepoint 2010 and default IIS
Problem with autodiscover with Outlook 2007/Exchange 2003
How to ensure only one user at a time uses the MS access application?
Remove Webroot Spy Sweeper 3.1
Cannot boot into Windows 7 partition (Blinking cursor) after using Acronis Disk Director resize
VMware, vSphere Virtual Machine and Disk Errors "invalid disk type 7" and "cannot detect guest operating system type"
using ubuntu 10.4 to format a drive for apple OS ?