<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Wallace,<br>
<br>
<br>
On 05/04/11 11:30, Marshland Engineering wrote:
<blockquote cite="mid:8ACAD614E77647E0894B321BB2BDAB60@Aquilo"
type="cite">
<meta http-equiv="Context-Type" content="text/html;
charset=iso-8859-1">
<div> Hi Chaps </div>
<div> </div>
<div> Sorry I made a slight mistake. The remote PC's all connect
correctly. It is the server that has the hiccup. </div>
<div> I'm using absolute database and I get </div>
<div> </div>
<div> dbTT:Database file p:\TTabs\TT.abs does not exist. </div>
<div> </div>
<div> Once I view P: with windows explorer, the package works
fine. </div>
<div> </div>
<div> P: is set to reconnected at logon. </div>
</blockquote>
<br>
The Delphi app is on a remote PC and the database file is on the
server mapped as P: drive?<br>
Is the client with the Delphi app saying that the database file does
not exist or the Delphi app on the server?<br>
Sorry mate, it's not clear.<br>
<br>
You could refresh/reconnect/connect the mapping in your Delphi code.
Extracted (not tested) from a piece of software I wrote a long time
ago:<br>
<br>
var<br>
nrShare: TNetResourceA;<br>
dwResult: DWORD;<br>
begin<br>
with nrShare do<br>
begin<br>
dwType := RESOURCETYPE_DISK;<br>
dwScope := RESOURCE_GLOBALNET;<br>
dwDisplaytype := RESOURCEDISPLAYTYPE_GENERIC;<br>
dwUsage := RESOURCEUSAGE_CONNECTABLE;<br>
lpLocalName := PAnsiChar ('P:');<br>
lpRemoteName := PAnsiChar ('\\SERVER\SHARE');<br>
lpProvider := '';<br>
lpComment := '';<br>
end;<br>
dwResult := WNetAddConnection2A (nrShare, PAnsiChar ('user'),
PAnsiChar ('password'), 0);<br>
if dwResult = NO_ERROR then<br>
begin<br>
// all is well<br>
end else begin<br>
// handle the error<br>
end;<br>
end;<br>
<br>
cheers,<br>
Jan<br>
<br>
</body>
</html>