Forum > Database
Raspberry pi and sqlserver
superc:
Hello,
there are components can I use in Raspberry to connect to sqlserver?
Thanks in advance
af0815:
No problem here to connect with zeos and maybe with sqldb. The correct driver are more the problem.
Thaddy:
If you are using raspbian jessie sqldb works out of the box provided sqlserver is installed correctly and you have a client driver installed..
It only works with ODBC, though...
af0815:
with $sudo apt-get install freetds-bin libsybdb5 there are the correct freetds drives on Raspi for MS-SQL installed in
/usr/lib/arm-linux-gnueabihf/libsybdb.so.5 (=link)
/usr/lib/arm-linux-gnueabihf/libsybdb.so.5.0.0
with ZEOS you can access now
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} --- // SQLCon is a TZConnection from ZEOS DebugLn('Using Linux Connection'); SQLCon.Protocol := 'FreeTDS_MsSQL>=2005'; {$ifdef RasPi} SQLCon.LibraryLocation:= '/usr/lib/arm-linux-gnueabihf/libsybdb.so.5'; {$else} SQLCon.LibraryLocation:= '/usr/lib/x86_64-linux-gnu/libsybdb.so.5.0.0'; {$endif} SQLCon.HostName:= 'MSSQLServer'; SQLCon.User:= 'jondoe'; SQLCon.Password := 'secret'; SQLCon.Database:= 'mytestdb'; SQLCon.Properties.Add('appname=MyWorkingApp');
This code is working for me on Debian (PC) and Rasbian (RasPi3). Also on windows PC with the correct driver-dll.
Actual i have not found to change the drivers-nane and position in SQL-DB.
superc:
wow, now I will try and thank you very much :D.
Navigation
[0] Message Index
[#] Next page