在ASP.NET项目中,为了提高连接数据库的灵活性,想将数据库的连接字符串保存在配置文件中,在网站启动的时候动态读取,那么连接字符串应保存在()。
A.machine.config文件的 <configsetions> 节
B.machine.config文件的 <appsettings> 节
C.Web.Config文件的 <configsetions> 节
D.Web.Config文件的 <appsettings> 节
A.machine.config文件的 <configsetions> 节
B.machine.config文件的 <appsettings> 节
C.Web.Config文件的 <configsetions> 节
D.Web.Config文件的 <appsettings> 节
A、在Application.Start事件处理程序中初始化一个新的Cache类实例
B、在Page.Load事件处理程序中初始化一个新的Timer类的实例
C、在页面中的OutputCache指令中设置Duration属性
D、在Web.config 文件中,在sessionState节设置timeout属性
A、str="server=.,uid="zhangsan",pwd="123",database=mydb"; SqlConnection con=new SqlConnection;
B、str="server=.;uid="zhangsan";pwd="123";database=mydb"; SqlConnection con=new SqlConnection;
C、str="server=.;uid=zhangsan;pwd=123;database=mydb"; SqlConnection con=new SqlConnection;
D、str="server=.,uid=zhangsan,pwd=123,database=mydb"; SqlConnection con=new SqlConnection;
A、定义一个源于System.EnterpriseServices.ServicesComponent的类来运行存储过程。使用一个TransactionAttribute类型的属性(特征)注释该类。设置其Value值为 TransactionOption.RequiresNew
B、创建一个控制存储过程。用这个控制存储过程调用完成月末操作所需的其他的存储过程。添加WITH REPEATABLEREAD到控制存储过程中。
C、当一个存储过程失败时使用结构异常句柄获取SqlException。使用SqlExceptionProcedure属性去识别哪个存储过程产生异常,并且调用一个存储过程来保存先前的计结果。
D、设置SqlTransaction对象的IsolationLevel属性为IsolationLevel.Serializable。将SqlTransaction对象赋值为SqlCommand对象的Transaction属性。使用一个SqlCommand对象运行存储过程
A. System.Data
B. System.Data.SqlClient
C. System.OleDB
D. System.Data.OleDb
此题为判断题(对,错)。
为了保护您的账号安全,请在“简答题”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!