נשלח בתאריך: 12 June 2005 בשעה 14:45 | | IP רשוּם
|
|
|
|
Function fillDDLI()
openConnection()
Dim cmd As New System.Data.OleDb.OleDbCommand
cmd.Connection = MyConnection
cmd.CommandText = "select name from [productList] where @category=category"
Dim rPlan As OleDbDataReader
cmd.Parameters.Add("@category", SqlDbType.VarChar)
'here is the bug!!! :
cmd.Parameters("@category").Value = DDLCategory.SelectedValue.ToString
While rPlan.Read
Me.DDLItem.Items.Add(rPlan("name"))
End While
rPlan.Close()
closeConnection()
End Function
|