#1 2014-11-14 09:40:27

danielkuettner
Member
From: Germany
Registered: 2014-08-06
Posts: 357

mssql+odbc

Hi AB,

after working with Fb+Zeos without problems, now I've to connect mORMot to mssql 2008 in an other project.
After trying Zeos without success (Michael knows this problems) I've tried to connect with ODBC.
The connection works, but ther are exceptions after CreateMissingTables(0):

Here is a link to this problem.

http://support.microsoft.com/kb/175313/en-us

I hope you could do something to work with mssql.

AFAIR there are these options:

DB.AcquireExecutionMode[execORMWrite] := amBackgroundThread;
DB.AcquireExecutionMode[execORMGet] := amBackgroundThread;

But with this the errors are still there.

Regards,
Daniel

Last edited by danielkuettner (2014-11-14 09:46:16)

Offline

#2 2014-11-14 12:31:59

danielkuettner
Member
From: Germany
Registered: 2014-08-06
Posts: 357

Re: mssql+odbc

I've  got it with TOleDBMSSQLConnectionProperties, whithout setting amBackgroundThread. Why it works and ODBC not?

Offline

#3 2014-11-14 13:56:01

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,661
Website

Re: mssql+odbc

AFAIK our SynDBODBC unit handle one connection per thread, so you should not see such issue.
I suspect there is something wrong with our provider definition.

Nevertheless, for MS SQL OleDB is the #1 mean of connection, and will get the best performance.

Offline

#4 2014-11-14 15:43:36

danielkuettner
Member
From: Germany
Registered: 2014-08-06
Posts: 357

Re: mssql+odbc

Thanks for your answer. With SynOleDB I've getting an unspecified exception. I'll post if I get further problems.

Offline

#5 2014-11-16 09:31:48

danielkuettner
Member
From: Germany
Registered: 2014-08-06
Posts: 357

Re: mssql+odbc

Hi Arnaud,

after reading in the forum I've founded this:

http://synopse.info/forum/viewtopic.php?pid=7317#p7317

AB wrote:

Yes, OleDB is officially deprecated.
See our blog article: http://blog.synopse.info/post/2012/02/2 … enjoy-ODBC!

Now I don't understand nothing more.

I've also read your Post here: http://stackoverflow.com/questions/9082 … nt-drivers

I'm a little bit confused about all. All what I want is a multi-threaded connection to mssql-DB with very high performance to serve many clients with one mORMot server, because I don't want many mORMot servers which have to replicate their data.

I also have in mind, that Zeos is the preferred library for DB-connections under mORMot. Therefore I would love to use Zeos for all my DB-Connections.

Best regards,
Daniel

Offline

#6 2014-11-16 13:00:22

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,661
Website

Re: mssql+odbc

ZDBC is the #1 general purpose DB library to be used with mORMot.
It is much better integrated, faster, Open Source (and free) than the DB.pas based alternatives we support, like FireDAC/UniDAC/DBExpress/BDE.

But our direct SynDBSQlite3, SynOracle and SynOleDB units gives better performance, so may be preferred.
And SynODBC may also be used with most DB, without the need to download and install Zeos.

Currently, SynODBC is not optimized for speed, and works much slower than SynOleDB for connection to MS SQL.
So even if MS did official deprecate OleDB for MS SQL, SynOleDB is the preferred way of connection to MS SQL.

So if you need "multi-threaded connection to mssql-DB with very high performance to serve many clients with one mORMot server", use SynOleDB.

Offline

#7 2018-03-27 06:44:52

wloochacz
Member
Registered: 2015-01-03
Posts: 45

Re: mssql+odbc

Great news for SynOLEDB smile
"The OLE DB story at last has clarity. Microsoft has decided to undeprecate (a new word) OLE DB and will be releasing a new OLE DB provider, Microsoft OLE DB Driver for SQL Server (MSOLEDBSQL), in Q1 2018."
Source:
http://www.dbdelta.com/deprecated-sql-s … hnologies/
and
https://blogs.msdn.microsoft.com/sqlnat … ql-server/

Offline

#8 2018-03-27 07:19:17

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,661
Website

Re: mssql+odbc

wink

Offline

#9 2018-03-27 08:15:59

mpv
Member
From: Ukraine
Registered: 2012-03-24
Posts: 1,571
Website

Re: mssql+odbc

But will it work under Linux?  Sergey already create a pull request for SynODBC and now we can use it on both windows and Linux. Including array binding for select statement

Last edited by mpv (2018-03-27 08:17:21)

Offline

#10 2018-03-30 10:45:12

wloochacz
Member
Registered: 2015-01-03
Posts: 45

Re: mssql+odbc

OLEDB is Windows specific only.
For Linux, You must use ODBC, i guess...

Offline

Board footer

Powered by FluxBB