473,657 Members | 2,515 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

access file path question

I usually use SQL Server, but have occasionally had to use Access. This is
such an occasion. My research, mainly at aspfaq.com, has been that you need
to put the file path in your connection string, like this (watch out for the
wrap):

strConnection = "Provider=Micro soft.Jet.OLEDB. 4.0;Data
Source=c:\mydir ectoryname\dbna me.mdb;User Id=xxxxx;Passwo rd=xxxxxxx;"
Well, the host of this new site I am working on is asking me if a relative
path will work. I don't think it will, but thought I should ask.

And please, I know that Access is not a good choice, but it needs to be this
way in this case.
Jul 19 '05 #1
7 1870
"middletree " <mi********@hto mail.com> wrote in message
news:ec******** ******@TK2MSFTN GP10.phx.gbl...
I usually use SQL Server, but have occasionally had to use Access. This is
such an occasion. My research, mainly at aspfaq.com, has been that you need to put the file path in your connection string, like this (watch out for the wrap):

strConnection = "Provider=Micro soft.Jet.OLEDB. 4.0;Data
Source=c:\mydir ectoryname\dbna me.mdb;User Id=xxxxx;Passwo rd=xxxxxxx;"
Well, the host of this new site I am working on is asking me if a relative
path will work. I don't think it will, but thought I should ask.


I believe it needs to be a path like the one you listed, but you could also
use the MapPath function to get the full path to the file.
Hope this helps.
Peter Foti
Jul 19 '05 #2
"Peter Foti" <pe***@Idontwan tnostinkingemai lfromyou.com> wrote in message
news:10******** *****@corp.supe rnews.com...
"middletree " <mi********@hto mail.com> wrote in message
news:ec******** ******@TK2MSFTN GP10.phx.gbl...
I usually use SQL Server, but have occasionally had to use Access. This is such an occasion. My research, mainly at aspfaq.com, has been that you need
to put the file path in your connection string, like this (watch out for

the
wrap):

strConnection = "Provider=Micro soft.Jet.OLEDB. 4.0;Data
Source=c:\mydir ectoryname\dbna me.mdb;User Id=xxxxx;Passwo rd=xxxxxxx;"
Well, the host of this new site I am working on is asking me if a relative path will work. I don't think it will, but thought I should ask.


I believe it needs to be a path like the one you listed, but you could

also use the MapPath function to get the full path to the file.


Meant to include this link:
http://www.devguru.com/Technologies/...r_mappath.html

Regards,
Peter Foti
Jul 19 '05 #3
why don't you use server.mappath? ??? like below

strConnection = "Provider=Micro soft.Jet.OLEDB. 4.0;Data
Source="&server .mappath("relat ivepath")&";Use r
Id=xxxxx;Passwo rd=xxxxxxx;"

relative path may be any relative path of your access db...

!mran Khan

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #4
On Thu, 11 Mar 2004 13:12:05 -0600, "middletree "
<mi********@hto mail.com> wrote:
I usually use SQL Server, but have occasionally had to use Access. This is
such an occasion. My research, mainly at aspfaq.com, has been that you need
to put the file path in your connection string, like this (watch out for the
wrap):

strConnectio n = "Provider=Micro soft.Jet.OLEDB. 4.0;Data
Source=c:\mydi rectoryname\dbn ame.mdb;User Id=xxxxx;Passwo rd=xxxxxxx;"
Well, the host of this new site I am working on is asking me if a relative
path will work. I don't think it will, but thought I should ask.
Relative path works, placing the MDB in the same folder (no path)
works and Server.MapPath works. Depending on what your ISP allows and
where the database is located.
And please, I know that Access is not a good choice, but it needs to be this
way in this case.


Access is fine, provided you understand and can live with its
limitations.

Jeff
Jul 19 '05 #5
can't seem to make it work.

Here's my entire code for this include file, and the only thing I changed
here is the ID and password:

strConnection =
"Provider=Micro soft.Jet.OLEDB. 4.0;DataSource= "&server.mappat h("\")"&shape.m d
b;User Id=x;Password=x ;"

filePath = Server.MapPath( "shape.mdb" )

I did this because the Access db is in the same folder as the page which
calls it (not the include file, but the page which calls the include)

The error I get now is:
Expected end of statement

/gracearlingtonc om/shape/includes/shapedbinc.asp, line 5

strConnection =
"Provider=Micro soft.Jet.OLEDB. 4.0;DataSource= "&server.mappat h("\")"&shape.m d
b;User Id=admin;Passwo rd=;"
----------------------------------------------------------------------------
------^In case the wrap is messing things up for you, the arrow is pointing
to the quote mark right after the closing parenthesis.
"Imran Salahuddin Khan" <it***********@ hotmail.com> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
why don't you use server.mappath? ??? like below

strConnection = "Provider=Micro soft.Jet.OLEDB. 4.0;Data
Source="&server .mappath("relat ivepath")&";Use r
Id=xxxxx;Passwo rd=xxxxxxx;"

relative path may be any relative path of your access db...

!mran Khan

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Jul 19 '05 #6
"middletree " <mi********@hto mail.com> wrote in message
news:uZ******** ******@TK2MSFTN GP10.phx.gbl...
can't seem to make it work.

Here's my entire code for this include file, and the only thing I changed
here is the ID and password:

strConnection =
"Provider=Micro soft.Jet.OLEDB. 4.0;DataSource= "&server.mappat h("\")"&shape.m d b;User Id=x;Password=x ;"


Try this:
strConnection =
"Provider=Micro soft.Jet.OLEDB. 4.0;DataSource= "&server.mappat h("\shape.md
b")&";User Id=x;Password=x ;"
Regards,
Peter Foti
Jul 19 '05 #7
Looks like it got past that problem. Now, I have to go research what this
means:

Microsoft JET Database Engine error '80004005'
Could not find installable ISAM.

/gracearlingtonc om/shape/list.asp, line 37

thanks


"Peter Foti" <pe***@Idontwan tnostinkingemai lfromyou.com> wrote in message
news:10******** *****@corp.supe rnews.com...
Try this:
strConnection =
"Provider=Micro soft.Jet.OLEDB. 4.0;DataSource= "&server.mappat h("\shape.md
b")&";User Id=x;Password=x ;"

Jul 19 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
4690
by: Rene' Nielsen | last post by:
Context: Running Windows 2003 Server on an intranet. A web is configured with an anonymous access account that is a domain account that has been granted the desired access to a file on another server in the domain. An asp page in the web attempts to open (or any other access) the remote file and fails. Auditing is enabled on the remote system and for the file in question but no access denied records are being recorded.
1
3742
by: Theerachet Pratoommanee | last post by:
This is error message I've got. Any suggestion would be appreciated. Server Error in '/WebDirectory' Application. ---------------------------------------------------------------------------- ---- Access to the path "CreateFolder" is denied.
7
8850
by: dog | last post by:
I've seen plenty of articles on this topic but none of them have been able to solve my problem. I am working with an Access 97 database on an NT4.0 machine, which has many Access reports. I want my users to be able to select a report, click on a command button on a form, which will then automatically create the report as a pdf file and save it to the user's machine. I am using Adobe Acrobat (5.0 I think) and have Adobe Distiller as a
11
6584
by: Grasshopper | last post by:
Hi, I am automating Access reports to PDF using PDF Writer 6.0. I've created a DTS package to run the reports and schedule a job to run this DTS package. If I PC Anywhere into the server on where the job is running, the job runs sucessfully, PDF files got generated, everything is good. If I scheduled the job to run at the time that I am not logged into the server, Access is not able to print to the printer. The error is pretty...
0
1491
by: Goran | last post by:
Hi I have created a very simple ASP.Net application that only consists of a CrystalReports Viewer, that has been connected to a .rpt file. When the page is loaded in the browser, the following message is shown: ************ Message ************** Access to the path "C:\Program\Microsoft Visual Studio .NET\Crystal Reports\Viewers\dynamic_images" is denied.
13
2345
by: Neo Geshel | last post by:
I have examined about 80+ different upload scripts on the 'net, both in VB and C#, and none seem to do what I need them to do. Perhaps someone here can point me somewhere that Google hasn't reached yet (I have gone all the way to page 50 on Google's results!!). Here are my requirements: • I have a DataGrid. Everything will be done from here. Everything. No exceptions. Everything will also be done in VB, without any code-behind to...
8
9743
by: Sarah | last post by:
I need to access some data on a server. I can access it directly using UNC (i.e. \\ComputerName\ShareName\Path\FileName) or using a mapped network drive resource (S:\Path\FileName). Here is my problem: my vb.net program has problems with UNC. If the UNC server is restarted or goes off-line, my VB.net program crashes. The code for UNC access to the file is included below and is put in the tick event of a form timer control running every...
3
7953
by: David Thielen | last post by:
Hi; I created a virtual directory in IIS 6.0 and my asp.net app runs fine. But when it tries to write a file I get: Access to the path is denied. - C:\Inetpub\wwwroot\RunReportASP\images C:\Inetpub\wwwroot\RunReportASP is the directory of my virtual directory for my app. In it's properties I did check "Write" as a permission. What else do I need to do?
7
1974
by: Visitor No 3 | last post by:
My local Crinkles group(U3A), of which I am one, want me to develop a noddy database and web site for their members. Some are computer literate, others not so. I thought an Access 2000 .mdb on a server from the local council with a web page in Active Server Pages(ASP) and using ADO would do the trick, then one of them could update it at home on the web to keep track of members and somebody else could do the same for current programmes etc....
6
6998
by: fyitang | last post by:
hi guys, here is the sample: string strFileFullName = ""; try { FileInfo currentFile = GetOneFile("some directory"); strFileFullName = currentFile.FullName; // do someting...
0
8421
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8325
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8844
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8742
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
6177
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5643
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2743
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1971
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1734
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.