Current location: Hot Scripts Forums » Programming Languages » ASP » ASP Upload and add link to database


ASP Upload and add link to database

Reply
  #11 (permalink)  
Old 06-17-05, 05:02 AM
minority minority is offline
Wannabe Coder
 
Join Date: Jun 2005
Posts: 145
Thanks: 0
Thanked 0 Times in 0 Posts
Sorry I was being stupid its a reservered word i have changed it and now it working.

But still not sure how to direct the folder to the database/qrm.mdb file?

strCon = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source="("../database/qrm.mdb")

Is it something like the above statement?
Reply With Quote
  #12 (permalink)  
Old 06-17-05, 09:02 AM
koncept
Guest
 
Posts: n/a
where it says server.mappath("db.mdb") change that to be either a physical path (c:\...\db.mdb) or server.mappath("../../mydbs/db.mdb")

what is line 200. i cannot give you anything with out knowing what that is. I dont mind the questions. its how we all learn
Reply With Quote
  #13 (permalink)  
Old 06-20-05, 02:48 AM
minority minority is offline
Wannabe Coder
 
Join Date: Jun 2005
Posts: 145
Thanks: 0
Thanked 0 Times in 0 Posts
Hey again sorry about delay.

the line 200 one was sorted managed to find it myself lol it was a stupid mistake.

But i cannot connect to my database using a virtual address i tried ../../database/qrm.mdb.

This is how the code looks just now.

Quote:
strCon = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("/database/qrm.mdb")
I have also tried /database/qrm.mdb which gave me the following error:
Quote:
Microsoft JET Database Engine (0x80004005)
'c:\inetpub\wwwroot\database\qrm.mdb' is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides.
This is the only one that is pretty much stopping me from connecting to my database in a single location as at the moment for testing purposes i have to move it into the folder where the script is.

this is how my folders are set out at the root:

Admin/edit = This is the folder that i am currently in (root/admin/edit/
images
database = This is the folder i am trying to get into to look at the db
Reply With Quote
  #14 (permalink)  
Old 06-20-05, 07:57 AM
koncept
Guest
 
Posts: n/a
the code should work if it is actualy set up that way, i usualy use ../ to get there with server.mappath ../../database/qrm.mdb
Reply With Quote
  #15 (permalink)  
Old 06-20-05, 08:53 AM
minority minority is offline
Wannabe Coder
 
Join Date: Jun 2005
Posts: 145
Thanks: 0
Thanked 0 Times in 0 Posts
the code looks like this
strCon = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("\intranet/database/qrm.mdb")

This gets rid of the errors that i was getting however now it cant find my table job lol but it finds the db. however if i place the db in the same folder it finds the table
The code is listed bellow it is basically what you told me to do??
Code:
<%
 	 Dim strCon
 	 Dim rsGeolink
 	 Dim strSQL	
 	 Set rsGeolink = Server.CreateObject("ADODB.Recordset")
 	 strCon = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("\intranet/database/qrm.mdb")
 	 strSQL = "SELECT Pos_ID, Pos_Name FROM Job"
 	  rsGeolink.Open strSQL, strCon
 	 Do While not rsGeolink.EOF
 %>
the error i get with this code is as follows

Error Type:
Microsoft JET Database Engine (0x80040E37)
The Microsoft Jet database engine cannot find the input table or query 'Job'. Make sure it exists and that its name is spelled correctly.
/IIShelp/geolink/Admin/edit/editjob.asp, line 201
Reply With Quote
  #16 (permalink)  
Old 06-20-05, 10:36 AM
koncept
Guest
 
Posts: n/a
can i sugest just using the physical path
strCon = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=c:\webroot\intranet\apps\db.mdb"

or what ever the path is
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
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 On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple Image Upload and Text in one go php-learner Script Requests 2 04-28-05 12:42 PM
PHP Script Request DazzlyWorks Script Requests 0 01-16-05 01:23 PM
Image upload and if / else mdhall PHP 4 11-14-04 03:12 PM
If statement in file upload mdhall PHP 4 04-12-04 05:33 PM


All times are GMT -5. The time now is 03:24 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.