473,398 Members | 2,188 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Getting Database query error...

RAB
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

Dec 4 '05 #1
2 1148
Hi,

the error indicates that there's not enough/correct permissions set for
accessing the mdb file. E.g the user the application runs under should have
at least read/write permissions to the folder where mdb file resides. As is
evident, it is a thing to discuss with your hoster.

Before contact8ng your host, make sure that you provide the full and correct
path to the mdb file within the connection string (e.g if you have mdb on
your web app folders, which is not desirable solution, since anyone could
download the file, you could get full physical path to the mdb file by
using Server.MapPath)

--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
http://blogs.aspadvice.com/joteke

"RAB" <ra*********@yahoo.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
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

Dec 4 '05 #2
RAB
I called my web host and they said the folder where I have my Access
database has "full priviledges". Is there something else that might be
the problem?

Thanks,
RABMissouri

Dec 4 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: James | last post by:
Please help - getting very desperate! Sun, 12 October 2003 05:39 I have PHPDEV 4.2.3 from Firepages.com.au as the upgrade to 4.3.0 did not work. I also had an abortive download from PHP.NET as...
4
by: behindspace | last post by:
this is the error that I'm getting: Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /**/**/**/content/bin/tests/price/searchHist.php on line 48 and here is...
11
by: mikey_boy | last post by:
Hello! Curious if anyone could give me a hand. I wrote this PHP script with makes a simple connection to a mysql database called firstdb and just pulls back the results and displays on the...
2
by: iainw | last post by:
HI All, 1st post here, i wonder if you can help. We are about to upload CMS t a windows server and keep getting 2 errors below. We need to go LIVE an it's delaying us. An error occured when...
4
by: Max Harvey | last post by:
Hi, I have looked at the example called "Open Parameter queries from code" from the site http://www.mvps.org/access/queries/qry0003.htm I made up a test which I though looked pretty close...
15
by: sara | last post by:
Hi I'm pretty new to Access here (using Access 2000), and appreciate the help and instruction. I gave myself 2.5 hours to research online and help and try to get this one, and I am not getting...
2
by: sesling | last post by:
Our Database stores event messages in a table called eventnotifications. The table has a message type column. There are two types of messages (alert or info). I have created a form that includes a...
0
by: hafeez | last post by:
Hello All, I created two database instances in the same MS SQL SERVER 2005 named hafeez and local. I created a linked server from hafeez database to local named HTOL I created a dummy table in...
2
by: radink | last post by:
I have an established secured access database. I would like to read fields in the Access DB while im in excel via the external database query tools. However im getting an error about not having...
2
by: srusskinyon | last post by:
I need some help getting unique records from our database! I work for a small non-profit homeless shelter. We keep track of guest information as well as what services we have offered for...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.