Reply
How to find Server.Mappath in .Net?
Old 02-21-2006, 10:48 AM How to find Server.Mappath in .Net?
Novice Talker

Posts: 12
i am using ASP.Net as front end. back end as a MS ACCESS
i want to oledbconnection for data base connection.

i want find Server.Mappath of my database.

how to find? and what are the code.???
Rams is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
     
Old 02-25-2006, 03:30 PM Re: How to find Server.Mappath in .Net???????
jazee's Avatar
Super Talker

Posts: 122
Location: Westminster, CO / Denver
Are you coding your asp out by hand or are you using visual studio.

Also what back lang. are you using VB.net C++.net or C#.net. If your using asp .net
jazee is offline
Reply With Quote
View Public Profile Visit jazee's homepage!
 
Old 02-26-2006, 04:28 AM Re: How to find Server.Mappath in .Net???????
chrishirst's Avatar
Super Moderator

Posts: 11,866
Location: Blackpool. UK
it's the same in asp & .net just wrap the connection in a sub and call that.

http://www.w3schools.com/aspnet/aspnet_dbconnection.asp
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Indifference will be the downfall of mankind, but who cares?
Code Samples | People Counting System
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 02-28-2006, 12:46 PM Re: How to find Server.Mappath in .Net???????
sdcdesign.co.uk's Avatar
Extreme Talker

Posts: 199
Location: High Wycombe, Buckinghamshire, London
In C# :

Code:
string dbPath = Server.MapPath("/db/db1.mdb");
__________________
[ Insert witty, yet highly intelligent signature here ]
sdcdesign.co.uk is offline
Reply With Quote
View Public Profile Visit sdcdesign.co.uk's homepage!
 
Old 03-05-2006, 02:27 AM Re: How to find Server.Mappath in .Net?
Ram
Novice Talker

Posts: 14
i am using vbscript in asp.net
how can i find server.mappath("db/db1.mdb")
(i.e)
i am using visual studio editor
i create a one module for database connection.
while i write this code it will show the error.
__________________
Editor
www.allthewebhosting.com | www.justcarloan.com
Ram is offline
Reply With Quote
View Public Profile
 
Old 03-05-2006, 02:37 AM Re: How to find Server.Mappath in .Net?
chrishirst's Avatar
Super Moderator

Posts: 11,866
Location: Blackpool. UK
visit the link in post no 3
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Indifference will be the downfall of mankind, but who cares?
Code Samples | People Counting System
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 03-08-2006, 02:49 AM Re: How to find Server.Mappath in .Net?
Ram
Novice Talker

Posts: 14
thanks to every one!

finally i got a solution for this topic.

using "Request.MapPath("db1.mdb")"

__________________
Editor
www.allthewebhosting.com | www.justcarloan.com
Ram is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to How to find Server.Mappath in .Net?
 

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

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




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.13354 seconds with 13 queries