473,785 Members | 3,417 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Storng path to document in SQL table.

Hi All,

I'm asking for opinion for the best way forward with storing the path of a
network shared document in a SQL Server table.

Essentially, I want to store in a part record the path to it's actual word
document on my client's network.
Currently, I am storing the mapped drive path when the user selects it using
the OpenFileDialog object in VB.net.

This is all very well if all the users have the same mapped drives - and
they may not.

So I think I should store the UNC path of the file - this is what I 'd like
peoples opinions on.
Should a user on one PC with a network share mapped as R: and another user
with the same share mapped as T: be able to access the file
\\ServerName\Di rectory\Filenam e.doc ?????
Are there any issues to consider? If the user doesn't have proveledges to
read the share, that doesn't matter - they just won't get access to it.

How can I get the UNC path of a file in vb.net.
I've tried the WNetGetConnecti on approach but that returns a empty string?

Thanks

Alex
Nov 20 '05 #1
1 1422
Hi Alex
There's a C# example that uses
System.Manageme nt.ManagementPa th

http://www.dotnet247.com/247referenc.../16/82735.aspx

Kind Regards
Jorge
-----Original Message-----
Hi All,

I'm asking for opinion for the best way forward with storing the path of anetwork shared document in a SQL Server table.

Essentially, I want to store in a part record the path to it's actual worddocument on my client's network.
Currently, I am storing the mapped drive path when the user selects it usingthe OpenFileDialog object in VB.net.

This is all very well if all the users have the same mapped drives - andthey may not.

So I think I should store the UNC path of the file - this is what I 'd likepeoples opinions on.
Should a user on one PC with a network share mapped as R: and another userwith the same share mapped as T: be able to access the file\\ServerName\D irectory\Filena me.doc ?????
Are there any issues to consider? If the user doesn't have proveledges toread the share, that doesn't matter - they just won't get access to it.
How can I get the UNC path of a file in vb.net.
I've tried the WNetGetConnecti on approach but that returns a empty string?
Thanks

Alex
.

Nov 20 '05 #2

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

Similar topics

1
2354
by: J. Bruce | last post by:
Does anyone know how to set the path in the script below so that the cookie is accessible to all directories? TIA <SCRIPT LANGUAGE="JavaScript"> <!-- Begin var expDays = 30; var exp = new Date();
13
3313
by: wylbur37 | last post by:
(This is a re-post of something that apparently did not post correctly the first time, so if there's more than one copy, please ignore the duplicate). I normally use Mozilla 1.4 on Windows XP Pro. As I was developing some test webpages, I discovered that the SRC parameter doesn't seem to work when a path is used with the filename. In one example, when I want to run a JavaScript from an external file (i.e., not inline), I would do the...
1
3113
by: William Starr Moake | last post by:
Another problem with absolute paths in the WYSIWYG editor I'm putting together. The function to toggle between WYSIWYG and HTML modes works except for one glitch. If you use a relative path for a link, like <a href="download.htm">Click Here</a>, the editor returns an absolute path the second time you toggle HTML mode: <a href="C:\Windows\Desktop\Editor\download.htm" and even adds file:/// on the third try. This path must be manually...
5
2113
by: Jean Paul Sartre | last post by:
can anyone suggest a function that will spit out the dom path for an object on id? I'm having troubles targettting elements so i thought, if i make a function that spits path (you send it id) then it would help html has: <div name="nav"> <a href="yo">hey</a><p>this <h1 id="io">hey</h1></p></div> i want to do something like
4
1764
by: mscir | last post by:
When I try to use the DOM to add an image to a table cell, it works in IE but not in Netscape. If I look at the innerHTML of the table in Netscape I see %5C in place of "\" in the image file path, nothing I do corrects it. e.g. <td><img src="C:%5CArchive%5Cgraphic%5C2pitvipers.jpg"></td> Does anyone have any suggestions? TIA, Mike
1
2145
by: UncleStoner | last post by:
Using Javascript, you can call document.cookie to get a list of all the cookies that will be sent to the path of the current document. Is their a way to get all the cookies associated with the current domain without regard to the path of the current document? For example, if there is a cookie with path=/foo and a cookie with path=/bar, and I have javascript in the page /foo/cool.html: Can I query the cookie with the path of /bar as well...
19
10239
by: Steve Franks | last post by:
I am using VS.NET 2005 beta 2. When I run my project locally using the default ASP.NET Development Web Server it runs using a root address like this: http://localhost:11243/testsite/ However when I deploy to a remote test server running real IIS, the real root of my application becomes: http://localhost/ What I want to do is have it so that on my local machine the asp.net dev
6
2401
by: markoniinimaki | last post by:
Hi, suppose I get a document name a.xml and a path //foo/bar (which nodes eventually to read from it) from another doc. Problem: how to combine them so that the whole expression gets evaluated. I've tried: <xsl:variable name="imported" select="concat(document('$doc'),$path)" />
6
3421
by: BlackMustard | last post by:
hi, i'm using the following code to modify a standard word document and save it to disk with a new file name. Sub CreateQuote() '*************************************************************************** 'Quotation part '*************************************************************************** Dim appWord As New Word.Application Dim intRMA, i As Integer
0
10315
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
10147
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...
0
9947
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7494
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
6737
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();...
0
5379
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3645
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2877
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.