标题:求 vb.net 转 c#
只看楼主
wopois
Rank: 1
等 级:新手上路
威 望:1
帖 子:251
专家分:0
注 册:2007-6-7
 问题点数:0 回复次数:0 
求 vb.net 转 c#
Dim sqlCnn As New SqlClient.SqlConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & "dbName")
Dim sqlCmd As New SqlClient.SqlCommand("select a,b,c, from table1", sqlCnn)
Dim ds As New DataSet
Dim da As New SqlClient.SqlDataAdapter
da.SelectCommand=sqlCmd
sqlCnn.open()
da.Fill(ds, "tempTable")
sqlCnn.close()
Dim a As Integer
Dim b, c As String
For Each dr As DataRow In ds.Tables("tempTable").Rows
a = dr(0)
b = dr(1)
c = dr(2)
'......
Next
救急
2008-02-14 23:16



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-199919-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.121761 second(s), 7 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved