adding data...got problem....pls help
- From: zheetee@xxxxxxxxx
- Date: 23 Apr 2006 09:21:49 -0700
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???
.
- Prev by Date: Re: validate if dropdownlist is empty
- Next by Date: DataBound Drop Down List
- Previous by thread: validate if dropdownlist is empty
- Next by thread: DataBound Drop Down List
- Index(es):
Relevant Pages
|