标题:调试不成功,不知什么原因
只看楼主
mayanjun
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2006-2-15
 问题点数:0 回复次数:0 
调试不成功,不知什么原因

Private Sub SetParameters()
Dim Command As New SqlClient.SqlCommand("SalesByCategory")
Dim Tabadapter1 As New SqlClient.SqlDataAdapter
Dim DataSET11 As New DataSet

Dim par1 As New SqlParameter
Dim par2 As New SqlParameter
con = New SqlClient.SqlConnection("server=omron-jane;database=ss1;user=sa;password=970701")
con.Open()
par1.ParameterName = "@a1"
par2.ParameterName = "@a2"
par1.SqlDbType = SqlDbType.Char
par2.SqlDbType = SqlDbType.Char

Command.CommandType = CommandType.Text
Command.Connection = con
Command.CommandText = sql
Command.Parameters.Add(par1)
Command.Parameters.Add(par2)

Command.Parameters.Item(0).Value = TextBox1.Text
Command.Parameters.Item(1).Value = TextBox2.Text

Tabadapter1.SelectCommand = Command
Tabadapter1.Fill(DataSET11)

con.Close()


End Sub

搜索更多相关主题的帖子: 调试 
2006-02-15 09:37



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




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

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