#1 2023-05-27 02:11:14

Mark
Member
Registered: 2013-11-30
Posts: 19

MSSQL2019 Class not registered

Hi, AB

I have upgrade to win11 with SQL2019, installed "Microsoft OLE DB Driver for SQL Server".
But, when the win32 client to Rest server showing "Internal Server Error".

It's OK when MSSQL2016 in Win10, installed "Microsoft OLE DB Driver for SQL Server".

my connection code:
    aProps := TSqlDBOleDBMSSQL2008ConnectionProperties.Create('tcp:127.0.0.1,1433','DB','Name','Password');
    aProps := TOleDBMSSQL2012ConnectionProperties.Create('tcp:127.0.0.1,1433','DB','Name','Password');
    aProps := TSqlDBOleDBMSSQL2018ConnectionProperties.Create('tcp:127.0.0.1,1433','DB','Name','Password');   

I have tried 3 versions, always shows "Internal Server Error".

See the Log:
0000000000772D1F  ' SQL       mormot.db.sql.oledb.TSqlDBOleDBConnection(05510710) SELECT * FROM TABLE1
0000000000772D27  ' EXC       EOleSysError 0x80040154 {Message:"Class not registered"} [HttpSrv 8080apps prog THttpApiS] at 01002ba3cf 

What's wrong in my coding ?

Thanks for your help.

Mark

Offline

#2 2023-06-07 09:48:21

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

Re: MSSQL2019 Class not registered

Are you sure you have installed the proper OleDB driver for the proper 32-bit or 64-bit application?

Offline

#3 2023-06-08 05:29:38

Mark
Member
Registered: 2013-11-30
Posts: 19

Re: MSSQL2019 Class not registered

Hi ! AB,

I have solved the MSSQL2019 issue.
MSSQL2019 Server need the previous version sql native client 2012 to work .

Update you.

https://stackoverflow.com/questions/760 … sql-native
https://www.microsoft.com/en-us/downloa … x?id=50402

BTW, I want to cross platform deployment, I have tried DBZeros connection, but not success.
It seems not easy to implement?

Mark

Offline

#4 2023-06-08 06:35:27

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

Re: MSSQL2019 Class not registered

For Zeos connection, it should work.
Perhaps ask on the Zeos forum for more specific help.

Offline

#5 2023-06-08 20:45:08

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

Re: MSSQL2019 Class not registered

Please, note what OleDB is deprecated, see https://learn.microsoft.com/en-us/sql/r … rver-ver16

We use ODBC on both nix and Windows last year, works OK

Offline

#6 2023-06-12 04:32:59

Mark
Member
Registered: 2013-11-30
Posts: 19

Re: MSSQL2019 Class not registered

Hi, mpv,

I also notice this message.

I am finding solution that not depends on M$ (always kidding to developer, M$ always builds a house and then destroy : > )

But some existing apps using M$SQL, need to maintain.

Please point me to using ODBC  with example.

Thanks.

Mark

Offline

#7 2023-06-12 12:54:41

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

Re: MSSQL2019 Class not registered

Replace your OleDBConnectionProperties with TODBCConnectionProperties (mORMot1) / TSqlDBOdbcConnectionProperties (mORMot2) - see Create method docs for examples

Offline

#8 2023-06-13 02:12:56

Mark
Member
Registered: 2013-11-30
Posts: 19

Re: MSSQL2019 Class not registered

Good idea,
Good idea,
Welcome to Linux world !

Offline

Board footer

Powered by FluxBB