Re: Only want to insert a record
- From: "Dave" <dave5398@xxxxxxxxxxxxxx>
- Date: Tue, 10 Jan 2006 12:48:05 -0000
"Daniel Crichton" <msnews@xxxxxxxxxxxxxxxxxx> wrote in message
news:%23ULG0EeFGHA.2444@xxxxxxxxxxxxxxxxxxxxxxx
>
> "Dave" <dave5398@xxxxxxxxxxxxxx> wrote in message
> news:eOuM54dFGHA.3892@xxxxxxxxxxxxxxxxxxxxxxx
>> I'm trying again to develop my web application locally using IIS and asp
>> scripting with a local MS Access database. I have never managed to
>> update or insert a record using scripting. I can seem to display records
>> ok but any attempt to amend records seems to fail. I tried using
>> recordsets then read in MS documentation you should execute a direct
>> command. My latest failed attempt is this:
>>
>> ConnectionString = ".....etc"
>> Conn.Mode=3
>> Conn.Open(ConnectionString)
>> sql="INSERT INTO Users (Name, Password) VALUES ('Jim', 'Hello')"
>> Conn.Execute sql
>>
>> The sql works fine within Access itself. When executed within an asp page
>> however I get:
>>
>> Error Type:
>> Microsoft JET Database Engine (0x80004005)
>> Operation must use an updateable query.
>>
>> Can anyone please help, I've been trying for months.
>
> Do you have a primary key on that table? The error message suggests not.
> Also try adding [] around your table and column names - in some system
> Name and Password are reserved words, and ADO or the OLE DB driver may be
> trying to interpret them as such. Also drop the Mode property, I've never
> needed to use this myself as I believe the default is to not set any
> permissions, which lets you do whatever your user permissions allow.
>
> sql="INSERT INTO [Users] ([Name], [Password]) VALUES ('Jim', 'Hello')"
>
>
> Dan
Dan,
Thanks but still no look. I did all of the above and still get the same
result. Any reason why calling ADO from a script should be different to
calling it from MS Access or VB?
Dave
.
- Follow-Ups:
- Re: Only want to insert a record
- From: Daniel Crichton
- Re: Only want to insert a record
- References:
- Only want to insert a record
- From: Dave
- Re: Only want to insert a record
- From: Daniel Crichton
- Only want to insert a record
- Prev by Date: Re: Only want to insert a record
- Next by Date: Re: Return Results of sp_helptext via ADO
- Previous by thread: Re: Only want to insert a record
- Next by thread: Re: Only want to insert a record
- Index(es):
Relevant Pages
- Re: Only want to insert a record
... > scripting with a local MS Access database. ... When executed within
an asp page ... which lets you do whatever your user permissions allow. ...
(microsoft.public.data.ado) - Only want to insert a record
... I'm trying again to develop my web application locally using IIS and asp ...
scripting with a local MS Access database. ... The sql works fine within
Access itself. ... (microsoft.public.data.ado) - Re: Only want to insert a record
... >>> scripting with a local MS Access database. ... When executed
within an asp ... (microsoft.public.data.ado) - Re: asp login page
... Not supported on Windows Servers. ... and tutorials on my web site regarding
ASP: http://www.takempis.com. ... who did the login scripting? ... (microsoft.public.frontpage.client) - Re: Hiding personal data in source code viewable on the internet
... Switch to pure HTML form and scripting for the ... Yow will need to work with
HTML code in FP and to learn ASP scripting. ... I am trying to set up a user feedback
form on my website. ... (microsoft.public.frontpage.programming)