Re: Drive Letter And A FQFN (Fully Qualified Filename, OS:Windows), PDO



*** Jim Carlock escribió/wrote (Thu, 17 May 2007 14:23:42 -0400):
This works as long as a drive letter is not FQFN. For instance,
if, $FQFN = "Z:/mysql/dbn/data.db", PHP replies:

SQLSTATE[HY000] [14]

along with a couple lines of text identifying line numbers and such.

The function above works well if FQFN = "./data.db". But, the
database file must get set up on a different drive.


"Alvaro G. Vicario" <webmaster@xxxxxxxxxxxxxxxxxxxx> wrote:
: Drive letters for network drives are not universal. Each user in the
: same computer will have different letters. If you run your script through
: a web server, the script will not have access to *your* letters but those
: of the user the services runs as (normally LocalSystem).
:
: I suggest you try with UNC paths, such as //server/share

The only problem there, is that no shares really exist... except the
hidden shares. It's not a networked drive. It's a mapped drive letter
created to shorten a path. Subst.exe was used to create the the drive
letter.

No network paths exist on the system. Group policies were set up to
prohibit network paths I think.

The code works on the physical drives, even the removable drives,
for instance...

function CreateMyDataBaseFile($FQFN, $UID, $PW) {
$db = "sqlite:" . $FQFN;
$sql = "CREATE TABLE Customers(name1 TEXT, name2 TEXT);";

$dbh = new PDO($db, $UID, $PW);
$dbh->exec($sql);
$dbh = null;
}

CreateMyDataBaseFile("A:/test.db", "admin", "password");

where A: represents a 3.5" disk drive. It just fails on a SUBST
drive (mapped to a folder on another drive).

Thanks for the suggestion.

I've tried tricking it with things like, "./Z:/test.db" and "//Z:/test.db"
but so far no luck.

--
Jim Carlock
Post replies to the group.


.



Relevant Pages

  • Re: Drive letters and removable storage - fixed :)
    ... Users are not permitted to use disc manager to change drive letters. ... machines have local C: and D: drives, and our video suites have E: aswell. ... Network mappings at the front end of the alphabet are F: and H:. ... To do this I have used the subst command, and called the following 2 batch ...
    (microsoft.public.windowsxp.hardware)
  • Re: Nest Drive Letter
    ... This built-in utility ) handles HDDs, CD/DVDs, network drives, USB "jump" drives, card readers - even many digital ... There are several ways to get to Disk Management. ... WinXP assigns "drive" letters from scratch each time it reboots. ... I need to know how to get my USB-connected Jumpdrive to skip the drive letters my network client maps to network drives. ...
    (microsoft.public.windows.file_system)
  • Re: Adding new HDD to system using dual boot
    ... "Drive" letters are not permanently assigned. ... partitions, then driver-managed devices, such as CD/DVD drives, USB drives, ... Once Windows loads, it may re-assign the letters, using its own built-in ... those partitions is assigned a letter, so we sometimes call it a partition ...
    (microsoft.public.windowsxp.basics)
  • Re: Adding new HDD to system using dual boot
    ... The extended partition itself does NOT get a "drive" letter, ... Microsoft Windows MVP ... > "Drive" letters are not permanently assigned. ... > as CD/DVD drives, USB drives, cameras, etc. ...
    (microsoft.public.windowsxp.basics)
  • Re: How to lock drive letters to particular devices in Vista
    ... are you assigning letters to the devices? ... Are you right-clicking on the Volume in the Volume List or on the left column in the Graphical View (Disk 0, ... I unplugged the USB cable from its port on the back of the computer; Disk 4 disappeared from Disk Management. ... But I've never used USB external hard drives - except for the flash drives. ...
    (microsoft.public.windows.vista.general)