Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB Components
|
VB Components Issues specific to components in VB.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB Components section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 8th, 2006, 01:57 AM
Registered User
 
Join Date: Mar 2005
Posts: 9
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to Anup Gavate Send a message via Yahoo to Anup Gavate
Default 20599 - Cannot open SQL server

Hi,

I created a desktop application in VB 6.0 with MS SQL and Crystal Report 8.0.1.0 on Win 2000 Adv

Server. My MS SQL database is located on a remote server, same database is used for the web site also.

Now i installed this application in another network where a linux firewall and a router is used. The

netwroking guy did such settings for the LAN so that no need to do any entry for IP address and DNS

Server. In this network few systems are WIN XP and few WIN 2000 Professional. The software is working

fine on WIN XP but not on 2000 systems.

Firstly, VB application is not connecting to remote SQL server from WIN 2000 professional system, i

searched google, applied the connection string "Provider=sqloledb;Network

Library=DBMSSOCN;uid=UserName;pwd= password;Data Source=127.0.0.1,1433;Initial Catalog=DbName". This

solved the problem of connection with SQL DataBase.

NOTE: ON ALL WIN XP SYSTEMS "Provider=SQLOLEDB.1;uid=UserName;pwd=password;Dat a

Source=127.0.0.1;Initial Catalog=DbName" THIS CONNECTION STRING IS WORKING FINE FOR SQL DB CONNECTION.

BUT ON ALL WIN 2000 PROFESSIONAL SYSTEMS I HAVE TO ADD "Network Library=DBMSSOCN;" AND ",1433" TO THE

CONNECTION STRING THEN ONLY I AM ABLE TO CONNECT TO THE SQL DB.

But again another problem raised, Crystal reports are not working and showing an error message "20599 -

Cannot open SQL server". I tried a lot but still no success!!!!!! I serached for solution and applied

different connection string listed below

'Connection String 1
CrystalReport1.Connect = "Provider=SQLOLEDB.1;uid=UserName;pwd=password;Dat a Source=127.0.0.1;Initial

Catalog=DbName"

'Connection String 2
CrystalReport1.Connect = "Provider=sqloledb;Network Library=DBMSSOCN;uid=UserName; pwd=password;Data

Source=127.0.0.1,1433;Initial Catalog=DbName"

'Connection String 3
CrystalReport1.Connect = "Provider=sqloledb;Network Library=DBMSSOCN;uid=UserName; pwd=password;Data

Source=127.0.0.1;Initial Catalog=DbName"

'Connection String 4
CrystalReport1.Connect = "Provider=sqloledb;uid=UserName;pwd=password;D ata

Source=127.0.0.1,1433;Initial Catalog=DbName"

'Connection String 5
CrystalReport1.Connect = "Provider=SQLOLEDB.1;uid=UserName;pwd=password;Dat a

Source=127.0.0.1,1433;Initial Catalog=DbName"

'Connection String 6
CrystalReport1.Connect = "uid=UserName;pwd=password;Data Source=127.0.0.1;Initial Catalog=DbName"

'Connection String 7
CrystalReport1.Connect = "uid=UserName;pwd=password;Data Source=127.0.0.1;Initial Catalog=DbName;"

'Connection String 8
CrystalReport1.Connect = "Persist Security Info=True;uid=UserName;pwd=password;Data

Source=127.0.0.1;Initial Catalog=DbName"

'Connection String 9
CrystalReport1.Connect = "Persist Security Info=True;uid=UserName;pwd=password;Data

Source=127.0.0.1;Initial Catalog=DbName;"

'Connection String 10
CrystalReport1.Connect = "Provider=SQLOLEDB.1;Persist Security Info=True;uid=UserName;pwd=password;Data

Source=127.0.0.1;Initial Catalog=DbName"

'Connection String 11
CrystalReport1.Connect = "Provider=SQLOLEDB.1;Persist Security Info=True;uid=UserName;pwd=password;Data

Source=127.0.0.1;Initial Catalog=DbName;"

'Connection String 12
CrystalReport1.Connect = "Data Source=217.199.164.214,1433;Initial Catalog=ActivityGifts;Persist

Security Info=True;User ID=anup;Password=makmedia;"

None of these working and same error message again and again.

If any one is going to suggest me that include this and that DLL file, i did that before. If some one

is going to suggest me to upgrade 'P2sodbc.dll' from the web site

http://technicalsupport.businessobjects.com/, i did that also.

What i wanna to know is just what may be the problem and how to solve it.

Also if some body can answer me why i have to use 2 different connection strings for WIN XP and WIN

2000 Professional systems.

I guess, i am doing very small mistake somewhere that i don't know about, probably with network

settings. Quick reply will be appriciated.

Regards,
Anup Gavate
The Following User Says Thank You to Anup Gavate For This Useful Post:
dmhiware (February 24th, 2009)
 
Old February 24th, 2009, 11:55 AM
Registered User
 
Join Date: Feb 2009
Posts: 1
Thanks: 1
Thanked 0 Times in 0 Posts
Default Cannot connect Sql Server

hi,
i have problem with crystal subreport, my report run in crystal report but when i run application it gives error Cannot connect Sql Server. All the other report running fine.
Can u give any solu.

Quote:
Originally Posted by Anup Gavate View Post
Hi,

I created a desktop application in VB 6.0 with MS SQL and Crystal Report 8.0.1.0 on Win 2000 Adv

Server. My MS SQL database is located on a remote server, same database is used for the web site also.

Now i installed this application in another network where a linux firewall and a router is used. The

netwroking guy did such settings for the LAN so that no need to do any entry for IP address and DNS

Server. In this network few systems are WIN XP and few WIN 2000 Professional. The software is working

fine on WIN XP but not on 2000 systems.

Firstly, VB application is not connecting to remote SQL server from WIN 2000 professional system, i

searched google, applied the connection string "Provider=sqloledb;Network

Library=DBMSSOCN;uid=UserName;pwd= password;Data Source=127.0.0.1,1433;Initial Catalog=DbName". This

solved the problem of connection with SQL DataBase.

NOTE: ON ALL WIN XP SYSTEMS "Provider=SQLOLEDB.1;uid=UserName;pwd=password;Dat a

Source=127.0.0.1;Initial Catalog=DbName" THIS CONNECTION STRING IS WORKING FINE FOR SQL DB CONNECTION.

BUT ON ALL WIN 2000 PROFESSIONAL SYSTEMS I HAVE TO ADD "Network Library=DBMSSOCN;" AND ",1433" TO THE

CONNECTION STRING THEN ONLY I AM ABLE TO CONNECT TO THE SQL DB.

But again another problem raised, Crystal reports are not working and showing an error message "20599 -

Cannot open SQL server". I tried a lot but still no success!!!!!! I serached for solution and applied

different connection string listed below

'Connection String 1
CrystalReport1.Connect = "Provider=SQLOLEDB.1;uid=UserName;pwd=password;Dat a Source=127.0.0.1;Initial

Catalog=DbName"

'Connection String 2
CrystalReport1.Connect = "Provider=sqloledb;Network Library=DBMSSOCN;uid=UserName; pwd=password;Data

Source=127.0.0.1,1433;Initial Catalog=DbName"

'Connection String 3
CrystalReport1.Connect = "Provider=sqloledb;Network Library=DBMSSOCN;uid=UserName; pwd=password;Data

Source=127.0.0.1;Initial Catalog=DbName"

'Connection String 4
CrystalReport1.Connect = "Provider=sqloledb;uid=UserName;pwd=password;D ata

Source=127.0.0.1,1433;Initial Catalog=DbName"

'Connection String 5
CrystalReport1.Connect = "Provider=SQLOLEDB.1;uid=UserName;pwd=password;Dat a

Source=127.0.0.1,1433;Initial Catalog=DbName"

'Connection String 6
CrystalReport1.Connect = "uid=UserName;pwd=password;Data Source=127.0.0.1;Initial Catalog=DbName"

'Connection String 7
CrystalReport1.Connect = "uid=UserName;pwd=password;Data Source=127.0.0.1;Initial Catalog=DbName;"

'Connection String 8
CrystalReport1.Connect = "Persist Security Info=True;uid=UserName;pwd=password;Data

Source=127.0.0.1;Initial Catalog=DbName"

'Connection String 9
CrystalReport1.Connect = "Persist Security Info=True;uid=UserName;pwd=password;Data

Source=127.0.0.1;Initial Catalog=DbName;"

'Connection String 10
CrystalReport1.Connect = "Provider=SQLOLEDB.1;Persist Security Info=True;uid=UserName;pwd=password;Data

Source=127.0.0.1;Initial Catalog=DbName"

'Connection String 11
CrystalReport1.Connect = "Provider=SQLOLEDB.1;Persist Security Info=True;uid=UserName;pwd=password;Data

Source=127.0.0.1;Initial Catalog=DbName;"

'Connection String 12
CrystalReport1.Connect = "Data Source=217.199.164.214,1433;Initial Catalog=ActivityGifts;Persist

Security Info=True;User ID=anup;Password=makmedia;"

None of these working and same error message again and again.

If any one is going to suggest me that include this and that DLL file, i did that before. If some one

is going to suggest me to upgrade 'P2sodbc.dll' from the web site

http://technicalsupport.businessobjects.com/, i did that also.

What i wanna to know is just what may be the problem and how to solve it.

Also if some body can answer me why i have to use 2 different connection strings for WIN XP and WIN

2000 Professional systems.

I guess, i am doing very small mistake somewhere that i don't know about, probably with network

settings. Quick reply will be appriciated.

Regards,
Anup Gavate
 
Old March 5th, 2009, 04:49 AM
Authorized User
 
Join Date: Nov 2006
Posts: 31
Thanks: 0
Thanked 3 Times in 3 Posts
Send a message via ICQ to debasisdas Send a message via AIM to debasisdas
Default

have you connected the subreports as well to database from application ?
__________________
Regards
Debasis





Similar Threads
Thread Thread Starter Forum Replies Last Post
20599 - Cannot open SQL Server itsviji4u SQL Server 2005 0 November 3rd, 2007 06:16 AM
runtime error 20599 cannot open sql server francitaj Crystal Reports 3 October 4th, 2007 05:27 AM
Run-time error '20599'; Cannot open SQL Server manishashar888 Pro VB Databases 7 March 20th, 2007 07:04 AM
run-time error '20599' : cannot find sql server juicyfruit SQL Server 2000 1 February 16th, 2006 06:25 AM
Error 20599 Cannot open SQL Server Niaz Pro VB Databases 5 January 9th, 2005 06:04 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.