Questions regarding a few persistent problems

This is a discussion on "Questions regarding a few persistent problems" within the Classic ASP section. This forum, and the thread "Questions regarding a few persistent problems are both part of the Program Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Program Your Website > Classic ASP

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Nov 15th, 2005, 09:08
New Member
Join Date: Nov 2005
Age: 24
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Question Questions regarding a few persistent problems

First off, I'm making a portal for some students of a particular line of my education. What I need is for the admin to be able to write news, pick the users who should see the news when they login. This means I'm operating with the use of two tables in my Access database. One names news with the newsid and newselements and one for newsid and userids (seperated by commas) called usernews.

Now, my problem is that when I get to the point that users have to view any news they might have, I cannot seem to be able to use both databases. I've tried with a simple select sentence that I have been told should work when I have created a relationship (one to one, between newsids) in the database. That didn't work, so I tried doing an inner join the asp code together with my select sentence. It still says that it cannot find the fields I'm referring to in the relavant table. I have tried many different ways of doing all the basic stuff, but with no success. What method do I need to use to make this work? I found something called 'union' to do two selects that I haven't tried out yet. Wonder if that might be the answer.

The code I currently use is, by the way:

Code: Select all
<% 
                         SQL = "SELECT * FROM usernews WHERE userid = '%," & getuserid & ",%' ORDER BY newsid ASC" 
                         set db = conn.execute(SQL)
   %>
Code: Select all
The items I'm not able to call:
    
   <td width="260"><%= replace(db("news.subject"),"###","'",1,-1,1)%></td>
   <td width="124"><%= replace(db("news.thedate"),"###","'",1,-1,1)%></td>
   </tr>
   <tr>
   <td colspan="3"><%= db("news.content")%></td>
Another thing I need use do is to automatically delete the directory belonging to a user when the user is deleted by an admin. However, for some reason, I have to write the full path, I cannot request any element. You can see the code I've used below:

Code: Select all
<% 'Deletes folder assigned to user %>
   <% 
   specificpath = "/users/" & request.form(useform)
   folderpathing = server.MapPath(specificpath)
    
   dim fs
   set fs=Server.CreateObject("Scripting.FileSystemObject")
   if fs.FolderExists(folderpathing) then
     fs.DeleteFolder folderpathing,true
   end if
   set fs=nothing
   %>
I've tried questing the username from database, I've tried writing it to a text-file and requesting it. Every time it only reads the first part of the path (c:/inetpub/wwwroot/users/) and doesn't include the requested part. It works perfectly fine if I manually write the full path with the name of the directory I want to delete.

The last thing I have problems with before my project seems complete is permissions. I really don't want to hand in my project on a CD and find out it didn't work. In trying to answer some of my technical problems, I had sent my project to my teacher. She said she had no permission to view them, even if she'd tried to change permissions to allow her to. As I'm testing the site via localhost I had to change the permissions of the Access database. So, I disabled simple sharing. The only permissions I changed were the one for the database, but my project partner has also had problems being allowed to view the files since I disabled simple sharing (it worked when she tried it on a different computer and changed permissions, but my teacher tried it on three computers and two servers with no luck). I've re-sent the files to my teacher after re-enabling simple sharing, but she hasn't responded yet.

I'm kind of pressed for time with this project, so I was simply hoping you guys could come up with some kind of answer for these things. I user five hour to try to get the deletepath right, and I found several similar cases on google, although the one of them that actually were about using a request as a part of a path were never answered. I came to the conclution that it might simple not be possible (the way I try to do it), but am I wrong?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Nov 22nd, 2005, 20:36
New Member
Join Date: Nov 2005
Age: 24
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Questions regarding a few persistent problems

Allright, I solved the problems. Apparantly, if I specify the table from which to select something in the SQL sentence, I should not specify the table when I write out the field later on.

My userdeletion deleted the users directory because I forgot to only delete the directory only where the user checkbox was acutally delected (thus sending on a value).

The permissions work fine. I still haven't successfully tested uploads on a server (due to some faulty servers), but I have now gotten it to work on two localhosts (one of which is one on the computers of my education institution), so I'll be fine.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
questions, regarding, few, persistent, problems

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
1 questions Voodoochilli Webforumz Cafe 11 Jul 26th, 2007 14:17
Flash Games Love um hate um share your thoughts,problems,questions HERE! rusty149 Flash & Multimedia Forum 14 Sep 3rd, 2006 17:04
Questions!!! craig Webforumz Suggestions and Feedback 27 Dec 8th, 2005 10:59
2 questions... benbacardi Classic ASP 5 May 6th, 2005 21:25


All times are GMT. The time now is 09:36.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42