473,748 Members | 2,578 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.Ole Db.OleDbExcepti on: Operation must use
an updateable query.
The line of code with the error is:
objCmd.ExecuteN onQuery
The rest of my code is as follows:

dim Conn as new OleDbConnection ("Provider=" & _
"Microsoft.Jet. OLEDB.4.0;" & _
"Data Source=mypath.m db")

dim objCmd as OleDbCommand = new OleDbCommand _
("NewUserInput" , Conn)
dim objReader as OleDbDataReader
objCmd.CommandT ype = CommandType.Sto redProcedure

dim objParam as OleDbParameter

objParam = objCmd.Paramete rs.Add("@FirstN ame", _
OleDbType.char)
objParam.Direct ion = ParameterDirect ion.Input
objParam.Value = tbFN.Text
objParam = objCmd.Paramete rs.Add("@LastNa me", _
OleDbType.char)
objParam.Direct ion = ParameterDirect ion.Input
objParam.Value = tbLN.Text

objParam = objCmd.Paramete rs.Add("@Email" , _
OleDbType.char)
objParam.Direct ion = ParameterDirect ion.Input
objParam.Value = tbEmail.Text

objParam = objCmd.Paramete rs.Add("@Zip", _
OleDbType.char)
objParam.Direct ion = ParameterDirect ion.Input
objParam.Value = tbZip.Text
objCmd.Connecti on.open()
objCmd.ExecuteN onQuery
objCmd.Connecti on.close()
Any help would be appreciated

Thanks,
RABMissouri

Dec 4 '05 #1
2 1162
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*********@ya hoo.com> wrote in message
news:11******** **************@ f14g2000cwb.goo glegroups.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.Ole Db.OleDbExcepti on: Operation must use
an updateable query.
The line of code with the error is:
objCmd.ExecuteN onQuery
The rest of my code is as follows:

dim Conn as new OleDbConnection ("Provider=" & _
"Microsoft.Jet. OLEDB.4.0;" & _
"Data Source=mypath.m db")

dim objCmd as OleDbCommand = new OleDbCommand _
("NewUserInput" , Conn)
dim objReader as OleDbDataReader
objCmd.CommandT ype = CommandType.Sto redProcedure

dim objParam as OleDbParameter

objParam = objCmd.Paramete rs.Add("@FirstN ame", _
OleDbType.char)
objParam.Direct ion = ParameterDirect ion.Input
objParam.Value = tbFN.Text
objParam = objCmd.Paramete rs.Add("@LastNa me", _
OleDbType.char)
objParam.Direct ion = ParameterDirect ion.Input
objParam.Value = tbLN.Text

objParam = objCmd.Paramete rs.Add("@Email" , _
OleDbType.char)
objParam.Direct ion = ParameterDirect ion.Input
objParam.Value = tbEmail.Text

objParam = objCmd.Paramete rs.Add("@Zip", _
OleDbType.char)
objParam.Direct ion = ParameterDirect ion.Input
objParam.Value = tbZip.Text
objCmd.Connecti on.open()
objCmd.ExecuteN onQuery
objCmd.Connecti on.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
2586
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 I could not configure Apache myself. The REAL problem is that PHPmyAdmin works and sees my test database Wines.... But my PHP program does not!
4
1655
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 my code: (I removed commented out lines for space saving) echo "<table width='500' border='0' align='center' cellpadding='0' cellspacing='0'> <tr>
11
2264
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 webpage. Here is the script. I appreciate any light that could be shed on the script and why I would get the errors. Thank you,
2
2024
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 updating the database. The likely reason is that write permissions are not set on th 'database' folder. Please remember that write and delete permissions are also required o the 'content' folder and its subfolders.
4
11365
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 (which I will paste below) I have put it on the BeforeUpdate event of a form I am using, but whenever it is called, I get "Run-time error '13':, Type mismatch
15
2972
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 it. Simple database: I want to have a user enter Supply Orders (just for tracking purposes) by Item. The user may also enter a new item - "new" is a combination of Item, PartNumber and Vendor - they could have the
2
1740
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 list box. The list box contains the following (alert, info, both). The ID for each value is hidden from the operator. alert has an ID of 1, info has an ID of 2 and both has an ID of 3. The list box value is passed to a query. The query is...
0
1158
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 local database named samplocal. Now i am able to list the records using the linked server, for this i used the following query. SELECT * FROM OPENQUERY(HTOL,'SELECT nameandval FROM SAMPLOCAL'); Now the problem is, i am not able to insert the...
2
1930
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 permission to the db. I enter my crudentials and I still get the error. Any ideas on how to go about this?
2
4448
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 statistical purposes. I've been using Here's the situation: I have two main tables:
0
8996
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9562
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9254
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8255
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6799
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6078
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4608
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3319
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2217
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.