asp_databases thread: Re: 0x80040e10 With Inserting Variables Into An Access Database
I having a problem taking a text field from a form and putting it into an
access database using ASP.Net. The script in short is as follows...
Sub Triplet1Submit( s As Object, e As EventArgs )
Dim strTriplet1Date As String
Dim strTriplet1DateInsert As String
Dim cmdTriplet1DateInsert As OleDbCommand
Dim conTriplets As OleDbConnection
conTriplets = New OleDbConnection
( "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA Source=E:\My Web Pages\The
Gladens\Individual Sites\Triplets\tripletsdates.mdb" )
strTriplet1DateInsert = "Insert Into Triplet1 ( Triplet1Date )
Values ( lblDates.Text )"
cmdTriplet1DateInsert = New OleDbCommand ( strTriplet1DateInsert ,
conTriplets )
conTriplets.Open()
cmdTriplet1DateInsert.ExecuteNonQuery()
conTriplets.Close()
End Sub
Using pure strings such as "hello" works jsut fine. But when I try to use
the variable for the text field I get the error:
[OleDbException (0x80040e10): No value given for one or more required
parameters.]
Please HELP
Steven