.net

Submitted by veena seetharaman on
sir/madam.. i am a beginner with .net i am trying to get data from dropdown list(in which name is bound) and i want to display id in a textbox ...my table contains parameters name,id and item... my problem is an error message "parameter name is not in the parameter oledb connection".. can anybody help me?? thanks to all...
  1.  Protected Sub ddl1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ddl1.SelectedIndexChanged
  2.         Dim Conn As OleDbConnection
  3.         Dim command1 As OleDbCommand
  4.  
  5.         Conn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Documents and Settings\Administrator.HOME\My Documents\Visual Studio 2008\WebSites\production\otentry.mdb;")
  6.  
  7.         command1 = New OleDbCommand("SELECT * FROM [ofotentry] WHERE ([@name]) ='" & ddl1.SelectedItem.Text & "'", Conn)
  8.  
  9.  
  10.         command1.Parameters("@name").Value = ddl1.SelectedItem.Text
  11.         Conn.Open()
  12.         command1.ExecuteNonQuery()
  13.         If Not IsDBNull(command1.Parameters("@name").Value) Then
  14.  
  15.  
  16.             TextBox2.Text = command1.Parameters("@tid").Value
  17.         End If
  18.         Conn.Close()
  19.     End Sub