连接到SQL 2005 localhost时出现问题 [英] Problem with connect to SQL 2005 localhost

查看:157
本文介绍了连接到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时出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆