Delphi Tokyo Version Firedac connection MSSQL2000 prompt object name ' SYS. DATABASES ' Invalid

Source: Internet
Author: User
Tags odbc sql server driver mssql odbc sql server driver

In the Delphi 10.2.1 Tokyo version, FireDAC is not compatible with MSSQL2000 by default, prompting "[FIREDAC][PHYS][ODBC][MICROSOFT][ODBC SQL Server Driver][sql Server] Object name ' SYS. DATABASES ' is invalid. "Error, fix for this need to modify the FireDAC.Phys.MSSQL.pas unit:

First copy the FireDAC.Phys.MSSQL.pas file from the Delphi directory, then open it, comment out {$I firedac.inc}, and find the "procedure Tfdphysmssqlconnection.internalsetmeta; ", and then find" scompatlvl: = ' (select Compatibility_level from SYS.) DATABASES WHERE LOWER (NAME) = ' +ansilowercase (scurcatalog) + ') '; ', modify it to:

12345 if oconnmeta serverversion >= svMSSQL2008 then     scompatlvl: =

After the above steps, the completion of FIREDAC compatible MSSQL2000 modification.

This is a copy of the Internet, but there are some details to be done.

1. Delete the FireDAC.Phys.MSSQL.dcu file from your Delphi installation directory and record the path of the FIREDAC.PHYS.MSSQL.DCU.

2. At this time, the compiler will be prompted to find the FireDAC.Phys.MSSQL.pas file, copy the file into your program directory, compile and build FIREDAC.PHYS.MSSQL.DCU

3. Copy the generated FIREDAC.PHYS.MSSQL.DCU file to the original directory. So you don't need to put a copy of the FireDAC.Phys.MSSQL.pas file for every project.

Delphi Tokyo Version Firedac connection MSSQL2000 prompt object name ' SYS. DATABASES ' Invalid

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.