what are you trying to do ? bind the results of the stored proc to a datagrid ?|||Yes|||Then.. I need tho put it?
Dim CmdCertAut AS New SqlCommand("sel_CertAuto", strConnection)
CmdCertAut.CommandType = CommandType.StoredProcedureCmdCertAut.Parameters.Add(New SqlParameter("@.Product_id", SqlDbType.smallint, 2, "Product_id"))
CmdCertAut.Parameters("@.Product_id").Value = product.SelectedItem.ValueCmdCertAut.Parameters.Add(New SqlParameter("@.Region_id", SqlDbType.smallint, 2, "Region_id"))
CmdCertAut.Parameters("@.Region_id").Value = reg.SelectedItem.ValuestrConnection.open()
CmdCertAut.ExecuteNonQueryDim Certif_Aut As SqlDataReader = CmdCertAut.ExecuteReader(CommandBehavior.CloseConnection)
certAut.DataSource = Certif_Aut
certAut.DataBind()Dim Cert_Aut As New ListItem
Cert_Aut.Text = "(Select)"
Cert_Aut.Value = "0"
certAut.Items.Insert(0, Cert_Aut)
certAut.SelectedIndex = 0
Friday, March 9, 2012
I need to put ‘ExecuteNonQuery’ in this Command ?
Labels:
cmdcertaut,
command,
commandtype,
database,
dim,
executenonquery,
microsoft,
mysql,
oracle,
parameters,
sel_certauto,
server,
sql,
sqlcommand,
storedprocedure,
strconnection
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment