Recent

Author Topic: [SOLVED] Zeos lib 7.3 problem connection to sqlserver 2014  (Read 3474 times)

superc

  • Full Member
  • ***
  • Posts: 241
[SOLVED] Zeos lib 7.3 problem connection to sqlserver 2014
« on: November 27, 2019, 09:05:46 am »
Hello,

I've develop an application can connect without problem to Sqlserver 2014:
I use Zeos with protocol 'FreeTDS_MsSQL>=2005' and I set library location with current executable directory, and works fine
with the precompiled dll 1.1.21 of Freetds.

From another pc in production I copied executable and all directory and run program but receive this error:
'Client-Library .....dblib.dll' found but could not be loaded. Check compile-target and library compatibility'....
I'm using the same library, the pc is the same Windows 10 64 Bit in this machine and I try to recompile,
but nothing of nothing... same error...

recapping everything:

in production's pc with windows 10 64 bit with executable program 32 bit, Freetds 32 bit dll, program works fine.....
On my pc (Windows 10 64 bit ) both version (32bit and 64 bit) works well , but if i move 64 bit dll, and my program 64 bit from my pc to production pc I receive the error....

It's very strange error, I don't undestand why,

Thanks in advance.
« Last Edit: November 27, 2019, 10:56:41 am by superc »

440bx

  • Hero Member
  • *****
  • Posts: 3946
Re: Zeos lib 7.3 problem connection to sqlserver 2014
« Reply #1 on: November 27, 2019, 09:13:31 am »
receive this error:
'Client-Library .....dblib.dll' found but could not be loaded. Check compile-target and library compatibility'....
from what you've said, it sounds like the dll that is found does _not_ match the bitness of the program.

One simple thing you could do to determine if that is the problem is, rename both dll's to dblib32.dll and dblib64.dll, link against xxx32 or xxx64 depending on the bitness your program is using and see if you still get the problem.

HTH.
(FPC v3.0.4 and Lazarus 1.8.2) or (FPC v3.2.2 and Lazarus v3.2) on Windows 7 SP1 64bit.

superc

  • Full Member
  • ***
  • Posts: 241
Re: Zeos lib 7.3 problem connection to sqlserver 2014
« Reply #2 on: November 27, 2019, 09:23:37 am »
No, don't work....

Is it possible that the dblib has other dependent 64-bit dlls that in my pc are satisfied, while in the other they are not and what I get is a generic error?

440bx

  • Hero Member
  • *****
  • Posts: 3946
Re: Zeos lib 7.3 problem connection to sqlserver 2014
« Reply #3 on: November 27, 2019, 09:31:04 am »
No, don't work....

Is it possible that the dblib has other dependent 64-bit dlls that in my pc are satisfied, while in the other they are not and what I get is a generic error?
Yes, that is possible and, from the error message you're getting, it's reasonable (but not certain) that one of the dependent dlls found is not the right bitness.

The "Depends" utility may be helpful in this case.  It will show you a dependency tree.  Inspecting the tree might help determine what dll is causing the problem.

You can download the Depends utility from http://www.dependencywalker.com/
(FPC v3.0.4 and Lazarus 1.8.2) or (FPC v3.2.2 and Lazarus v3.2) on Windows 7 SP1 64bit.

superc

  • Full Member
  • ***
  • Posts: 241
Re: Zeos lib 7.3 problem connection to sqlserver 2014 [Solved]
« Reply #4 on: November 27, 2019, 10:55:29 am »
I have resolved this problem!!!!!


With the walker dependency I saw the missing dependency ie the MSVCR100.DLL present in Microsoft visual C ++ 2010 Red Pack x64; installed this package, the program work..

Thanks 440bx for the good idea.

 :D
« Last Edit: November 27, 2019, 10:57:17 am by superc »

440bx

  • Hero Member
  • *****
  • Posts: 3946
Re: Zeos lib 7.3 problem connection to sqlserver 2014 [Solved]
« Reply #5 on: November 27, 2019, 11:08:16 am »
Thanks 440bx for the good idea.

 :D
You're welcome. I'm pleased the suggestion was helpful and you solved the problem. :)
(FPC v3.0.4 and Lazarus 1.8.2) or (FPC v3.2.2 and Lazarus v3.2) on Windows 7 SP1 64bit.

 

TinyPortal © 2005-2018