Recent

Author Topic: dblib.dll  (Read 48126 times)

Zath

  • Sr. Member
  • ****
  • Posts: 391
dblib.dll
« on: April 03, 2013, 11:03:32 pm »
My attempts at creating a MS SQL connection or ODBC connection keep failing sayin I need dblib.dll.
I have now managed to find it.
Excuse my ignorance but what do I do with it now ?
I'm using v1.0.8
FPC2.62
SVN 40573
i386-win32-win32/win64

Thank you.

Lacak2

  • Guest
Re: dblib.dll
« Reply #1 on: April 04, 2013, 07:15:27 am »
dblib.dll is needed only for TMSSQLConnection
(for TODBCConnection you do not need it)
Just put this dll into your application directory.
(where is your  compiled EXE)

Zath

  • Sr. Member
  • ****
  • Posts: 391
Re: dblib.dll
« Reply #2 on: April 06, 2013, 01:42:17 am »
dblib.dll is needed only for TMSSQLConnection
(for TODBCConnection you do not need it)
Just put this dll into your application directory.
(where is your  compiled EXE)

Thanks but it still fails.

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: dblib.dll
« Reply #3 on: April 06, 2013, 07:32:42 am »
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

Zath

  • Sr. Member
  • ****
  • Posts: 391
Re: dblib.dll
« Reply #4 on: April 06, 2013, 01:05:31 pm »
No idea what you mean by "it" or "fails"

http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

If I create a basic form with an MSSQL connection component on it, populate it's settings for the database, leave Connected as false, it compiles as a blank form. Fine.
If I then try and compile it with the MSSQL component Connection property set to true, it says it can't find the dll it needs.

Here's a screenshot.


BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: dblib.dll
« Reply #5 on: April 06, 2013, 01:56:57 pm »
Screenshot seems to show you're not compiling but switching on the connected property to true while in design-time.

IIRC, the dll should then be in the Lazarus directory. Another alternative is to put it in the system directory, which I do on my dev machine.

When you compile the program, once again the dll needs to be in the search path (e.g. the system directory) or the executable directory.

This applies to all dlls used with Lazarus - or at least all database drivers.
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

anis2505

  • Full Member
  • ***
  • Posts: 201
Re: dblib.dll
« Reply #6 on: May 06, 2013, 03:47:28 pm »
Screenshot seems to show you're not compiling but switching on the connected property to true while in design-time.

IIRC, the dll should then be in the Lazarus directory. Another alternative is to put it in the system directory, which I do on my dev machine.

When you compile the program, once again the dll needs to be in the search path (e.g. the system directory) or the executable directory.

This applies to all dlls used with Lazarus - or at least all database drivers.

Hi sorry for waking this issue again from the dead BUT I have the dlls it's on my project directory side by side with the executable but no chance I did compiled lots of time but still the same error metioned by Zath

Thanks in advance

regards
Dear Confucius you said {A picture is worth a thousand words}
I say {a good example is worth a thousand words}

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11782
  • FPC developer.
Re: dblib.dll
« Reply #7 on: May 06, 2013, 08:02:12 pm »
Read the comments better. If you set the connection's enable property to true designtime, then both the Lazarus IDE and the application must find the DLL.

« Last Edit: August 21, 2016, 03:52:16 pm by marcov »

anis2505

  • Full Member
  • ***
  • Posts: 201
Re: dblib.dll
« Reply #8 on: May 06, 2013, 08:18:04 pm »
Read the comments better. If you set the connection's enable property to true designtime, then both the Lazarus IDE and the application must fine the DLL.

Take it easy.
My problem isn't on open or closed connection my problem is the executable doesn't detect the dlls.
Dear Confucius you said {A picture is worth a thousand words}
I say {a good example is worth a thousand words}

Pascaluvr

  • Full Member
  • ***
  • Posts: 216
Re: dblib.dll
« Reply #9 on: May 06, 2013, 09:34:36 pm »
Ansi - if the connection wasn't set to Open then Laz wouldn't need to find the DLL.

On a Windows 7 system (that I am guessing you have) - place the DLL in c:\Windows\SysWOW64
Windows 7, Lazarus 1.0.8, FPC 2.6.2, SQLite 3

anis2505

  • Full Member
  • ***
  • Posts: 201
Re: dblib.dll
« Reply #10 on: May 07, 2013, 10:13:10 am »
Hi

Now I get this error
Quote
Server name not found in configuration files
Unknown host name machine

The same configuration work fine for VS ASP.NET, Real studio, HeidiSQL and of-course SQL Server Management Studio.

So please someone provide me with an example of correct configuration.

Thanks in advance and sorry for bother and BTW again take it easy "MARCOV" :).
Dear Confucius you said {A picture is worth a thousand words}
I say {a good example is worth a thousand words}

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11782
  • FPC developer.
Re: dblib.dll
« Reply #11 on: May 07, 2013, 02:08:13 pm »
Take it easy.
My problem isn't on open or closed connection my problem is the executable doesn't detect the dlls.

I suspected the Lazarus IDE might want to load the DLL at the moment a connection goes live, or if you try to edit fields (populating with schema data from the database-> connection).

What other packages do is irrelevant. Put a copy of the DLL (1) next to the application (2) next to the IDE (3) a place where both applications search.

In the case that you have mixed 32-bit/64-bit environments, please note so.

Zath

  • Sr. Member
  • ****
  • Posts: 391
Re: dblib.dll
« Reply #12 on: July 03, 2013, 07:38:56 pm »
Just thought I'd bump this again.

The same error has appeared again after installing the latest Lazarus version.

Can't this dll be included with lazarus so it is made available when using these components ?

goodname

  • Sr. Member
  • ****
  • Posts: 297
Re: dblib.dll
« Reply #13 on: July 04, 2013, 04:25:48 pm »
Can't this dll be included with lazarus so it is made available when using these components ?

I'm sure MS would not be happy about other projects or companies distributing their dll's. Know of a MS boot CD that had this issue and basically ended up saying go to the install CD you got with your windows operating system to get the required dll files.

Even if they could legally include the dll there is no way to know which SQLServer version your running and dll's usually change with the server version it is connecting to.

In the end it is MS job to provide the basic ability to connect to their product. Lazarus has provided the wrapper to be able to use that basic connection tool. If you find a problem connecting to a specific dll version then let the Lazarus project people know so they can do something about the wrapper.

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: dblib.dll
« Reply #14 on: July 04, 2013, 04:47:59 pm »
Except dblib.dll is not an MS dll in this case; it can be generated by FreeTDS.

See here:
http://wiki.lazarus.freepascal.org/mssqlconn
and here for a download location:
ftp://ftp.freepascal.org/fpc/contrib/windows/
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

 

TinyPortal © 2005-2018