I'm having trouble connecting to dbf files that are located on a different box than the one that runs the odbtp. Here is my setup:
1. computer A is a windows box and has the odbc drivers and the odbtp installed.
2. computer B is a windows box and houses the dbf files that I need to access
3. computer C is a linux box that is using the odbtp client to talk to the odbtp server on A
4. I have a share on B that is mapped to a drive letter on A. The path on A is n:\dbffiles
In the connect string in my php script I have n:\dbffiles in for the SOURCEDB, but the script always comes back and tells me it cannot find the dbf files
If I copy the dbf down to A, lets say c:\dbffiles, then change the SOURCEDB to point to c:\dbffiles, it works just fine.
Can the dbf files live elsewhere and if so, what would I be doing wrong?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You can connect to a remote file-based db unless the ODBTP service is running under an account that has the proper access permissions. Also, you have to use a UNC path instead of a network mapped drive path, which is only valid when logged in. Note: I am not sure if the FoxPro ODBC driver suppoets UNC paths.
This does not work because the mapped dirve (n;) is only accessiblt by the user account under which the mapping was established. The mapped drive wil also be removed when the user logs off. The ODBTP is ruuning under the local system account,, which can only access local drives. If the ODBTP service is configure to run under an account that has access rights to the shared resource, then it can access it via an UNC path. However, I am not sure if the FoxPro driver supports UNC paths. If this is the case, then the ODBTP service has to be installed on the server where FoxPro files are located.
bob
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It work !!
I use ODBTP service configured to run under an account that has access rights to the shared resource and in the ODBC a DNS system to \\myserver\dbfdir.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm having trouble connecting to dbf files that are located on a different box than the one that runs the odbtp. Here is my setup:
1. computer A is a windows box and has the odbc drivers and the odbtp installed.
2. computer B is a windows box and houses the dbf files that I need to access
3. computer C is a linux box that is using the odbtp client to talk to the odbtp server on A
4. I have a share on B that is mapped to a drive letter on A. The path on A is n:\dbffiles
In the connect string in my php script I have n:\dbffiles in for the SOURCEDB, but the script always comes back and tells me it cannot find the dbf files
If I copy the dbf down to A, lets say c:\dbffiles, then change the SOURCEDB to point to c:\dbffiles, it works just fine.
Can the dbf files live elsewhere and if so, what would I be doing wrong?
You can connect to a remote file-based db unless the ODBTP service is running under an account that has the proper access permissions. Also, you have to use a UNC path instead of a network mapped drive path, which is only valid when logged in. Note: I am not sure if the FoxPro ODBC driver suppoets UNC paths.
Example DRIVER connect string:
DRIVER={Microsoft Visual FoxPro Driver};SOURCETYPE=DBF;SOURCEDB=c:\mydbdir;EXCLUSIVE=NO;deleted=yes;
-- bob
I have a similar situation.
Assuming the same of the computer configuration of this post if I use the connection string (SourceDB local):
DRIVER = {Microsoft Visual FoxPro Driver}; sourceType = DBF; SourceDB = c: \ dbffiles; EXCLUSIVE = NO; deleted = yes;
everything works correctly.Instead if i use the string (SourceDB share):
DRIVER = {Microsoft Visual FoxPro Driver}; sourceType = DBF; SourceDB = n: \ dbffiles; EXCLUSIVE = NO; deleted = yes;
odbtp_connect function works correctly, but the function odbtp_query (SELECT * FROM SUPPLIERS) returns this error:
Warning: File 'suppliers.dbf' does not exist. in file.php
Thanks
Eugenio
This does not work because the mapped dirve (n;) is only accessiblt by the user account under which the mapping was established. The mapped drive wil also be removed when the user logs off. The ODBTP is ruuning under the local system account,, which can only access local drives. If the ODBTP service is configure to run under an account that has access rights to the shared resource, then it can access it via an UNC path. However, I am not sure if the FoxPro driver supports UNC paths. If this is the case, then the ODBTP service has to be installed on the server where FoxPro files are located.
Thank you
It work !!
I use ODBTP service configured to run under an account that has access rights to the shared resource and in the ODBC a DNS system to \\myserver\dbfdir.