连接到SQL 2005 localhost时出现问题

编程入门 行业动态 更新时间:2024-10-19 08:50:01
本文介绍了连接到SQL 2005 localhost时出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

您好! 我使用MySqlConnection。

con = 新 MySqlConnection( Server = + _host + ;用户ID = + _user + ; Password = + _pass + ;) 私有 _host 作为 字符串 = localhost\SQLEXPRESS Private _user 作为 字符串 = sava 私有 _pass As 字符串 = sava1

它返回我试试Catch as:无法连接到任何指定的Mysql主机 全部连接数据是真的,谢谢它。 并且最好与Mysql DataBase一起使用?

解决方案

你有SQLEXPRESS并尝试使用 MySqlConnection 连接到它。 SQLExpress(Microsoft)和MySql(Oracle)是两个完全不同的数据库引擎。 看看这里: 初学者指南,通过C#访问SQL Server [ ^ ] 祝你好运!

Hello! I use MySqlConnection.

con = New MySqlConnection("Server=" + _host + ";User Id=" + _user + ";Password=" + _pass + ";") Private _host As String = "localhost\SQLEXPRESS" Private _user As String = "sava" Private _pass As String = "sava1"

It return me Try Catch as: Unable to connect to any of the specified Mysql hosts All connections data is true, cheked it. And that it is better to use with Mysql DataBase?

解决方案

You have SQLEXPRESS and try to connect to it using MySqlConnection. SQLExpress (Microsoft) and MySql (Oracle) are two completely different database engines. Have a look here: Beginners guide to accessing SQL Server through C#[^] Good luck!

更多推荐

连接到SQL 2005 localhost时出现问题

本文发布于:2023-11-23 20:41:46,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1622806.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:连接到   SQL   localhost

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!