社区
C#
帖子详情
读取表数据的小问题
casper_moonzhang
2007-04-13 02:44:39
现有一数据表,结构为:
f_no f_beginx f_endx
现想从表的第一行开始遍历整个表,依次取出每行的f_beginx和f_endx,并把他们的值分别赋予变量dbeginx和dendx
刚解除c#,请帮忙。
...全文
133
2
打赏
收藏
读取表数据的小问题
现有一数据表,结构为: f_no f_beginx f_endx 现想从表的第一行开始遍历整个表,依次取出每行的f_beginx和f_endx,并把他们的值分别赋予变量dbeginx和dendx 刚解除c#,请帮忙。
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
2 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
LoveCleverDog
2007-04-13
打赏
举报
回复
在学习的过程中要看几个类
SqlConnection SqlCommand SqlDataReader SqlDataAdapter等类
private static void CreateCommand(string queryString,
string connectionString)
{
using (SqlConnection connection = new SqlConnection(
connectionString))
{
SqlCommand command = new SqlCommand();
command.Connection = connection;
command.CommandTimeout = 15;
command.CommandType = CommandType.Text;
command.CommandText = queryString;
connection.Open();
SqlDataReader reader = command.ExecuteReader();
while (reader.Read())
{
Console.WriteLine(String.Format("{0}, {1}",
reader[0], reader[1]));
}
}
}
希望对楼主有帮助。
bestshl
2007-04-13
打赏
举报
回复
OleDbConnection nwindConn = new OleDbConnection("Provider=SQLOLEDB;Data Source=localhost;" +
"Integrated Security=SSPI;Initial Catalog=northwind");
OleDbCommand selectCMD = new OleDbCommand("SELECT CustomerID, CompanyName FROM Customers", nwindConn);
selectCMD.CommandTimeout = 30;
OleDbDataAdapter custDA = new OleDbDataAdapter();
custDA.SelectCommand = selectCMD;
DataSet custDS = new DataSet();
custDA.Fill(custDS, "Customers");
参考一下这个
C#访问OPC
读取
数据
C#访问OPC
读取
数据
一般用于自动化编程
poi.jar 全部jar包程序文件
poi
读取
excel
数据
所需要的jar包
python
数据
分析基础
课程介绍python
数据
读取
、批量操作、清洗、合并、汇总、可视化、网络爬虫等, 涉及numpy、pandas、matplotlib、seaborn、python-docx、pandas-bokeh、requests、beautifulsoup等工具包(库)。
python如何
读取
excel
表
数据
python
读取
excel
表
数据
的方法:首先安装Excel
读取
数据
的库xlrd;然后获取Excel文件的位置并且
读取
进来;接着
读取
指定的行和列的内容,并将内容存储在列
表
中;最后运行程序即可。 python
读取
excel
表
数据
的方法: 安装...
matlab对Excel
表
读取
数据
目录 1.用xlsread函数
读取
一个Excel文件 2.
读取
指定sheet中的
数据
...filename是单引号括起来的带路径的文件名,函数直接
读取
filename所指文件的sheet1中的
数据
区域存储到双精度矩阵num中;其中,数...
C#
110,537
社区成员
642,576
社区内容
发帖
与我相关
我的任务
C#
.NET技术 C#
复制链接
扫一扫
分享
社区描述
.NET技术 C#
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
让您成为最强悍的C#开发者
试试用AI创作助手写篇文章吧
+ 用AI写文章