ASP.Net ->database

Shurikn

Regular
Joined
Jul 14, 2004
Messages
62
I didnt know exactly where to post this... asp.net or database?... anyway:

im new to asp.net (new to web programing) and yesterday i finally connected to my db (yay!) i was able to do a simple SELECT query... but after that, i tryed to do an INSERT and it didnt work, i keep geting a message that tells me:
[OleDbException (0x80004005): L'opération doit utiliser une requête qui peut être mise à jour.]

wich means: the operation need to use a query that can be updated (or something like that)

i copied a code sample from asp101.com and tryed to execute it and i got the same error... so i dont really understand what the problem is... if anyone can help, or just help me find a GOOD ASP.net forum i would apreaciate, Thanks
 
From msdn:
The ASP.NET user, by default, does not have permission to write a record to a database or create a locking file (.ldb) in the folder containing the database. You must give the ASP.NET user these permissions. Normally, this is done in one of three ways:

You can add the ASP.NET user to the Administrators group.
You can enable impersonation for the application in the web.config file.
You can add ASP.NET write permission to both the database file and the folder that contains it.
In this walkthrough you will use the third (and safest) method to grant write permission.

From the File Explorer, find the new Pets folder, normally located at C:\Inetpub\wwwroot\Pets\Pets.
Right-click the Pets folder, and select Properties.
Select the Security tab, and click the Add button.
Add the object name <YOURMACHINE>\ASPNET where <YOURMACHINE> is the name of your machine. Click OK to return to the Security tab.
Select the ASP.NET account, and add Write permission. This account is named aspnet_wp account, ASP.NET MACHINE Account, or something similar.
From the File Explorer, right-click the file Pets.mdb, and select Properties.
Select the Security tab, and click the Advanced button.
Check "Inherit from parent the permissions entries that apply to child objects". Click OK to accept the change.

that seemed to be the problem ^^
 
Shurikn said:
From msdn:
That seemed to be the problem ^^
I'm having similar problems.

How would I add these ASP.NET write permissions? I do not own the ISP; we just rent a little space from them to post our site.

Also, in the database file's "Properties > Security > Add > Object Name", I read:
Add the object name <YOURMACHINE>\ASPNET where <YOURMACHINE> is the name of your machine.
So is <YOURMACHINE> = localhost or the website's domain name?
 
Back
Top