Jump to content

Creation of .dbfs on a remote server


zaro

Recommended Posts

I've been trying to create .dbf files on a shared drive which I have full read write access to, the code works to create locally but when I change the path name to the shared drive it will no longer create the .dbfs.  I've tried using the path name with IP address and with computer name neither will work.  The storage server is a MS small buisness 2k3 server, possibly using sharepoint, with the application running on my desktop using php and apache 2.2.

# Constants for dbf field types
define ('BOOLEAN_FIELD',   'L');
define ('CHARACTER_FIELD', 'C');
define ('DATE_FIELD',      'D');
define ('NUMBER_FIELD',    'N');

# Constants for dbf file open modes
define ('READ_ONLY',  '0');
define ('WRITE_ONLY', '1');
define ('READ_WRITE', '2');

# Path to dbf file
$db_file = '\\naevasbs2k3\CompanyShared';  
#$db_file = 'C:\temptables'; #this Line works

# dbf database definition
# Each element in the first level of the array represents a row
# Each array stored in the various elements represent the properties for the row
$dbase_definition = array (
   array ('GIS_ID',  CHARACTER_FIELD,  32),       # string
   array ('UOP_ID',  CHARACTER_FIELD, 32),        # string
   array ('Tract_ID',  CHARACTER_FIELD,  32),     # string
   array ('Grid_ID',  CHARACTER_FIELD, 32),       # string
   array ('Status', CHARACTER_FIELD, 64)          # string
   );
$create = @ dbase_create($db_file.'\Complete.dbf', $dbase_definition) or die ("Could not create dbf file <i>Complete.dbf</i>."); #Dies here

 

Thanks,

Zaro

Link to comment
https://forums.phpfreaks.com/topic/76106-creation-of-dbfs-on-a-remote-server/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.