当前位置:系统粉 > 电脑问答 > 其他问答 > 应该如何理解被注释的地方

应该如何理解被注释的地方

提问者:花依樣小颖  |  浏览 次  |  提问时间:2017-01-17  |  回答数量:2

应该如何理解被注释的地方 using System;using System.Collections.Generic;using System.Text;using System.Data;using System.Data.SqlClient;namespace ClassLibrary3{ public class Class1 { private static readonly string URL = \"Data Source=.;Initial Catalog=MyQQ;Integrated Security=True\"; private static SqlConnection conn = new SqlConnection(URL); public static int ExecuteNonQuery(string sql) { try { SqlCommand comm = new SqlCommand(sql, conn); conn.Open(); return comm.ExecuteNonQuery(); } catch (Exception ex) { throw ex; }

已有2条答案
示疼

示疼

回答数:66  |  被采纳数:9

2017-01-17 06:00:15
创建一个 名为 ds 的数据集
//DataSet ds = new DataSet();
创建一个DataAdapter来执行要查询的SQL语句
//SqlDataAdapter sda = new SqlDataAdapter(sql, conn);
将查询出来的结果 填充到ds 里面
//sda.fill(ds);
返回 ds
//return ds;

大概就是这样
赞 6
贺枝枝

贺枝枝

回答数:120  |  被采纳数:113

2017-01-17 08:31:19
很详细.....[s:526]感谢[s:524]
赞 12
解决方法
版权信息

Copyright @ 2011 系统粉 版权声明 最新发布内容 网站导航