Hi Wallace,
On 05/04/11 11:30, Marshland Engineering wrote:
> Hi Chaps
>
> Sorry I made a slight mistake. The remote PC's all connect correctly.
> It is the server that has the hiccup.
> I'm using absolute database and I get
>
> dbTT:Database file p:\TTabs\TT.abs does not exist.
>
> Once I view P: with windows explorer, the package works fine.
>
> P: is set to reconnected at logon.
The Delphi app is on a remote PC and the database file is on the server
mapped as P: drive?
Is the client with the Delphi app saying that the database file does not
exist or the Delphi app on the server?
Sorry mate, it's not clear.
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:
var
nrShare: TNetResourceA;
dwResult: DWORD;
begin
with nrShare do
begin
dwType := RESOURCETYPE_DISK;
dwScope := RESOURCE_GLOBALNET;
dwDisplaytype := RESOURCEDISPLAYTYPE_GENERIC;
dwUsage := RESOURCEUSAGE_CONNECTABLE;
lpLocalName := PAnsiChar ('P:');
lpRemoteName := PAnsiChar ('\\SERVER\SHARE');
lpProvider := '';
lpComment := '';
end;
dwResult := WNetAddConnection2A (nrShare, PAnsiChar ('user'),
PAnsiChar ('password'), 0);
if dwResult = NO_ERROR then
begin
// all is well
end else begin
// handle the error
end;
end;
cheers,
Jan
_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: [email protected]
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to [email protected] with Subject:
unsubscribe