nikki23 0 Newbie Poster

I am trying to enter data into a datagrid and I get this message
No value given for one or more required parameters. Can anyone see what is wrong. Here is the code

Imports System.data
Imports System.data.OleDb
Imports System.Configuration
Partial Class supplier
Inherits System.Web.UI.Page
Dim ConnString As String = ConfigurationManager.AppSettings("ConnString")
Dim dbPath As String = ConfigurationManager.AppSettings("PathDB")

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
getsuppliers()
dgsuppliers.DataSource = Session("Supplier")

End If
End Sub


Private Sub getsuppliers()

Dim mySQL As String = "select SupplierID, Supplier from Products "
Dim dbConn As New OleDbConnection(ConnString & Server.MapPath(dbPath))
Dim dbCommand As New OleDbCommand(mySQL, dbConn)
Dim dbAdapter As New OleDbDataAdapter(dbCommand)
Dim dsSuppliers As New DataSet


Try
dbConn.Open()
dbAdapter.Fill(dsSuppliers, "Suppliers")
Catch ex As Exception
lblResults.Text = "Error occurred when retrieving data from Table: " & ex.Message
Finally
dbConn.Close()
End Try
dgsuppliers.DataBind()
End Sub


Protected Sub dgsuppliers_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles dgsuppliers.SelectedIndexChanged
Dim mysql As String = "Select SupplierID, Supplier, from Products where SupplierID=" & dgsuppliers.SelectedValue & ""
Dim dbConn As New OleDbConnection(ConnString & Server.MapPath(dbPath))
Dim dbCommand As New OleDbCommand(mysql, dbConn)
Dim dbAdapter As New OleDbDataAdapter(dbCommand)
Dim dsSuppliers As New DataSet
Dim supplierRow As DataRow
supplierRow = dsSuppliers.Tables("Suppliers").Rows(0)

lblResults.Text &= "<b>" & supplierRow("Company Name") & "</b><br>"
lblResults.Text &= "<b>" & supplierRow("Contact Name") & "</b><br>"
lblResults.Text &= "<b>" & supplierRow("Contact Title") & "</b><br>"
lblResults.Text &= "<b>" & supplierRow("Address") & "</b><br>"
lblResults.Text &= "<b>" & supplierRow("City") & "</b><br>"
lblResults.Text &= "<b>" & supplierRow("Region") & "</b><br>"
lblResults.Text &= "<b>" & supplierRow("Postal Code") & "</b><br>"
lblResults.Text &= "<b>" & supplierRow("Country") & "</b><br>"
lblResults.Text &= "<b>" & supplierRow("Phone") & "</b><br>"
lblResults.Text &= "<b>" & supplierRow("Fax") & "</b><br>"

End Sub
End Class