Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: Re: 0x80040e10 With Inserting Variables Into An Access Database


Message #1 by "Steven Gladen" <steve@t...> on Thu, 18 Apr 2002 02:59:53
Nevermind fixed it finally I did this for anyone who wants to know

strTriplet1DateInsert = "Insert Into Triplet1 " & "( Triplet1Date ) " 
& "Values ( " & "'" & strTriplet1Date & "')"
Message #2 by "Steven Gladen" <steve@t...> on Thu, 18 Apr 2002 02:29:22
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

  Return to Index