Path names R&R bugs

Meeting place for R&R customers and clients to share tips and ideas. Post your questions, messages or problems here.
Post Reply
Paul_De_Bie_(Guest)
Posts: 3
Joined: Tue Oct 10, 2017 12:44 pm

Path names R&R bugs

Post by Paul_De_Bie_(Guest) » Tue Nov 19, 2002 6:06 am

I^m using R&R v9 from within our Visual Objects applications through the R&R DLL. __There are problems with pathnames that contains spaces. If the data tables reside in a folder that contains spaces; e.g. ____c:program filesdata____Then R&R DLL function SetDataDir() or SetImageDir() will fail. OK, the solution is easy: when passing the path to the function, you must *quote* it__^c:program filesdata^____But, another DLL function SetMasterTableName() will fail if you pass it a quoted pathname:__^c:program filesdata est.dbf^____will result in an errorbox saying__Cannot open table test.dbf^__So the last quote is somehow added to the tablename. Amazingly enough, this function only works with *non-quoted* path+filenames and it won^t mind the eventual spaces in the path!____Now, to make it more complicated!!____As a general rule all of my programs make sure to pass only quoted paths to R&R SetDataDir() or SetImageDir() functions, even if there are no spaces in the pathname__e.g. ^c:MyAppData^____But, if you use SetMasterTableName() as well __e.g. D:Documents and SettingsPaulDBLocal SettingsTempTempPrt.DBF__(remember: unquoted! or it won^t work)____Then everything fails again!!!__IF YOU QUOTE SetDataDir(), THEN YOU CAN ONLY USE SetMasterTableName() FOR TABLES THAT ARE IN THE SAME FOLDER AS THE DATADIR.____The only solution for this:__a) Install your datafiles in a folder without spaces in the name__b) Use SetDataDir() but without quoting the name__c) Use SetMasterTableName without quoting the name (but, the name may contain spaces)______As you will surely understand, this behaviour of R&R DLL functions is driving us mad. I hope your developpers will look into these problems and review all DLL functions that use path or filenames. And issue a bugfix.____NB: I have not been able to test tall this in v10 yet; but in the list of fixes nothing is mentioned about these problems, so I guess it hasn^t changed. ____Paul____________

kfleming
Posts: 5795
Joined: Tue Oct 10, 2017 12:44 pm

=> RE: Path names R&R bugs

Post by kfleming » Tue Nov 19, 2002 8:14 am

I do not think that this has changed in V10 but this is the first time that this problem has been reported to us. We will investigate what you are seeing and will correct the problem in the next V10 update.____Kathleen__R&R Support

Paul_De_Bie_(Guest)
Posts: 3
Joined: Tue Oct 10, 2017 12:44 pm

==> RE: Path names R&R bugs

Post by Paul_De_Bie_(Guest) » Wed Nov 20, 2002 4:56 am

OK Thanks.__Additionally, I must add that in our applications, the pathname+filename is not hardcoded in the R&R DLL function that we call, because it can vary from application to application. It is a character string held in a variable.__So something like:___pszarg1 := StringAlloc(cPathAndTable)___SetMasterTableName(hReport, PSZarg1)___MemFree(PSZarg1)____where cPathAndTable can be for instance:__c:Program FilesmyApp____If I explicitly requote the string, then SetMasterTableName gives problems. However, as said, for SetDataDir I *must* requote it...__I can^t explain it. ____Paul______

Post Reply