Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > .NET 1.0 and Visual Studio.NET > VS.NET 2002/2003
|
VS.NET 2002/2003 Discussions about the Visual Studio.NET programming environment, the 2002 (1.0) and 2003 (1.1). ** Please don't post code questions here ** For issues specific to a particular language in .NET, please see the other forum categories.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VS.NET 2002/2003 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 8th, 2004, 02:13 AM
Authorized User
 
Join Date: May 2004
Posts: 46
Thanks: 0
Thanked 0 Times in 0 Posts
Default do insert into and update sql commmand

Hello,

My web page always display error everytime I want to use update or insert sql command into my ms Access database which is located in the web server. I think the problem is because the files in the server are not allowed to be changed. Is there a way to do insert/update sql statement in that sort of environment?

Thank you

 
Old June 8th, 2004, 02:28 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

No, there isn't. If the security settings on the disk are preventing you from writing to the database, you cannot insert data to that database. Instead, you have to lower the security settings, so that the account that the Web server runs under is allowed to perform the insert / update.

Take a look here for more information about this subject: http://Imar.Spaanjaars.Com/QuickDocID.aspx?QUICKDOC=290

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old June 9th, 2004, 09:19 PM
Authorized User
 
Join Date: May 2004
Posts: 46
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Imar,

but the problem is I cannot do anything to the web server's security settings. Is there really no other possible way to do the query?

 
Old June 10th, 2004, 01:47 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

If the error is really caused by security settings, then there really is no way to solve them without changing the security settings, don't you think?

"Hey, we have very tight security on that system. No-one without the required permissions can change anything to it, not even write a file. Oh, but hey, you can easily work around that by doing bla bla bla" ;)

Why can't you change anything to the system? Are you running your site with an ISP? They usually have a special folder or other settings to allow you to write to your databases.

Are you sure the error is security related?

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old June 10th, 2004, 05:47 AM
Authorized User
 
Join Date: May 2004
Posts: 46
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

I have sent them email regarding this, but they haven't replied yet. Yes my site is running on a remote server (ISP) and I am 95% sure that the error is security related because I can do select queries on the server without any problem. I also had sent the application to my friend to let them tested it, they had the same error on the same page (the error says unupdateable queries). After I told them to share the folder, the error dissapear. Can the security protection be tricked?

 
Old June 10th, 2004, 06:08 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Quote:
quote:Can the security protection be tricked?
What do you think?

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old June 10th, 2004, 10:14 AM
Authorized User
 
Join Date: May 2004
Posts: 46
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I think there is, but i dont know how

 
Old June 10th, 2004, 11:12 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

How good is a security mechanism when you and I can trick it just like that? The idea is that security settings prevent you from writing to a specific file or folder if you don't have the required permissions. You have to live with that, or ask your ISP to change those settings for you.

If they don't respond in a timely fashion, or cannot fulfill your request (if they are not officially not supporting this), I'd consider them incompetent, and I'd look for another host ;)

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old June 15th, 2004, 09:56 PM
Authorized User
 
Join Date: May 2004
Posts: 46
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I mean maybe I can let my forms to virtually log in to the security by entering my ftp username n pass therefore the forms can access & do insert/update to the database? or some other ways.

I guess I have to email them again. Thanks Imar.

 
Old June 16th, 2004, 01:46 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

You'll have to check with your ISP if they support a scenario like this.

Usually, on Windows based server, the disk is protected with NTFS rights. These rights are configured for accounts that come from the local SAM or from Active Directory.

FTP accounts are often managed separately, within the FTP server itself (although some FTP programs can use AD as well).

This means there is usually not a one to one relation between the account that is used to run one or more Web sites (often IUSR_MachineName) and the account that you use to access your site through FTP.
It's worth a try though, but personally, I would just contact my ISP and tell them I need a writable folder or a DSN for my database.

Cheers,

Imar---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Insert/Update problem soheil BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 5 November 15th, 2007 11:18 AM
Insert/Update to sql server DB in a scheduler rajanikrishna ASP.NET 2.0 Professional 3 October 26th, 2007 04:27 AM
T-SQL statement causing error with insert/update saf SQL Language 0 September 7th, 2007 04:48 PM
insert & update statment problem (sql express) abdrabaa C# 2 July 15th, 2007 05:54 AM
Insert and update with one submit dorothee Dreamweaver (all versions) 1 June 14th, 2004 06:25 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.