单项选择题
关于数据库连接字符串代码正确的是()
A.private static string DBConnectString ="server=.;database=FreshLiveDB;uid=sa;pwd=123;";
B.private static string DBConnectString ="server=.;database=FreshLiveDB;id=sa;pwd=123;";
C.private static string DBConnectString ="server=.;database=FreshLiveDB;id=sa;password=123;";
D.private static string DBConnectString ="server=.;database=FreshLiveDB;name=sa;pwd=123;";
点击查看答案
相关考题
-
单项选择题
关于SqlCommand命令对象编写正确的是()
A.SqlCommand cmm =new SqlCommand(sql语句,Connection对象);
B.SqlCommand cmm =new SqlCommand(Connection对象,sql语句);
C.SqlCommand cmm =new SqlCommand(sql语句);
D.SqlCommand cmm =new SqlCommand(Connection对象); -
多项选择题
关于DataGridView控件的属性描述正确的有()
A.Rows获取总条数
B.DataSource 获取数据源
C.Name 获取控件的名称
D.Columns 获取总列的名称 -
单项选择题
FormatException是()
A.算术异常
B.参数格式错误异常
C.非法参数异常
D.数组下标越界异常
