Referencing To Database In Folder

This line of code works fine when the database is in the webroot folder:

DataConn.Open "Driver=Microsoft Access Driver (*.mdb);DBQ=" & Server.MapPath("LessonsDatabase.mdb")

but when the asp file containing this code is in the webroot but the database is in a subfolder called db. I dont know how to reference it relatively. PLease help! I'm sure this is very basic to anyone in the know.

View Replies


ADVERTISEMENT

Displaying An Image From A Folder From A Name Held In A Database

I wish to display an image from a folder based on the name held in a field in a database.

<%
If len(rssal("picture"))>0 then
Response.Write ("<img src=""/ProductImages/rssal("ProductCode").gif"">")
ELSE
Response.Write ("<img src=""images/sorry.gif"">")
END IF
%>

View Replies View Related

Referencing The Value Of A Input Field.

I have a HTML control generated by the following:

INPUT TYPE="hidden" NAME="MyAnswer" VALUE=""

Is there a way to reference the Value of this control using VB program code???

View Replies View Related

QueryString And Referencing Anchors In The URL

I have a need to pass a url via the address field to a page - i.e.
page.asp?myurl=newpage.asp.

When I get the QueryString object for "myurl" it correctly comes back
with 'newpage.asp'. However, if I pass an anchor name on the url -
e.g. page.asp?myurl=newpage.asp#myanchor - the result is still just
'newpage.asp'.

Is there a way to pass the anchor link into the page and get access to
it?

View Replies View Related

Referencing Session Variables

I am trying to run a Session_OnStart Script based on a Session variable that is created on a .asp page. The problem is that when I reference the Session in Global.asa It has no value but it has a value on the .asp page level. Is there a certain way that I have to reference a Session in Global.asa?

What I have is somthing like the following:

Sub Session_OnStart
If Session("NIS")<> "" Then
Run The Routine
End If
End Sub

Based on the above the routine does not run because Global.asa does not seem to get the value of Session("NIS").

View Replies View Related

Referencing (many) Form Fields In An Array

I am trying to do some client-side form validation using vbscript. The form consists of 15 rows, with five fields in each row. For example, I want to be able to look at the contents of the 3rd field in the 9th row. How do I reference that field using vbscript? Do I loop through a collection?

View Replies View Related

Referencing Session Variables In Global.asa

I am trying to run a Session_OnStart Script based on a Session variable that is created on a .asp page. The problem is that when I reference the Session in Global.asa It has no value but it has a value on the .asp page level. Is there a certain way that I have to reference a Session in Global.asa?

What I have is somthing like the following:

Sub Session_OnStart
If Session("NIS")<> "" Then
Run The Routine
End If
End Sub

Based on the above the routine does not run because Global.asa does not seem to get the value of Session("NIS").

View Replies View Related

Creating And Referencing Multidimensional Arrays

I'm just confused because I'm obviously calling the code wrong but every tutorial I find makes it seem like I'm referencing the multidimensional arrays correctly so I don't knwo what I'm doing wrong. Code:

View Replies View Related

Referencing Variables Through Other Variables

I'm not sure how to best describe my problem, so a simple example should help explain things:

I have two arrays, called set1_data and set2_data

if I create a variable like so:

firstPart = "set1"

and then assign like this:

copyOfArray = firstPart & "_data"

how do I make copyOfArray reference the set1_array, as opposed to just a string "set1_array" which is what it's doing?

I've had a good rummage round ye olde Internet but couldn't find anything there must be a keyword or function to achieve this?!?

View Replies View Related

Cant Find Folder!

However, when i opened a page on my pc the database string was:

DBFolder = path & "..mysqldataformuladata

I cant find the folder in question. Even when ftping.

Any ideas where is could be lurking?

View Replies View Related

Folder Copying

I got a folder name f1 in server. I need to copy same folder and paste it in same root dorectory. Can any one help with asp code for it ....

View Replies View Related

Folder Permissions

Does anyone know of an asp script, online somewhere, that I can use to find
out the permissions of a folder? My ISP says these folders have full
permissions, but my programs say "permission denied". I don't know if it is
the programming, or if the folder don't really have the right permissions.

View Replies View Related

Uploading A Folder

Is their any way of implementing an Upload section on my site that can upload a folder with images in them, insdead of just images..

View Replies View Related

Looping Through Folder

I have a folder with about 40 swf training movies.
I want to loop through the folder and display the titles of the movies and make them links.I just need help getting pointed in the right direction to make this happen.

View Replies View Related

Securing A Folder

I am wriging a web application which cosists of a main directory with all the main code, and a subdirectory with the administration features. althogh the two locations will share configuration resources, I need to protect the admin folder from unauthorised access. I know that in apache their is some kind of authentication (I think it is used through an ".htaccess" command or someting) and I'm wanting to do a similar thing in ASP.

View Replies View Related

Deleting Folder

I have a script which allows a user to upload and delete files from the
server.Is it possible (and if so how) to do a check to see if the folder is empty
(ie if the last file in a particular folder is deleted by a user) and if it
is empty, delete the folder?

View Replies View Related

Create New Folder

how can i create a new folder by using ASP??

View Replies View Related

Creating Folder Using ASP

Is it possible to create a folder using a virtual path? This is for a site on a shared hosting server.

View Replies View Related

Folder Path

im having a problem with folder path in include files. I have a solution, but there must be a way better one. The problem is when i have an include file... menu.inc in my root directory root/. This menu.inc references images in the root/images/ folder.
I also have an articles folder root/articles/. The menu.inc is included in files in the articles folder, however this messes up the image paths and files in the articles folder are looking for the images in root/articles/images/.
to combat this, in front of every image reference in my menu.inc file, i have a variable <%= pathVar %>. At the top of every file in the articles folder, i have the command <% pathVar = "../" %>. this will insert a ../ before the images folder in the reference therfore correcting the image reference. In the root folder I use <% pathVar = "" %> , so the <%= pathVar %> amounts to nothing leaving the paths correct.
This works, however means having to switch from HTML to ASP mode for every image in the include file, which is not efficient. Is there a better way around the path problem.

View Replies View Related

Folder Listing

I've managed to get file listings, do textstreams, move around in the file system a bit, just wondering how I get folder listings as I would file listings...
Here's what I've tried, but it's not quite working:

[vbs]
strPathInfo=Request.ServerVariables("SCRIPT_NAME")
strPhysicalPath=Server.MapPath(strPathInfo)

Set objFile=objFSO.GetFile(strPhysicalPath)
Set objFolder=objFile.ParentFolder
Set objFolderFolders=objFolder.Folders

For Each objFolderItem in objFolderFolders
mess=mess & "<tr><td><a href=""" & objFileItem.Name & """>" & objFolderItem.Name & "</td><td></td><td></td><td></td><td></td></tr>"
Next
[/vbs]

View Replies View Related

Choose A Folder With ASP.Net

I want to allow a user to select a windows folder for reading. I have tried
to work it out without success. Can anyone help me out or point me in the
right direction. I am an experienced VB6 programmer but this is my first
ASP.Net project.

View Replies View Related

Download Mdb From Db Folder

how to download .mdb file from the db folder. I had written .asp file to download that .mdb file. By programming it to copy .mdb file from db folder to httpdocus folder,but say one error that is Permission Denied !

I had tried another way that is converting tables to .xml file and downloading it - Its Working When i tried convert .xml file to table - Here, I need coding for conversion.

View Replies View Related

Folder Creation

I'm creating a folder...no problem there:

dim fso
set fso = Server.CreateObject("Scripting.FileSystemObject")
fso.CreateFolder Server.mapPath("pictureskickoff")

but...how do I check if there allready is a folder there with the same name before creating one?

View Replies View Related

Spaces In Folder Name

I use breadcrumbs for navigation
I have a folder called College Students in WWWRoot
in college students i have a page called mainpage.shtml
when i open the page like this
www.abc.com/college students/mainpage.shtml
i see the breadcrumbs like this
Home >> College%20Students >> Students List
but i want to see it like this
Home >>College Students >> Students List
Students List is the title of the page
Can someone tell me how to get rid of those %20 that i see when i have spaces in my folder name

View Replies View Related

Folder Options From Asp

I need to know how to do the following..

Rename a folder

Check to see if folder exists and if it does return an error message.

View Replies View Related

Sharing A Folder

I really need a coding help regarding sharing Folder Module to specific members through giving them rights for access while using Classic ASP....

View Replies View Related

Folder Management

How do you create a folder in the server and then upload files to that folder? could you recommend a good and free FTP plugin?

View Replies View Related

Folder Content

I am looking to pull the contents of a folder and display them. I have been able to do this from the code below but only from a local folder. I would love to be able to get the contents from a web folder. Code:

View Replies View Related

FSO Can't Delete Folder

I'm trying to delete files and folders using FSO. But everytime i run the script, it took very long time to run and files or folders weren't deleted. Here's the script : Code:

View Replies View Related

Empty Folder

How can I know whether a folder is empty using FileSystemObject?

View Replies View Related

Delete Folder

I developed an ASP intranet solution but I have problems with the DeleteFolder command. If I try to delete a folder without subfolders everything goes fine. If I add some files in the folder that must be deleted it is going to be ok. I can also add some subfolders and I don't have problems but when I add more subfolders with other subfolders and files I get an error of forbidden authorization on the line where there is the DeleteFolder command. This happens randomly and sometimes I can see that only a subfolder hasn't been deleted (while the rest is deleted from the hard disk). If I try to delete it normally windows tell me that I can't delete it! I have to reboot my system in order to delete it!

I checked the permissions and everything seems ok. I can delete specific files and folders but I can't understand why I get this problem.

View Replies View Related

How Can I Filter By Folder

How can I filter by folder with ASP & Site Server 3.

I have no control over the catalog.

View Replies View Related

Shared Folder

how can i allow access to a shared network folder? i am trying to give access to my as pages only. i don't want just anyone to type in the path of my files. i can't seem to do this with a shared folder.

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved