Error on connect MSSQL using Delphi 12 + ZEOS 7

Forum related to MS SQL Server

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
jeckson
Fresh Boarder
Fresh Boarder
Posts: 3
Joined: 28.01.2010, 19:52

Error on connect MSSQL using Delphi 12 + ZEOS 7

Post by jeckson »

Hi!

I have a problem when I try to connect from MS SQL Database using Delphi 12 + Zeos 7 Alpha, when show a message that say: "Unable to connect: SQL Server is unavailable or does not exist. Unable to connect: SQL Server does not exist or network access denied. ConnectionOpen (Connect()). ".

But when I tryed to connect using Delphi 10 I didn't have any trouble.

Someone has a issue fix for this case?
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

You could try and have a look at the TZSQLMonitor output to check what db he tries to connect to. Maybe the name string is not handled correctly.
If there the name is correct, you'll have to debug the TZAbstractConnection.open mplementation for the driver you use. (TZDBLibConnection or TZAdoConnection)
Looking at it, when you use ADO it might be necessary to change the

Code: Select all

FAdoConnection.Open(Database, User, Password, -1{adConnectUnspecified});
line the way it's done for most other drivers (eg dblib)

Code: Select all

  {$IFDEF DELPHI12_UP}
  if FPlainDriver.dbUse(FHandle, PAnsiChar(UTF8String(Database))) <> DBSUCCEED then
  {$ELSE}
  if FPlainDriver.dbUse(FHandle, PAnsiChar(Database)) <> DBSUCCEED then
  {$ENDIF}
I hope you find the solution and post the results here so I can integrate the fix.

Mark
Image
jeckson
Fresh Boarder
Fresh Boarder
Posts: 3
Joined: 28.01.2010, 19:52

Post by jeckson »

I will to use the ADO protocol, mounting a connection string ADO.

Only think that should operate normally using MSSQL protocol, as the BDS2006.
Post Reply