473,796 Members | 2,573 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

access folder at another computer with automatic Windows authentication

Hi.
I am writing an app, whitch has to access a database, located on another
computer (Intranet).
Let's say, the computer where the app is to be installed, is "Computer1" .
The computer with the database is "Computer2" , and the full path to needed
database is "\\Computer2\Ap pFolder\mydata. mdb".
The user can access that folder when it authenticates as "user1" with
password "password1" .
Question: how to automate the connection, making it possible to log to the
computer2 automaticaly at run time programically?
By default, the app, without authenticating, cannot open that database, so
it shows FileOpen dialog for browsing to the desired computer, then to the
shared folder, at this step the input form appears, asking to enter username
and password; the app's user enters them, and succesfully enters the folder
and selects the database, and the connenction is performed.
So, could this be done faster, eg. writing some parameters to the database's
connection string, o using IO.System objects or so on?
The code below describes the connection to db:

' Start of code
Dim sConnSample = "Provider=Micro soft.Jet.OLEDB. 4.0;" & _
"Persist Security Info=False; Jet OLEDB:Database Password=andriu sbl5; " &
"Data Source=" & \\Computer2\App Folder\mydata.m db
ADODBconn = New ADODB.Connectio n
ADODBconn.Mode = ADODB.ConnectMo deEnum.adModeRe adWrite
ADODBconn.Open( sConnSample)
' End of code

So, should I add some parameters to cConnSample, like "UserId" ?
Thanks in advance.
Jan 18 '08 #1
2 6086
By the way, the installed OS on both computers are Windows XP.
I use Visual Basic 2005.
"Andrius B." <an*******@mail .ltwrote in message
news:uw******** ******@TK2MSFTN GP02.phx.gbl...
Hi.
I am writing an app, whitch has to access a database, located on another
computer (Intranet).
Let's say, the computer where the app is to be installed, is "Computer1" .
The computer with the database is "Computer2" , and the full path to needed
database is "\\Computer2\Ap pFolder\mydata. mdb".
The user can access that folder when it authenticates as "user1" with
password "password1" .
Question: how to automate the connection, making it possible to log to the
computer2 automaticaly at run time programically?
By default, the app, without authenticating, cannot open that database,
so it shows FileOpen dialog for browsing to the desired computer, then to
the shared folder, at this step the input form appears, asking to enter
username and password; the app's user enters them, and succesfully enters
the folder and selects the database, and the connenction is performed.
So, could this be done faster, eg. writing some parameters to the
database's connection string, o using IO.System objects or so on?
The code below describes the connection to db:

' Start of code
Dim sConnSample = "Provider=Micro soft.Jet.OLEDB. 4.0;" & _
"Persist Security Info=False; Jet OLEDB:Database Password=andriu sbl5; " &
"Data Source=" & \\Computer2\App Folder\mydata.m db
ADODBconn = New ADODB.Connectio n
ADODBconn.Mode = ADODB.ConnectMo deEnum.adModeRe adWrite
ADODBconn.Open( sConnSample)
' End of code

So, should I add some parameters to cConnSample, like "UserId" ?
Thanks in advance.

Jan 18 '08 #2
Hi Andrius,
You will need to MAP the network drive using network credentials and then
you can access the database. One way of setting up a Map drive would be to
use Process.Start along with NET USE Dos command.

Shuja

"Andrius B." <an*******@mail .ltwrote in message
news:#L******** ******@TK2MSFTN GP03.phx.gbl...
By the way, the installed OS on both computers are Windows XP.
I use Visual Basic 2005.
"Andrius B." <an*******@mail .ltwrote in message
news:uw******** ******@TK2MSFTN GP02.phx.gbl...
>Hi.
I am writing an app, whitch has to access a database, located on another
computer (Intranet).
Let's say, the computer where the app is to be installed, is "Computer1" .
The computer with the database is "Computer2" , and the full path to
needed database is "\\Computer2\Ap pFolder\mydata. mdb".
The user can access that folder when it authenticates as "user1" with
password "password1" .
Question: how to automate the connection, making it possible to log to
the computer2 automaticaly at run time programically?
By default, the app, without authenticating, cannot open that database,
so it shows FileOpen dialog for browsing to the desired computer, then to
the shared folder, at this step the input form appears, asking to enter
username and password; the app's user enters them, and succesfully enters
the folder and selects the database, and the connenction is performed.
So, could this be done faster, eg. writing some parameters to the
database's connection string, o using IO.System objects or so on?
The code below describes the connection to db:

' Start of code
Dim sConnSample = "Provider=Micro soft.Jet.OLEDB. 4.0;" & _
"Persist Security Info=False; Jet OLEDB:Database Password=andriu sbl5; " &
"Data Source=" & \\Computer2\App Folder\mydata.m db
ADODBconn = New ADODB.Connectio n
ADODBconn.Mo de = ADODB.ConnectMo deEnum.adModeRe adWrite
ADODBconn.Open (sConnSample)
' End of code

So, should I add some parameters to cConnSample, like "UserId" ?
Thanks in advance.

Jan 18 '08 #3

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

Similar topics

7
2045
by: wrytat | last post by:
Hi! I'm very new to ASP.NET and really need some good advice from experts here. I'm creating a web application for my company now. This application has 2 parts. 1 part for the customers to access. The 2nd part is for our staff to access only. My director hopes to make the 2nd part to be something like an intranet, such that only our company's computers (maybe only 1 or 2 in the company) can login to this part of the application. 1. My...
6
4759
by: Peter Frost | last post by:
Please help I don't know if this is possible but what I would really like to do is to use On Error Goto to capture the code that is being executed when an error occurs. Any help would be much appreciated. Thanks in advance
12
5102
by: Chad Crowder | last post by:
Hi all, I hope someone can give me a hand, because I'm out of ideas. I keep getting this message: Access to the path "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\projects_cig\e4e3b3da\3c20ac69" is denied. The error goes on to say that the ASP.NET is not authorized...
1
2819
by: Microsoft News | last post by:
I have a web server sitting on computer 1, (QA1). Out on the network on my main server I have a folder with a zip file in it. All I want is for the web services that are on the web server to pick up the Zip file and send it when the web services are called. However I am getting the following error: -- Message: System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.ApplicationException:...
1
4898
by: Jody Gelowitz | last post by:
We are having an issue in that when trying to read a file that is on Server2 from Server1 (through our ASP.NET project), we receive the error: Access to the path "\\Server2\MyShare\MyFile.tif" is denied. Here is the server setup that we have: Dev - Development Computer on WinXP Pro SP2 (IIS5), VS2003 developing under .NET Framework 1.1 Server1 - Web Server on Win2003 Server (IIS6) Server2 - File Server on Win2003 Server
4
3614
by: TrinityPete | last post by:
Hi all, We have a web application that uses web services for data access and retrieval. The web app and web services reside under IIS on the same server(WIN2003). The virtual directories have been set for windows authentication and both the ASP web application and the web services are using windows authentication with impersonation of the logged on user. We also set the web service credentials to CredentialCache.DefaultCredentials. ...
52
9990
by: Neil | last post by:
We are running an Access 2000 MDB with a SQL 7 back end. Our network guy is upgrading to Windows Server 2003 and wants to upgrade Office and SQL Server at the same time. We're moving to SQL Server 2005, and, since he already has licenses for Office Pro 2002, he wants to upgrade to that. I've been saying that we need to upgrade to Access 2003, not 2002, even if Office is kept at 2002. We are also looking to do a fair amount of...
17
3154
by: rdemyan via AccessMonster.com | last post by:
With A2003, I'm having trouble accessing files in a folder on another computer where back-end files, update files, etc are located. Here's the scenario: 1) Computer #1 - A2003 2) Computer #2 - Access 2000; folder with back-ends for both computers and 'Update' folder. I have a launcher program that launces my application (MyApp). The launcher program also checks for updates to MyApp located in 'Update' folder (on
3
2490
by: Charlotte | last post by:
Hello, info: I'me a rookie with IIS I have on a WinXP Pro the IIS installed, so I can test some pages before uploading to the hostserver online on the hostserver is a possibility (with the program PLESK) to make a directory secure (to access a page in that directory, you have to give a username and a
0
9684
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
9530
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
10236
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
10182
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10017
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...
0
9055
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7552
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
6793
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
4120
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

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.