how to connect the ms sql server 2K on ubuntu system?
Moderators: gto, cipto_kh, EgonHugeist
-
- Fresh Boarder
- Posts: 5
- Joined: 03.06.2007, 04:26
how to connect the ms sql server 2K on ubuntu system?
I get the error message miss ntwdblib.dll when I connect the ms sql server.
who can help me?
who can help me?
-
- Fresh Boarder
- Posts: 6
- Joined: 09.08.2006, 09:48
Hello charles_zou,
download following file
http://www.galileocomputing.de/dateien/ ... stenID-243
Save in "windows\system32" directory. Should work now.
download following file
http://www.galileocomputing.de/dateien/ ... stenID-243
Save in "windows\system32" directory. Should work now.
-
- Fresh Boarder
- Posts: 5
- Joined: 03.06.2007, 04:26
-
- Fresh Boarder
- Posts: 5
- Joined: 03.06.2007, 04:26
-
- Fresh Boarder
- Posts: 5
- Joined: 03.06.2007, 04:26
-
- Fresh Boarder
- Posts: 5
- Joined: 03.06.2007, 04:26
- mdaems
- Zeos Project Manager
- Posts: 2766
- Joined: 20.09.2005, 15:28
- Location: Brussels, Belgium
- Contact:
Thanks for the patch. It doesn't compile on my Windows/Delphi7 installation, however.
Fails on
with message
Mark
Fails on
Code: Select all
OldErrorHandle := dberrhandle(ErrorHandle);
OldMessageHandle := dbmsghandle(MessageHandle);
Do you know what's wrong? When I have a working version on both Linux and Windows, I'll certainly commit it.[Error] ZPlainDbLibMsSql7.pas(785): Incompatible types: 'Calling conventions differ'
[Error] ZPlainDbLibMsSql7.pas(786): Incompatible types: 'Calling conventions differ'
[Fatal Error] ZPlainDbLibDriver.pas(867): Could not compile used unit '..\..\src\plain\ZPlainDbLibMsSql7.pas'
Mark
I am attempting to connect to SQL Server from Linux, and I am not certain how to proceed. Was the new ZPlainDbLibMsSql7.pas file ever rolled into the ZeosLib release? If not, how do I include the update into my copy of the components (I don't know how to rebuild the package)? And what do I need to set the TZConnection object properties to in order to connect ... I have tried setting the Protocol to "mssql" (which works on Windows) but I still get the error "None of the dynamic libraries can be found: ntwdblib.dll"?
Thanks, Andy
Thanks, Andy
Hi Guys,
just one question since I'm not an Ubuntu (Linux) user: How is the Windows environment on your Linux installation implemented? Or: How do you run Delphi7 under Ubuntu? If you haven't any possibility to access the SQL-Server protocols/drivers or ADO you will imho get no connection to MSSQL ...
just one question since I'm not an Ubuntu (Linux) user: How is the Windows environment on your Linux installation implemented? Or: How do you run Delphi7 under Ubuntu? If you haven't any possibility to access the SQL-Server protocols/drivers or ADO you will imho get no connection to MSSQL ...
- mdaems
- Zeos Project Manager
- Posts: 2766
- Joined: 20.09.2005, 15:28
- Location: Brussels, Belgium
- Contact:
Michael,
There's always lazarus. No need for Delphi on Linux.
AndyK,
The question remains : what system driver are you using to connect with MSSQL. Is there a ntwdblib.dll equivalent available for Ubuntu or is there an ADO implementation available?
Anyhow, I don't believe Zeoslib can find the necessary libraries on Ubuntu yet. Extra development will be needed to add this.
If it's just about pointing to a linux version of ntwdblib.dll this shouldn't be difficult. Just adding the right name to the plainloader class as long as the entry points are available in the library.
If we must enable ADO support this might require more work as ADO protocol isn't available on Lazarus yet.
Mark
There's always lazarus. No need for Delphi on Linux.
AndyK,
The question remains : what system driver are you using to connect with MSSQL. Is there a ntwdblib.dll equivalent available for Ubuntu or is there an ADO implementation available?
Anyhow, I don't believe Zeoslib can find the necessary libraries on Ubuntu yet. Extra development will be needed to add this.
If it's just about pointing to a linux version of ntwdblib.dll this shouldn't be difficult. Just adding the right name to the plainloader class as long as the entry points are available in the library.
If we must enable ADO support this might require more work as ADO protocol isn't available on Lazarus yet.
Mark
All,
I'm pretty sure there is no such thing as ADO on Linux so we can't expect much from the Lazarus team regarding that.
The only way I can find to access MS SQL server fron *nix is via http://www.freetds.org/. This includes a standard library and an ODBC driver so it's a start. As I understand it, a new protocol would need to be created in Zeos to use this library.
Regards,
Ben
I'm pretty sure there is no such thing as ADO on Linux so we can't expect much from the Lazarus team regarding that.
The only way I can find to access MS SQL server fron *nix is via http://www.freetds.org/. This includes a standard library and an ODBC driver so it's a start. As I understand it, a new protocol would need to be created in Zeos to use this library.
Regards,
Ben
Mark,
Thank you for your reply ... this is the best glimmer of hope that I have had with this problem! I can see the"DLL_LOCATION = 'ntwdblib.dll'" line in the file ZPlainDbLibMsSql7.pas file, and it seems that the file "libsybdb.so" is the equivalent of that DLL in FreeTDS. So I just need to change that "ntwdblib.dll" to "libsybdb.so" on that line in the ZEOS source? And after changing it how do I incorporate this into Lazarus (that is, what do I choose from the Lazarus menu to rebuild/reload the ZEOS package with that change in place).
Again, thank you for helping me with this!
Andy
Thank you for your reply ... this is the best glimmer of hope that I have had with this problem! I can see the"DLL_LOCATION = 'ntwdblib.dll'" line in the file ZPlainDbLibMsSql7.pas file, and it seems that the file "libsybdb.so" is the equivalent of that DLL in FreeTDS. So I just need to change that "ntwdblib.dll" to "libsybdb.so" on that line in the ZEOS source? And after changing it how do I incorporate this into Lazarus (that is, what do I choose from the Lazarus menu to rebuild/reload the ZEOS package with that change in place).
Again, thank you for helping me with this!
Andy
- mdaems
- Zeos Project Manager
- Posts: 2766
- Joined: 20.09.2005, 15:28
- Location: Brussels, Belgium
- Contact:
AndyK,
There's quite a lot of conditions to get this work.
- The dll must have the same names for the entry points of all function.
- The buffers must have the same dimensions.
- The protocol used by FreeTDS must be of the same verion as your server used (is the FreeTDS project still active?)
I think the easiest way to get the modified zeoslib version active in Lazarus is to rebuild Lazarus. I think that automatically rebuilds your Zeoslib components when they have changed. If not just open the components package and 'recompile all what's needed by the package'.
Good luck and report here!!
Mark
There's quite a lot of conditions to get this work.
- The dll must have the same names for the entry points of all function.
- The buffers must have the same dimensions.
- The protocol used by FreeTDS must be of the same verion as your server used (is the FreeTDS project still active?)
I think the easiest way to get the modified zeoslib version active in Lazarus is to rebuild Lazarus. I think that automatically rebuilds your Zeoslib components when they have changed. If not just open the components package and 'recompile all what's needed by the package'.
Good luck and report here!!
Mark
@All:
In order to get the Zeos Components rebuilt you have to rebuild Lazarus ... b u t ... before that you also have to delete the files in [font=Courier New]\packages\lazarus\build[/font] ... then you can be sure that Lazarus also recompiles the ZeosLib with the modified code.
Also from me: Good Luck!
In order to get the Zeos Components rebuilt you have to rebuild Lazarus ... b u t ... before that you also have to delete the files in [font=Courier New]\packages\lazarus\build[/font] ... then you can be sure that Lazarus also recompiles the ZeosLib with the modified code.
Also from me: Good Luck!