与C#窗口形式的SQL连接plz help :( [英] sql connection with C# window form plz help :(

查看:64
本文介绍了与C#窗口形式的SQL连接plz help :(的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨Firends,

Hi Firends,

SqlConnection con = new SqlConnection(@"Server=NGENIOUS-WSSDEV\SQLEXPRESS;Database=MIC;Trusted_Connectopn= True");
            SqlCommand cmd = new SqlCommand("select * from measurmentunit");
            con.Open();
            DataSet ds = new DataSet();
            SqlDataAdapter da = new SqlDataAdapter();
            da.Fill(ds);
            con.Close();




我正在使用此代码在页面加载时连接sql数据库,但它给了我不受支持的Argument Exception关键字"test_connectopn = true"


我正在使用sql server express 2005和C#2008.




I am using this code to connect the sql database on the page load but it is giving me Argument Exception keyword not supported "test_connectopn=true"


i am using sql server express 2005 and C# 2008.

推荐答案

检查"Trusted_Connection"的拼写.
Check the spelling of "Trusted_Connection".


这篇关于与C#窗口形式的SQL连接plz help :(的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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