Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > .NET 1.0 and Visual Studio.NET > VS.NET 2002/2003
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 8th, 2004, 02:13 AM
Authorized User
 
Join Date: May 2004
Location: , , .
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

Reply With Quote
  #2 (permalink)  
Old June 8th, 2004, 02:28 AM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 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.
Reply With Quote
  #3 (permalink)  
Old June 9th, 2004, 09:19 PM
Authorized User
 
Join Date: May 2004
Location: , , .
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?

Reply With Quote
  #4 (permalink)  
Old June 10th, 2004, 01:47 AM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 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.
Reply With Quote
  #5 (permalink)  
Old June 10th, 2004, 05:47 AM
Authorized User
 
Join Date: May 2004
Location: , , .
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?

Reply With Quote
  #6 (permalink)  
Old June 10th, 2004, 06:08 AM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

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

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Reply With Quote
  #7 (permalink)  
Old June 10th, 2004, 10:14 AM
Authorized User
 
Join Date: May 2004
Location: , , .
Posts: 46
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I think there is, but i dont know how

Reply With Quote
  #8 (permalink)  
Old June 10th, 2004, 11:12 AM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 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.
Reply With Quote
  #9 (permalink)  
Old June 15th, 2004, 09:56 PM
Authorized User
 
Join Date: May 2004
Location: , , .
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.

Reply With Quote
  #10 (permalink)  
Old June 16th, 2004, 01:46 AM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 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.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 10:28 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.