" Operation must use an updateable query" (Full Version)

All Forums >> [Web Development] >> ASP and Database



Message


nmathews -> " Operation must use an updateable query" (10/23/2002 14:30:25)

This query use to work on our old server. Now that we moved it to a new server and reestablished the database connections i get this error when i click update on my update pages. Any Ideas?

Database Results Error
Description: [Microsoft][ODBC dBase Driver] Operation must use an updateable query.
Number: -2147467259 (0x80004005)
Source: Microsoft OLE DB Provider for ODBC Drivers




Spooky -> RE: updateable query (10/23/2002 15:12:25)


http://www.aspfaqs.com/aspfaqs/ShowFAQ.asp?FAQID=107




Doug G -> RE: updateable query (10/23/2002 22:45:11)

Also I have some info on this error here

http://www.dougscode.com/forum4/topic.asp?TOPIC_ID=5




hhammash -> RE: updateable query (10/24/2002 6:03:57)

Hi,

Doug G,

Congratulations for the new forum. I have just registered.

Hisham




hhammash -> RE: updateable query (10/24/2002 6:06:21)

Hi,

Just a thought.

When you create a query in Access and that query depends on more than one table, or it returns group values like Distinct, sum ..etc it will not be an updateable query. You can' t even use it to add records in Access itself.

Best regards
Hisham




nmathews -> RE: updateable query (11/6/2002 11:03:59)

I contacted my provider and they tell me to use this:

SQL = " UPDATE Products Set UnitPrice = 2;"
Set Conn = Server.CreateObject(" ADODB.Connection" )
Conn.Mode = 3 ' 3 = adModeReadWrite
Conn.Open " myDSN"
Conn.Execute(SQL)
Conn.Close

Where is this code suppose to go? On the page or in the global.asa file. I haven' t been able to find any place where it fits in.




Spooky -> RE: updateable query (11/6/2002 14:13:00)

what does your existing code look like?
I assume you are writing a record to the database?




nmathews -> RE: updateable query (11/6/2002 14:23:13)

Yes that is correct. I' m trying to add/update/delete records from the database. It worked on old server without a problem, now that we moved the site it refuses to do so.

Here is the code

<%
fp_sQry=" SELECT * FROM CALENDAR ORDER BY EVENT_DATE ASC"
fp_sDefault=" "
fp_sNoRecords=" No records returned."
fp_sDataConn=" mainpagequery"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=False
fp_fMenuFormat=False
fp_sMenuChoice=" EVENT_NAME"
fp_sMenuValue=" EVENT_NAME"
fp_iDisplayCols=8
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file=" _fpclass/fpdbrgn1.inc" -->
<!--webbot bot=" DatabaseRegionStart" endspan i-CheckSum=" 25530" -->
<form METHOD=" POST" action=" edit_cal2.asp" >
<!--webbot bot=" PurpleText"
PREVIEW=" Set this form' s properties so it submits user input to the appropriate page."
-->
<table BORDER=" 0" width=" 100%" >
<tr>
<td width=" 148" ><b>Event Name</b></td>
<td width=" 284" ><input TYPE=" TEXT" NAME=" EVENT_NAME" SIZE=" 40" VALUE=" <%=FP_FieldHTML(fp_rs," EVENT_NAME" )%>" ></td>
<td></td>
</tr>
<tr>
<td><b>Event Date</b></td>
<td><input TYPE=" TEXT" NAME=" EVENT_DATE" SIZE=" 40" VALUE=" <%=FP_FieldHTML(fp_rs," EVENT_DATE" )%>" ></td>
<td width=" 145" ></td>...........................................




Spooky -> RE: updateable query (11/6/2002 15:26:56)

It tends to suggest that the permissions are incorrect.
I would direct your host to :

http://www.dougscode.com/faq/faq_doug1/dbp/dbp.asp?pkey=q1020




nmathews -> RE: updateable query (11/6/2002 16:45:21)

I' m not sure I fully understand. I opened the site live with FrontPage and right clicked on the fpdb folder and looked and the check box is checked for running scripts. I went into the server via ftp and right clicked on the database file to see if everyone had permission to write to it, but the server does not allow that type of action.




Spooky -> RE: updateable query (11/6/2002 18:47:20)

You cant do it via Frontpage, youll need to go through your host.
It seems they are saying its a coding problem.
As you are using the DRW, Id suggest this wasnt the case and the permissions are incorrect at the hosts end.

As a second to last resort, try re-importing the database into the default folder in your live web to see if it kick starts the correct permissions.




nmathews -> RE: updateable query (11/13/2002 11:34:45)

Alright. I contacted my the provider of the website and they say that I have to switch everything over to a *.mdb file. I made a database results page and now I get this error.


Database Results Error
[Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key ' Temporary (volatile) Jet DSN for process 0x864 Thread 0x81c DBC 0xa62d4ac Jet' .

What can I do. This is geting me mad [>:]




nmathews -> RE: updateable query (11/13/2002 11:43:51)

I figured it out. I had the *.mdb database so it would upload to the server. It uploaded all my old dbf files but just not the *.mdb file.

Thanks for all your support!




LynxEye -> RE: " Operation must use an updateable query" (11/6/2004 9:48:48)

I think i have the solution, at least it worked for me. I'm an XP Pro user having NTFS file system. Running ASP scripts that does insert/update query's on an Access DB.

- Go to your Control Panel
- Administrative Tools > IIS
- Expand the folder of your site/application
- Right-click the DB folder (just the folder where your .mdb is in)
- Go to "All-tasks" and click "Permissions Wizard"
- Click "Next" for 4 times, without changing anything and finish

You can probably do the same on a folder lower in the tree, but what the hell.. this worked..





Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
7.910156E-02