Delphi Ado可以找到MSSQL 2019服务器

发布于 2025-01-20 22:15:10 字数 1187 浏览 1 评论 0原文

我需要将旧的2008 MSSQL更新为2019 Express。 (两者都可以在同一台计算机上本地访问)

据我所知,这起作用了,因为我可以在SQL Server Management Studio中看到我的数据库。在我看来,这正在起作用。 测试时关闭旧服务器。

(我测试的方式是,我还确保在新的新服务器 使很难升级)无法通过ADO连接到MSSQL2019,这似乎是……

使示例简单...我在IDE中有tocnoctection。作为连接的服务器,我选择了自己的计算机,其中安装了MSSQLServerExpress2019。 (与2008年相同)我选择“使用窗口nt nt Integrated Security”(我也为MSSQL2019Express选择了)

然后,我尝试在服务器上选择数据库...这给出了错误:

[dbnetlib [ConnectionOpen(Connect()。] SQL Server不存在或 访问被拒绝

我正在尝试确定...我该如何解决。我有点惊讶ADO机制停止工作...也许我可以设置的MSSQL2019 Express中有一些设置?

连接字符串是:

提供者= sqloledb.1; password = xxx; persist Security info = true; user id = xx;初始目录= xxxxx; data source = myServerInstance

  1. sql Server在协议中具有

    对于MSSQLEXPRESS 2019启用了TCP/IP(我可以看到我仍然为我的旧MSSQL2008禁用它)

  2. SQL Server Configuration中为我的旧MSSQL2008)

    在MSSQLEXPRESS ANDOTOUR中使用的SQL Server配置中的

    已启用(我可以看到我可以看到我仍然为我的旧MSSQL2008禁用它)

  3. 在Delphixe4中,我在IDE中也尝试了ADO连接。在这里,我尝试了“ SQL Server的Microsoft Ole DB提供商”。相同的错误。

  4. 在delphixe4中,我也尝试了IDE中的ADO连接。在这里,我尝试了“ SQLNCli11.1”的提供商。这给出了错误的错误。

I needed to update my old 2008 MSSQL to 2019 Express. (Both accessed locally on the same computer)

This works as far as I can tell since I can see my database in SQL Server Management Studio. So seems to me that is working. (The way I test is I also make sure to have the old server shut down while testing on the new.)

However, my old Delphi 2010 software (which uses some old components for other things making it hard to upgrade) can not connect to MSSQL2019 through ADO it seems...

To make the example simple... I have my TADOConnection in my IDE. As server to connect to I choose my own computer where MSSQLServerExpress2019 is installed. (Same with 2008) I select "Use Window NT Integrated security" (which I also chose for MSSQL2019Express)

I then try select the database on server... This gives error:

[DBNETLIB[ConnectionOpen (Connect().]SQL Server does not exist or
access denied

I am trying to determine... How can I solve this. I am kinda surprised the ADO mechanism stopped working... Maybe there are some settings in my MSSQL2019Express I can set?

The connection string is:

Provider=SQLOLEDB.1;Password=xxx;Persist Security Info=True;User ID=XX;Initial Catalog=XXXXX;Data Source=mySERVERINSTANCE

HAVE TRIED

  1. In SQL Server Configuration I have in protocol for MSSQLExpress 2019 enabled TCP/IP (I can see I still have it disabled for my old MSSQL2008)

  2. In SQL Server Configuration I have in protocol for MSSQLExpress 2019 enabled Named pipes (I can see I still have it disabled for my old MSSQL2008)

  3. In DelphiXE4 I just also tried ADO connection in IDE. Here I have tried "Microsoft OLE DB Provider for SQL Server". Same error.

  4. In DelphiXE4 I just also tried ADO connection in IDE. Here I have tried "SQLNCLI11.1" for provider. This gives error comparable error.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

帅哥哥的热头脑 2025-01-27 22:15:10

我出现
source =。\ sqlexpress
或者
source = myComputer \ sqlexpress
对于MSSQLSERVER 2019,

例如在IDE ADO连接中,我可以使用以下方式连接到2008年的服务器:
源= mycomputer

谢谢大家。自从我上次查看此代码以来,这真是太久了,关于MSSQL以及我的设置如何完成以及我的代码在哪里做的事情变得如此生锈。

对不起,所有的困惑。但是非常感谢您的帮助。

希望这个答案可以想象可以对那里的某人有帮助。

I appears using
Source=.\SQLEXPRESS
or
Source=MyComputer\SQLEXPRESS
for MSSQLServer 2019

Funny thing in e.g. IDE ADO connection I can connect to my 2008 server just using:
Source=MyComputer

Thank you everyone. It just been so insanely long time since I last looked at this code, so rusty as hell with everything regarding MSSQL and how my setup was done and where my code did things.

Sorry for all the confusion. But thank you so much for your help.

Hopefully maybe this answer could conceivably be help to someone out there.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文