Despite the very long association between DataAccess and Btrieve/Pervasive neither the Help documentation nor the available features in the driver pay much heed to PSQL. Perhaps Pervasive has become as arcane as VDF itself.
I am in the process of hardening up the security of our Web Server and that has included changing my PSQL V11 server to secured database mode so no network shares are required between the Web Server and the domain. The documentation and dBBuilder support the URI method but that results in User name and Password being in plain text files on the Web Server - hardly very secure, a fact which is recognised in the Help documentation and dealt with in some drivers with the Login command and now with Dataflex Connection ID's.
So, I thought I would start off by using the Login command. No mention anywhere in the documentation of the correct syntax for PSQL. In fact, the documentation isn't very comprehensive in this area for any of the drivers but totally ignores PSQL.
For the other PSQL user out there, let me share my discovery after a fair amount of trial and error.
PSQL Login syntax
Login "MYSERVER/MYDATABASE" "MyUser" "MyPwd" "DFBTRDRV"
INT files
URI btrv://MYSERVER/MYDATABASE?table=MYTABLE
(Nothing like the examples in Help which rely on SERVER_NAME in the .INT files and have a completely different syntax on the Login line). Come on Stephen lets get the documentation fixed up.
At least dBBuilder can help here. If you use the "Migrate to URI" option but leave out the User ID and Password you will get the correct URI written into your INT files.
So, that works OK and is reasonably secure although a hacker who gets into the Web server would know where your data is stored. Another nicety is that this also works for the legacy 3.1d applications which we still have in use.
Well done Coders, rap over the knuckles for the Documenters.
I would strongly recommend that the Login method should become the main supported method in dbBuilder and all the documentation with the use of URI's containing login details made obsolete (but still supported).
Now to ConnectionID. First I tried the simple DfConnectionID keyword in the DFBTRDRV.INT file only to get back an error "Invalid Configuration Keyword DFCONNECTIONID..."
OK so now on to the programmatic method. Again an error. This time I traced it to a missing function from the Driver file - CLI_CREATECONNECTIONID. Clearly no support in DFBTRDRV driver.
So to my question right at the outset. Why not? Security is just as important to PSQL users as it is to users of MSSQL et al.
Ian