Error 4060 when connection to SQLServer with CS Collation

forum.connectivity (1998-2005) & forum.td.connectivity (2005-2010)
michael
Germany
Posts: 300
Joined: 07 Jun 2018, 15:13
Location: Stuttgart, GER

Error 4060 when connection to SQLServer with CS Collation

Post by michael » 06 Oct 2006, 10:44

 Posted by:  Michael Hummel 

Hello Ng,

environment:
TD 2005.1 PTF1 or PTF2
MSSQLServer 2000 SP3 or SP4

Problem:
Connecting to a MSSQLServer Database with Case Sensitive !!!! Collation
(example German Phonebook CS or other CS Collations) fails because Gupta
SQL???.dll converts the Databasename in Uppercase

Example:
SQLServer DatabaseName: MyDB

UDLFile: Test.udl
Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security
Info=False;Initial Catalog=MyDB;Data Source=MyServer
-> Test Connection in the UDL Dialog is ok!

TeamDeveloper:
Set SqlUDL = 'Test.udl'
Call SqlConnect(hSql)
-> Error 4060
Cannot open database requested in login MYDB ....

a gupta api function change the databasename MyDB to Uppercase MYDB.
In case of "case sensitive" SQLServers this is a problem.

michael

Fridolin Schwarz

Error 4060 when connection to SQLServer with CS Collation

Post by Fridolin Schwarz » 06 Oct 2006, 14:53

 Posted by:  Fridolin Schwarz 


Hi Michael

That´s a really annoying feature of the SQL Windows OLE-DB Client.
The only way, I know of, to connect to Sql Server is don´t use the initial
catalog-Keyword.
So you connect to the user´s default database and afterwards issue a USE
-Statement.

fritz

michael
Germany
Posts: 300
Joined: 07 Jun 2018, 15:13
Location: Stuttgart, GER

Error 4060 when connection to SQLServer with CS Collation

Post by michael » 06 Oct 2006, 17:02

 Posted by:  Michael Hummel 

Hai Fridolin,

thanks, great tip!!
but i cant change the application. so everything i can do is to change the
udl.file or to re-install the sqlserver at the customer...

michael

Fridolin Schwarz

Error 4060 when connection to SQLServer with CS Collation

Post by Fridolin Schwarz » 10 Oct 2006, 16:25

 Posted by:  Fridolin Schwarz 


... or your rename the database and the logins to UPPERCASE letters and hope
that other applications can cope with it.

fritz

michael
Germany
Posts: 300
Joined: 07 Jun 2018, 15:13
Location: Stuttgart, GER

Error 4060 when connection to SQLServer with CS Collation

Post by michael » 11 Oct 2006, 15:16

 Posted by:  Michael Hummel 

i reported a bug to gupta.
we will see.
its a new problem in td41.
in td31 it works.

michael

Return to “td.connectivity”

Who is online

Users browsing this forum: [Ccbot] and 0 guests