adding data...got problem....pls help

Tech-Archive recommends: Fix windows errors by optimizing your registry



i am beginner to link asp.net and access 2gether
i use asp .net matrix...and wrote the Insert data coding

Dim connectionString As String = "Provider=Microsoft.Jet.OLEDB.4.0; Ole
DB Services=-4; Data Source=C:\Documents an"& _
"d Settings\AliceLee\My Documents\db\equipment.mdb"
Dim dbConnection As System.Data.IDbConnection = New
System.Data.OleDb.OleDbConnection(connectionString)

Dim queryString As String = "INSERT INTO [test]
([SerialNumber]) VALUES (SerialNumber1)"
Dim dbCommand As System.Data.IDbCommand = New
System.Data.OleDb.OleDbCommand
dbCommand.CommandText = queryString
dbCommand.Connection = dbConnection

Dim rowsAffected As Integer = 0
dbConnection.Open
Try
rowsAffected = dbCommand.ExecuteNonQuery
Finally
dbConnection.Close

End Try

'Return rowsAffected

it returned--> Exception Details: System.Data.OleDb.OleDbException: No
value given for one or more required parameters.

SerialNumber1 is a textbox that i using in the asp.net page....

can i know what is the problem???
why cant get the add the SerialNumber1.text into access???

.



Relevant Pages

  • Re: Database access failed after few entries
    ... Protected WithEvents lblNotice As System.Web.UI.WebControls.Label ... Dim barcode As String = Request ... Dim da As IDbDataAdapter = GetRecord ... Dim dbConnection As System.Data.IDbConnection = New ...
    (microsoft.public.dotnet.general)
  • Database access failed after few entries
    ... I got an unspecified error message. ... Protected WithEvents lblNotice As System.Web.UI.WebControls.Label ... Dim da As IDbDataAdapter = GetRecord ... Dim dbConnection As System.Data.IDbConnection = New ...
    (microsoft.public.dotnet.general)
  • Re: Increase value by 1. How to do this?
    ... > Private Sub Vote() ... > ' Set Connection ... > Dim dbConnection As IDbConnection => NewOleDbConnection> ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: INSERT - SQL. Add Record. Problem. Need Urgent Help. Thank You.
    ... Syntax error in INSERT INTO statement. ... > ' Set Connection ... > Dim dbConnection As IDbConnection = New OleDbConnection> ...
    (microsoft.public.dotnet.framework.aspnet)
  • Textbox and SQL query
    ... Sub btnSearch_Click ... Dim myCommand As New OleDbDataAdapter(CommandText, ... Dim dbConnection As New OleDbConnection ... (ModuleName, ModuleType, PartOf, Purpose, Designer, Date, ...
    (microsoft.public.dotnet.framework.aspnet)