Getting Database query error...
- From: "RAB" <rabmissouri@xxxxxxxxx>
- Date: 4 Dec 2005 08:22:00 -0800
I tested my code on my local computer and it worked fine. When I
uploaded it to my webserver at Godaddy.com, I get the following
error...
Exception Details: System.Data.OleDb.OleDbException: Operation must use
an updateable query.
The line of code with the error is:
objCmd.ExecuteNonQuery
The rest of my code is as follows:
dim Conn as new OleDbConnection("Provider=" & _
"Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=mypath.mdb")
dim objCmd as OleDbCommand = new OleDbCommand _
("NewUserInput", Conn)
dim objReader as OleDbDataReader
objCmd.CommandType = CommandType.StoredProcedure
dim objParam as OleDbParameter
objParam = objCmd.Parameters.Add("@FirstName", _
OleDbType.char)
objParam.Direction = ParameterDirection.Input
objParam.Value = tbFN.Text
objParam = objCmd.Parameters.Add("@LastName", _
OleDbType.char)
objParam.Direction = ParameterDirection.Input
objParam.Value = tbLN.Text
objParam = objCmd.Parameters.Add("@Email", _
OleDbType.char)
objParam.Direction = ParameterDirection.Input
objParam.Value = tbEmail.Text
objParam = objCmd.Parameters.Add("@Zip", _
OleDbType.char)
objParam.Direction = ParameterDirection.Input
objParam.Value = tbZip.Text
objCmd.Connection.open()
objCmd.ExecuteNonQuery
objCmd.Connection.close()
Any help would be appreciated
Thanks,
RABMissouri
.
- Follow-Ups:
- Re: Getting Database query error...
- From: Teemu Keiski
- Re: Getting Database query error...
- Prev by Date: Re: valign datalist item template
- Next by Date: Re: How to set background color of Login control in ASP.NET 2.0?
- Previous by thread: ASP.NET: HtmlInputHidden = Nothing
- Next by thread: Re: Getting Database query error...
- Index(es):
Relevant Pages
|