.NET Can't Write to Access Database from Web Page

  • Thread starter Thread starter Don Woods
  • Start date Start date
D

Don Woods

System: XP Pro, IIS, Access 2000, Visual Studio .NET

I'm accessing an access database from a webpage. I have
no trouble using select to access the information, but I
receive errors when I try and UPDATE, DELETE or INSERT.
If i use Access 2000 directly I can. Any ideas on how I
can figure out what's going on? Here's an example of the
errors I'm getting:

On a delete:
DELETE FROM MOVIES WHERE MOVIES.[ID]=198

Description: Could not delete from specified tables.
Help context: 5003086
Help file:
Native error: -199756777
Error number: -2147467259
Error source: Microsoft JET Database Engine
SQL state: 3086

On an update:
UPDATE MOVIES SET Title='Fallen: Special Edition ',
Studio='MGM', Genre='Suspense Thriller',
Format='AWS/P&S', Sound='DD 5.1', Length='125 Min',
Date='6/16/1998 12:00:00 AM' WHERE ID=198

Description: Syntax error in UPDATE statement.
Help context: 5003144
Help file:
Native error: -526847407
Error number: -2147217900
Error source: Microsoft JET Database Engine
SQL state: 3000

Where can I look up the error code(s)?

I also brought some work i was doing on another pc server
onto this server. On the other pc everything works. On
this pc updates, etc. don't work. I feel confident it's
not the SQL, so it's gotta be something else. Perhaps
Access Control? I can't figure out where to look.

Any help appreciated,
Thanks,
Don
 
A good guess is giving the ASPNET account write access on the directory
where the MS Access database is, because Update/Delete/Insert also write to
the directory.
Right click on the directory, Properties, Security, Add, and look for the
ASPNET user.
Sorry, I don't know where you can get info on the error codes.
 
¤ System: XP Pro, IIS, Access 2000, Visual Studio .NET
¤
¤ I'm accessing an access database from a webpage. I have
¤ no trouble using select to access the information, but I
¤ receive errors when I try and UPDATE, DELETE or INSERT.
¤ If i use Access 2000 directly I can. Any ideas on how I
¤ can figure out what's going on? Here's an example of the
¤ errors I'm getting:
¤
¤ On a delete:
¤ DELETE FROM MOVIES WHERE MOVIES.[ID]=198
¤
¤ Description: Could not delete from specified tables.
¤ Help context: 5003086
¤ Help file:
¤ Native error: -199756777
¤ Error number: -2147467259
¤ Error source: Microsoft JET Database Engine
¤ SQL state: 3086
¤
¤ On an update:
¤ UPDATE MOVIES SET Title='Fallen: Special Edition ',
¤ Studio='MGM', Genre='Suspense Thriller',
¤ Format='AWS/P&S', Sound='DD 5.1', Length='125 Min',
¤ Date='6/16/1998 12:00:00 AM' WHERE ID=198
¤
¤ Description: Syntax error in UPDATE statement.
¤ Help context: 5003144
¤ Help file:
¤ Native error: -526847407
¤ Error number: -2147217900
¤ Error source: Microsoft JET Database Engine
¤ SQL state: 3000
¤
¤ Where can I look up the error code(s)?
¤
¤ I also brought some work i was doing on another pc server
¤ onto this server. On the other pc everything works. On
¤ this pc updates, etc. don't work. I feel confident it's
¤ not the SQL, so it's gotta be something else. Perhaps
¤ Access Control? I can't figure out where to look.

The column name Date in your SQL statement is a reserved word. You will need to enclose it within
brackets. The column name Format may cause you problems as well so I would do the same.

UPDATE MOVIES SET Title='Fallen: Special Edition ',
Studio='MGM', Genre='Suspense Thriller',
[Format]='AWS/P&S', Sound='DD 5.1', Length='125 Min',
[Date]='6/16/1998 12:00:00 AM' WHERE ID=198


Paul ~~~ (e-mail address removed)
Microsoft MVP (Visual Basic)
 
Paul,

Thanks for the response. I enclosed the two fields in
brackets, and now i get the following error:

UPDATE MOVIES SET Title='Fallen: Special Edition ',
Studio='MGM', Genre='Suspense Thriller', [Format]
='AWS/P&S', Sound='DD 5.1', Length='125 Min', Own='Me',
[Date]='6/16/1998 12:00:00 AM' WHERE ID=198

Description: Operation must use an updateable query.
Help context: 5003073
Help file:
Native error: -198839259
Error number: -2147467259
Error source: Microsoft JET Database Engine
SQL state: 3073

I appreciate your help.
-----Original Message-----
¤ System: XP Pro, IIS, Access 2000, Visual Studio .NET
¤
¤ I'm accessing an access database from a webpage. I have
¤ no trouble using select to access the information, but
I
¤ receive errors when I try and UPDATE, DELETE or INSERT.
¤ If i use Access 2000 directly I can. Any ideas on how
I
¤ can figure out what's going on? Here's an example of the
¤ errors I'm getting:
¤
¤ On a delete:
¤ DELETE FROM MOVIES WHERE MOVIES.[ID]=198
¤
¤ Description: Could not delete from specified tables.
¤ Help context: 5003086
¤ Help file:
¤ Native error: -199756777
¤ Error number: -2147467259
¤ Error source: Microsoft JET Database Engine
¤ SQL state: 3086
¤
¤ On an update:
¤ UPDATE MOVIES SET Title='Fallen: Special Edition ',
¤ Studio='MGM', Genre='Suspense Thriller',
¤ Format='AWS/P&S', Sound='DD 5.1', Length='125 Min',
¤ Date='6/16/1998 12:00:00 AM' WHERE ID=198
¤
¤ Description: Syntax error in UPDATE statement.
¤ Help context: 5003144
¤ Help file:
¤ Native error: -526847407
¤ Error number: -2147217900
¤ Error source: Microsoft JET Database Engine
¤ SQL state: 3000
¤
¤ Where can I look up the error code(s)?
¤
¤ I also brought some work i was doing on another pc server
¤ onto this server. On the other pc everything works. On
¤ this pc updates, etc. don't work. I feel confident it's
¤ not the SQL, so it's gotta be something else. Perhaps
¤ Access Control? I can't figure out where to look.

The column name Date in your SQL statement is a reserved
word. You will need to enclose it within
brackets. The column name Format may cause you problems
as well so I would do the same.
UPDATE MOVIES SET Title='Fallen: Special Edition ',
Studio='MGM', Genre='Suspense Thriller',
[Format]='AWS/P&S', Sound='DD 5.1', Length='125 Min',
[Date]='6/16/1998 12:00:00 AM' WHERE ID=198


Paul ~~~ (e-mail address removed)
Microsoft MVP (Visual Basic)
.
 
Chris,

Thanks for your response. I'm not sure where I find the
settings you are talking about. I tried right-click in
explorer on the directory, but there was no security.
There was sharing...

I also went into IIS and selected the \data directory,
selected properties, and looked at 'Directory'. All
access' were checked. I couldn't find an add option.

Is there somewhere else I was supposed to go?

Thanks for your help,
Don
-----Original Message-----
A good guess is giving the ASPNET account write access on the directory
where the MS Access database is, because
Update/Delete/Insert also write to
the directory.
Right click on the directory, Properties, Security, Add, and look for the
ASPNET user.
Sorry, I don't know where you can get info on the error codes.

System: XP Pro, IIS, Access 2000, Visual Studio .NET

I'm accessing an access database from a webpage. I have
no trouble using select to access the information, but I
receive errors when I try and UPDATE, DELETE or INSERT.
If i use Access 2000 directly I can. Any ideas on how I
can figure out what's going on? Here's an example of the
errors I'm getting:

On a delete:
DELETE FROM MOVIES WHERE MOVIES.[ID]=198

Description: Could not delete from specified tables.
Help context: 5003086
Help file:
Native error: -199756777
Error number: -2147467259
Error source: Microsoft JET Database Engine
SQL state: 3086

On an update:
UPDATE MOVIES SET Title='Fallen: Special Edition ',
Studio='MGM', Genre='Suspense Thriller',
Format='AWS/P&S', Sound='DD 5.1', Length='125 Min',
Date='6/16/1998 12:00:00 AM' WHERE ID=198

Description: Syntax error in UPDATE statement.
Help context: 5003144
Help file:
Native error: -526847407
Error number: -2147217900
Error source: Microsoft JET Database Engine
SQL state: 3000

Where can I look up the error code(s)?

I also brought some work i was doing on another pc server
onto this server. On the other pc everything works. On
this pc updates, etc. don't work. I feel confident it's
not the SQL, so it's gotta be something else. Perhaps
Access Control? I can't figure out where to look.

Any help appreciated,
Thanks,
Don


.
 
¤ Paul,
¤
¤ Thanks for the response. I enclosed the two fields in
¤ brackets, and now i get the following error:
¤
¤ UPDATE MOVIES SET Title='Fallen: Special Edition ',
¤ Studio='MGM', Genre='Suspense Thriller', [Format]
¤ ='AWS/P&S', Sound='DD 5.1', Length='125 Min', Own='Me',
¤ [Date]='6/16/1998 12:00:00 AM' WHERE ID=198
¤
¤ Description: Operation must use an updateable query.
¤ Help context: 5003073
¤ Help file:
¤ Native error: -198839259
¤ Error number: -2147467259
¤ Error source: Microsoft JET Database Engine
¤ SQL state: 3073
¤
¤ I appreciate your help.

OK, one problem solved. I think this is what Chris is referring to:

PRB: Cannot Connect to Access Database from ASP.NET
http://support.microsoft.com/defaul...port/kb/articles/q316/6/75.asp&NoWebContent=1

INFO: Permissions to Connect to a Remote Access Database from ASP.NET
http://support.microsoft.com/default.aspx?scid=kb;en-us;307901&Product=aspnet


Paul ~~~ (e-mail address removed)
Microsoft MVP (Visual Basic)
 
Thanks, Paul

I looked over the articles and they mention a web.config
file with <identity impersonate="true" />. First off i
didn't have a web.config file, but did a search, and
found there were 80 in various places on my machine. So
I took one from a default VS.NET project
(WebApplication1), added the line and copied it into
wwwroot, where my application resides. Things got worse -
now my page bombs on my first attempt at accessing the
database. Here are the error lines that display:

Exception Details:
System.Runtime.InteropServices.COMException: Unspecified
error

Source Error:

Line 69: Conn.provider="Microsoft.Jet.OLEDB.4.0"
Line 70: Conn.mode=3
----- here's the line it didn't like:
Line 71: conn.open(server.mappath("data\Poconos.mdb"))
-----
Line 72: Rs=Server.CreateObject("ADODB.Recordset")
Line 73: 'Rs.mode=3


Source File: c:\inetpub\wwwroot\PocDVDMasterList.aspx
Line: 71

Elsewhere, it was suggested to change the permissions of
the database file by right clicking on the directory,
selecting Security and doing Add. The problem is there
is no Security tab when i select properties for the
directory. Is something screwed up on my system, or are
these instructions for a different version of windows?

Thanks Again
Don
 
Don, your file system must be NTFS in order to have the Security tab. I
don't know XP, but I guess it supports NTFS.
Using Windows 2000, one can convert the FAT file system to NTFS by typing
the following command at the command prompt:
Convert C: /FS:NTFS
If XP supports it, do a bit of research and decide if you want to go there.
I don't know how to set security on a non NTFS system.

Don Woods said:
Chris,

Thanks for your response. I'm not sure where I find the
settings you are talking about. I tried right-click in
explorer on the directory, but there was no security.
There was sharing...

I also went into IIS and selected the \data directory,
selected properties, and looked at 'Directory'. All
access' were checked. I couldn't find an add option.

Is there somewhere else I was supposed to go?

Thanks for your help,
Don
-----Original Message-----
A good guess is giving the ASPNET account write access on the directory
where the MS Access database is, because
Update/Delete/Insert also write to
the directory.
Right click on the directory, Properties, Security, Add, and look for the
ASPNET user.
Sorry, I don't know where you can get info on the error codes.

System: XP Pro, IIS, Access 2000, Visual Studio .NET

I'm accessing an access database from a webpage. I have
no trouble using select to access the information, but I
receive errors when I try and UPDATE, DELETE or INSERT.
If i use Access 2000 directly I can. Any ideas on how I
can figure out what's going on? Here's an example of the
errors I'm getting:

On a delete:
DELETE FROM MOVIES WHERE MOVIES.[ID]=198

Description: Could not delete from specified tables.
Help context: 5003086
Help file:
Native error: -199756777
Error number: -2147467259
Error source: Microsoft JET Database Engine
SQL state: 3086

On an update:
UPDATE MOVIES SET Title='Fallen: Special Edition ',
Studio='MGM', Genre='Suspense Thriller',
Format='AWS/P&S', Sound='DD 5.1', Length='125 Min',
Date='6/16/1998 12:00:00 AM' WHERE ID=198

Description: Syntax error in UPDATE statement.
Help context: 5003144
Help file:
Native error: -526847407
Error number: -2147217900
Error source: Microsoft JET Database Engine
SQL state: 3000

Where can I look up the error code(s)?

I also brought some work i was doing on another pc server
onto this server. On the other pc everything works. On
this pc updates, etc. don't work. I feel confident it's
not the SQL, so it's gotta be something else. Perhaps
Access Control? I can't figure out where to look.

Any help appreciated,
Thanks,
Don


.
 
¤ I looked over the articles and they mention a web.config
¤ file with <identity impersonate="true" />. First off i
¤ didn't have a web.config file, but did a search, and
¤ found there were 80 in various places on my machine. So
¤ I took one from a default VS.NET project
¤ (WebApplication1), added the line and copied it into
¤ wwwroot, where my application resides. Things got worse -
¤ now my page bombs on my first attempt at accessing the
¤ database. Here are the error lines that display:
¤
¤ Exception Details:
¤ System.Runtime.InteropServices.COMException: Unspecified
¤ error
¤
¤ Source Error:
¤
¤ Line 69: Conn.provider="Microsoft.Jet.OLEDB.4.0"
¤ Line 70: Conn.mode=3
¤ ----- here's the line it didn't like:
¤ Line 71: conn.open(server.mappath("data\Poconos.mdb"))
¤ -----
¤ Line 72: Rs=Server.CreateObject("ADODB.Recordset")
¤ Line 73: 'Rs.mode=3
¤
¤
¤ Source File: c:\inetpub\wwwroot\PocDVDMasterList.aspx
¤ Line: 71
¤
¤ Elsewhere, it was suggested to change the permissions of
¤ the database file by right clicking on the directory,
¤ selecting Security and doing Add. The problem is there
¤ is no Security tab when i select properties for the
¤ directory. Is something screwed up on my system, or are
¤ these instructions for a different version of windows?
¤
¤ Thanks Again

What does Server.MapPath return? I would make certain that the correct physical path is being
returned first, before trying to connect.

I'm not sure why you wouldn't have a Security tab for your folder unless it is an account
permissions issue. Is the account you're using to access the Security tab for the folder an Admin
account?

Also, what kind of authentication are you using for your web application? If it is anonymous then
the ASPNET account would need Read, Write, Update and Delete permissions for files in the database
folder.


Paul ~~~ (e-mail address removed)
Microsoft MVP (Visual Basic)
 
Chris,

It is formatted as NTFS. This machine originally had
Windows XP Home on it, and I upgraded over top of it,
last friday to XP Pro. Had to install IIS, and reinstall
Framework 1.1. I wonder if I have to do a selective
install to get the Security stuff...

Thanks,
Don
-----Original Message-----
Don, your file system must be NTFS in order to have the Security tab. I
don't know XP, but I guess it supports NTFS.
Using Windows 2000, one can convert the FAT file system to NTFS by typing
the following command at the command prompt:
Convert C: /FS:NTFS
If XP supports it, do a bit of research and decide if you want to go there.
I don't know how to set security on a non NTFS system.

Chris,

Thanks for your response. I'm not sure where I find the
settings you are talking about. I tried right-click in
explorer on the directory, but there was no security.
There was sharing...

I also went into IIS and selected the \data directory,
selected properties, and looked at 'Directory'. All
access' were checked. I couldn't find an add option.

Is there somewhere else I was supposed to go?

Thanks for your help,
Don
-----Original Message-----
A good guess is giving the ASPNET account write access on the directory
where the MS Access database is, because
Update/Delete/Insert also write to
the directory.
Right click on the directory, Properties, Security,
Add,
and look for the
ASPNET user.
Sorry, I don't know where you can get info on the
error
codes.
System: XP Pro, IIS, Access 2000, Visual Studio .NET

I'm accessing an access database from a webpage. I have
no trouble using select to access the information,
but
I
receive errors when I try and UPDATE, DELETE or INSERT.
If i use Access 2000 directly I can. Any ideas on
how
I
can figure out what's going on? Here's an example
of
the
errors I'm getting:

On a delete:
DELETE FROM MOVIES WHERE MOVIES.[ID]=198

Description: Could not delete from specified tables.
Help context: 5003086
Help file:
Native error: -199756777
Error number: -2147467259
Error source: Microsoft JET Database Engine
SQL state: 3086

On an update:
UPDATE MOVIES SET Title='Fallen: Special Edition ',
Studio='MGM', Genre='Suspense Thriller',
Format='AWS/P&S', Sound='DD 5.1', Length='125 Min',
Date='6/16/1998 12:00:00 AM' WHERE ID=198

Description: Syntax error in UPDATE statement.
Help context: 5003144
Help file:
Native error: -526847407
Error number: -2147217900
Error source: Microsoft JET Database Engine
SQL state: 3000

Where can I look up the error code(s)?

I also brought some work i was doing on another pc server
onto this server. On the other pc everything works. On
this pc updates, etc. don't work. I feel confident it's
not the SQL, so it's gotta be something else. Perhaps
Access Control? I can't figure out where to look.

Any help appreciated,
Thanks,
Don


.


.
 
Paul,

The account that was created for ASP:
"ASP.NET Machine A..." was set to "Limited". I changed
it to admin in Control Panel->User Accounts and restarted
IIS and now it works. Thanks for your help. Still don't
know why I don't get a security tab in properties for my
directories tho.

While this works, am I creating a future headache by
doing this? in terms of web security? or is this pretty
standard?

Thanks again for your help.

I guess I'll search for a Windows XP Pro forum to find
out why I don't get the security tab :-/.

Don
-----Original Message-----
¤ I looked over the articles and they mention a web.config
¤ file with <identity impersonate="true" />. First off
i
¤ didn't have a web.config file, but did a search, and
¤ found there were 80 in various places on my machine. So
¤ I took one from a default VS.NET project
¤ (WebApplication1), added the line and copied it into
¤ wwwroot, where my application resides. Things got worse -
¤ now my page bombs on my first attempt at accessing the
¤ database. Here are the error lines that display:
¤
¤ Exception Details:
¤ System.Runtime.InteropServices.COMException: Unspecified
¤ error
¤
¤ Source Error:
¤
¤ Line 69: Conn.provider="Microsoft.Jet.OLEDB.4.0"
¤ Line 70: Conn.mode=3
¤ ----- here's the line it didn't like:
¤ Line 71: conn.open(server.mappath("data\Poconos.mdb"))
¤ -----
¤ Line 72: Rs=Server.CreateObject("ADODB.Recordset")
¤ Line 73: 'Rs.mode=3
¤
¤
¤ Source File:
c:\inetpub\wwwroot\PocDVDMasterList.aspx
¤ Line: 71
¤
¤ Elsewhere, it was suggested to change the permissions of
¤ the database file by right clicking on the directory,
¤ selecting Security and doing Add. The problem is there
¤ is no Security tab when i select properties for the
¤ directory. Is something screwed up on my system, or are
¤ these instructions for a different version of windows?
¤
¤ Thanks Again

What does Server.MapPath return? I would make certain
that the correct physical path is being
returned first, before trying to connect.

I'm not sure why you wouldn't have a Security tab for
your folder unless it is an account
permissions issue. Is the account you're using to access
the Security tab for the folder an Admin
account?

Also, what kind of authentication are you using for your
web application? If it is anonymous then
the ASPNET account would need Read, Write, Update and
Delete permissions for files in the database
 
Chris,

The account that was created for ASP:
"ASP.NET Machine A..." was set to "Limited". I changed
it to admin in Control Panel->User Accounts and restarted
IIS and now it works. Thanks for your help. Still don't
know why I don't get a security tab in properties for my
directories tho.

I hope doing this doesn't create future web security
problems for me.

I'm going to look for a windows xp pro support site to
try and find out why I don't get the security tab.

Thanks Again,
Don
-----Original Message-----
Don, your file system must be NTFS in order to have the Security tab. I
don't know XP, but I guess it supports NTFS.
Using Windows 2000, one can convert the FAT file system to NTFS by typing
the following command at the command prompt:
Convert C: /FS:NTFS
If XP supports it, do a bit of research and decide if you want to go there.
I don't know how to set security on a non NTFS system.

Chris,

Thanks for your response. I'm not sure where I find the
settings you are talking about. I tried right-click in
explorer on the directory, but there was no security.
There was sharing...

I also went into IIS and selected the \data directory,
selected properties, and looked at 'Directory'. All
access' were checked. I couldn't find an add option.

Is there somewhere else I was supposed to go?

Thanks for your help,
Don
-----Original Message-----
A good guess is giving the ASPNET account write access on the directory
where the MS Access database is, because
Update/Delete/Insert also write to
the directory.
Right click on the directory, Properties, Security,
Add,
and look for the
ASPNET user.
Sorry, I don't know where you can get info on the
error
codes.
System: XP Pro, IIS, Access 2000, Visual Studio .NET

I'm accessing an access database from a webpage. I have
no trouble using select to access the information,
but
I
receive errors when I try and UPDATE, DELETE or INSERT.
If i use Access 2000 directly I can. Any ideas on
how
I
can figure out what's going on? Here's an example
of
the
errors I'm getting:

On a delete:
DELETE FROM MOVIES WHERE MOVIES.[ID]=198

Description: Could not delete from specified tables.
Help context: 5003086
Help file:
Native error: -199756777
Error number: -2147467259
Error source: Microsoft JET Database Engine
SQL state: 3086

On an update:
UPDATE MOVIES SET Title='Fallen: Special Edition ',
Studio='MGM', Genre='Suspense Thriller',
Format='AWS/P&S', Sound='DD 5.1', Length='125 Min',
Date='6/16/1998 12:00:00 AM' WHERE ID=198

Description: Syntax error in UPDATE statement.
Help context: 5003144
Help file:
Native error: -526847407
Error number: -2147217900
Error source: Microsoft JET Database Engine
SQL state: 3000

Where can I look up the error code(s)?

I also brought some work i was doing on another pc server
onto this server. On the other pc everything works. On
this pc updates, etc. don't work. I feel confident it's
not the SQL, so it's gotta be something else. Perhaps
Access Control? I can't figure out where to look.

Any help appreciated,
Thanks,
Don


.


.
 
Don, your ASPNET account will now be able to truly kick butt, running as the
admin user. I don't think it is a good idea, maybe you should, as you say,
look on the XP support site to see where your security tab went to. Just
right-click on your C drive in any case, go properties and see if it says
NTFS.

Don Woods said:
Chris,

The account that was created for ASP:
"ASP.NET Machine A..." was set to "Limited". I changed
it to admin in Control Panel->User Accounts and restarted
IIS and now it works. Thanks for your help. Still don't
know why I don't get a security tab in properties for my
directories tho.

I hope doing this doesn't create future web security
problems for me.

I'm going to look for a windows xp pro support site to
try and find out why I don't get the security tab.

Thanks Again,
Don
-----Original Message-----
Don, your file system must be NTFS in order to have the Security tab. I
don't know XP, but I guess it supports NTFS.
Using Windows 2000, one can convert the FAT file system to NTFS by typing
the following command at the command prompt:
Convert C: /FS:NTFS
If XP supports it, do a bit of research and decide if you want to go there.
I don't know how to set security on a non NTFS system.

Chris,

Thanks for your response. I'm not sure where I find the
settings you are talking about. I tried right-click in
explorer on the directory, but there was no security.
There was sharing...

I also went into IIS and selected the \data directory,
selected properties, and looked at 'Directory'. All
access' were checked. I couldn't find an add option.

Is there somewhere else I was supposed to go?

Thanks for your help,
Don
-----Original Message-----
A good guess is giving the ASPNET account write access
on the directory
where the MS Access database is, because
Update/Delete/Insert also write to
the directory.
Right click on the directory, Properties, Security, Add,
and look for the
ASPNET user.
Sorry, I don't know where you can get info on the error
codes.

"Don Woods" <[email protected]_NO_SPAM>
wrote in message
System: XP Pro, IIS, Access 2000, Visual Studio .NET

I'm accessing an access database from a webpage. I have
no trouble using select to access the information, but
I
receive errors when I try and UPDATE, DELETE or INSERT.
If i use Access 2000 directly I can. Any ideas on how
I
can figure out what's going on? Here's an example of
the
errors I'm getting:

On a delete:
DELETE FROM MOVIES WHERE MOVIES.[ID]=198

Description: Could not delete from specified tables.
Help context: 5003086
Help file:
Native error: -199756777
Error number: -2147467259
Error source: Microsoft JET Database Engine
SQL state: 3086

On an update:
UPDATE MOVIES SET Title='Fallen: Special Edition ',
Studio='MGM', Genre='Suspense Thriller',
Format='AWS/P&S', Sound='DD 5.1', Length='125 Min',
Date='6/16/1998 12:00:00 AM' WHERE ID=198

Description: Syntax error in UPDATE statement.
Help context: 5003144
Help file:
Native error: -526847407
Error number: -2147217900
Error source: Microsoft JET Database Engine
SQL state: 3000

Where can I look up the error code(s)?

I also brought some work i was doing on another pc
server
onto this server. On the other pc everything works. On
this pc updates, etc. don't work. I feel confident
it's
not the SQL, so it's gotta be something else. Perhaps
Access Control? I can't figure out where to look.

Any help appreciated,
Thanks,
Don


.


.
 
¤ Paul,
¤
¤ The account that was created for ASP:
¤ "ASP.NET Machine A..." was set to "Limited". I changed
¤ it to admin in Control Panel->User Accounts and restarted
¤ IIS and now it works. Thanks for your help. Still don't
¤ know why I don't get a security tab in properties for my
¤ directories tho.
¤
¤ While this works, am I creating a future headache by
¤ doing this? in terms of web security? or is this pretty
¤ standard?

Well, you probably don't want to give Admin rights to the ASPNET account. You should be able to
provide appropriate access to the folder where the database is located once you are able to get the
security tab.

I'm not in front of an XP Pro machine at the moment but I seem to remember that the Security tab is
hidden by default. If I remember correctly, open Windows Explorer and click on Tools...Folders
Options...View and deselect Simple File Sharing. Then check to see if the Security tab is available.


Paul ~~~ (e-mail address removed)
Microsoft MVP (Visual Basic)
 
Paul,

Thank you! Thank you! Thank you!

That is what I needed. It was driving me crazy. Everytime
someone would tell me what to do to fix it, I didn't have
the option. That was the trick. When I disabled Simple
File sharing, and accessed the '\data' subdirectory's
Security tab, I got an error saying accesses were ordered
incorrecly on the folder. It fixed it and everything
worked fine after setting the ASPNET account to limited.

Thank you for your time and effort.
Don
-----Original Message-----
¤ Paul,
¤
¤ The account that was created for ASP:
¤ "ASP.NET Machine A..." was set to "Limited". I changed
¤ it to admin in Control Panel->User Accounts and restarted
¤ IIS and now it works. Thanks for your help. Still don't
¤ know why I don't get a security tab in properties for my
¤ directories tho.
¤
¤ While this works, am I creating a future headache by
¤ doing this? in terms of web security? or is this pretty
¤ standard?

Well, you probably don't want to give Admin rights to
the ASPNET account. You should be able to
provide appropriate access to the folder where the
database is located once you are able to get the
security tab.

I'm not in front of an XP Pro machine at the moment but
I seem to remember that the Security tab is
hidden by default. If I remember correctly, open Windows
Explorer and click on Tools...Folders
Options...View and deselect Simple File Sharing. Then
check to see if the Security tab is available.
 
Chris,

I checked it and it is NTFS. Paul Clement in his last
append in this thread solved my problem. Turns out
the 'Security' tab is hidden by default. Had to go into
Explorer and select Ttools->Folder Options->View and
disable 'Use simple file sharing'. When I did that,
the 'Security' tab appeared. When I went to the Security
tab for the '\data' subdirectory I got an error saying
something about 'permissions being ordered incorrectly'.
It fixed it and then everything worked after I set the
ASPNET account to Limited.

Thanks again for all your time and efforts,
Don
-----Original Message-----
Don, your ASPNET account will now be able to truly kick butt, running as the
admin user. I don't think it is a good idea, maybe you should, as you say,
look on the XP support site to see where your security tab went to. Just
right-click on your C drive in any case, go properties and see if it says
NTFS.

Chris,

The account that was created for ASP:
"ASP.NET Machine A..." was set to "Limited". I changed
it to admin in Control Panel->User Accounts and restarted
IIS and now it works. Thanks for your help. Still don't
know why I don't get a security tab in properties for my
directories tho.

I hope doing this doesn't create future web security
problems for me.

I'm going to look for a windows xp pro support site to
try and find out why I don't get the security tab.

Thanks Again,
Don
-----Original Message-----
Don, your file system must be NTFS in order to have
the
Security tab. I
don't know XP, but I guess it supports NTFS.
Using Windows 2000, one can convert the FAT file
system
to NTFS by typing
the following command at the command prompt:
Convert C: /FS:NTFS
If XP supports it, do a bit of research and decide if you want to go there.
I don't know how to set security on a non NTFS system.

"Don Woods" <[email protected]>
wrote
in message
Chris,

Thanks for your response. I'm not sure where I find the
settings you are talking about. I tried right- click in
explorer on the directory, but there was no security.
There was sharing...

I also went into IIS and selected the \data directory,
selected properties, and looked at 'Directory'. All
access' were checked. I couldn't find an add option.

Is there somewhere else I was supposed to go?

Thanks for your help,
Don
-----Original Message-----
A good guess is giving the ASPNET account write access
on the directory
where the MS Access database is, because
Update/Delete/Insert also write to
the directory.
Right click on the directory, Properties, Security, Add,
and look for the
ASPNET user.
Sorry, I don't know where you can get info on the error
codes.

"Don Woods"
wrote in message
System: XP Pro, IIS, Access 2000, Visual Studio .NET

I'm accessing an access database from a webpage.
I
have
no trouble using select to access the
information,
but
I
receive errors when I try and UPDATE, DELETE or INSERT.
If i use Access 2000 directly I can. Any ideas
on
how
I
can figure out what's going on? Here's an
example
of
the
errors I'm getting:

On a delete:
DELETE FROM MOVIES WHERE MOVIES.[ID]=198

Description: Could not delete from specified tables.
Help context: 5003086
Help file:
Native error: -199756777
Error number: -2147467259
Error source: Microsoft JET Database Engine
SQL state: 3086

On an update:
UPDATE MOVIES SET Title='Fallen: Special Edition ',
Studio='MGM', Genre='Suspense Thriller',
Format='AWS/P&S', Sound='DD 5.1', Length='125 Min',
Date='6/16/1998 12:00:00 AM' WHERE ID=198

Description: Syntax error in UPDATE statement.
Help context: 5003144
Help file:
Native error: -526847407
Error number: -2147217900
Error source: Microsoft JET Database Engine
SQL state: 3000

Where can I look up the error code(s)?

I also brought some work i was doing on another pc
server
onto this server. On the other pc everything works. On
this pc updates, etc. don't work. I feel confident
it's
not the SQL, so it's gotta be something else. Perhaps
Access Control? I can't figure out where to look.

Any help appreciated,
Thanks,
Don


.



.


.
 
Back
Top