Assigning firebird file name to TIBConnection lazarus / 16-Databases ---------------------------------------------------------------------- egsuh · 2026-01-19 07:29 Hello, I'm using MS OneDrive. So, the full path on my local PC is like d:\OneDrive\MyLazarus\DataBase\DB.FDB. If I assign this full path to the DatabaseName property of TIBConnection, then there are no problem in setting this DB connected. But if I try to define relative path, like .\DataBase\DB.FDB, then it shows DoInternalConnect error, with "error while trying to open file". The same approach works on another PC, which shares OneDrive but local location is different - not on d:, but o c: somewhere, without problem. What could be the cause of the error? ---------------------------------------------------------------------- Zvoni · 2026-01-19 07:47 Are you running from IDE, or from the Exe? Take a look at ParamStr(0) or Application.Location ---------------------------------------------------------------------- egsuh · 2026-01-19 08:27 QuoteAre you running from IDE, or from the Exe? I'm connecting within IDE. But it does not work at runtime either. QuoteTake a look at ParamStr(0) or Application.Location How can I check them? ---------------------------------------------------------------------- Zvoni · 2026-01-19 08:41 Quote from: egsuh on January 19, 2026, 09:27:26 amQuoteTake a look at ParamStr(0) or Application.Location How can I check them? Place a TLabel on your Form, and assign ParamStr(0) or Application.Location in Form.OnShow. Another Option might be to Write to a txt-File inside the lpr-file before the Form loads It's "old school"-Debugging. Just thought of something else, since you mention OneDrive: I remember falling afoul of a OneDrive-location, since OneDrive actually uses Forward-Slashes as DirectorySeparator if you don't use absolute local path. That said: Try ./DataBase/DB.FDB as relative path On a sidenote: OneDrive has given me blinding headaches in the past. In a nutshell: During development i read the Registry under Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\OneDrive\Accounts\{Profi le} with "{Profile}" being whatever Account you use (Business, Personal, whatever), and INSIDE there it's the Key "UserFolder" which gives you the local path. Construct full LOCAL path from there (With Backslash as Separator) ---------------------------------------------------------------------- egsuh · 2026-01-19 08:56 Quote./DataBase/DB.FDB No, this does not work. What I really access is a local file copied to my local HDD. ---------------------------------------------------------------------- Zvoni · 2026-01-19 09:00 Quote from: egsuh on January 19, 2026, 09:56:40 amQuote./DataBase/DB.FDB No, this does not work. What I really access is a local file copied to my local HDD. Last option: What's the Value for UserFolder in the Registry (see Edit above)? The only thing i can think of, is that your "real" OneDrive-Folder is pointing to somewhere else ---------------------------------------------------------------------- Thaddy · 2026-01-19 09:02 That's how OneDrive works: with time-based sync, not with real-time sync. You have to use another solution for that. OneDrive paths are essentially local paths with a back-up service in the background. That is completely different from a fully networked drive. But the local "copy" is the main file, so you can safely work on it and it will persist *as long as nobody else has write access to your OneDrive * A commercial solution is here, but that maps actually an intermediate cloud drive: https://www.konnekt.io/?msclkid=8eb5f4bc52b9133c19279dd1a153c0c0&utm_s ource=bing&utm_medium=cpc&utm_campaign=Product+|+KONNEKT+|+Klicks&utm_ term=onedrive+network+drive+mapping&utm_content=KONNEKT+|+KO-U1 There are some options on the web but none of the free options are reliable. ---------------------------------------------------------------------- egsuh · 2026-01-19 09:18 With full path, I can use the db file. The problem is local location of OneDrive is different between two computers. On my notebook, it is located at "c:\users\seg\..." something,  and on my desktop it is located as "d:\OneDrive". My lazarus project files have no problem as they all are defined with relative path. And I think I would be able to define DB file in relative path as well, which simply does not work. Anyway I have to find another way --- because as the files are used by FCGI webservers on both machines (which means both DB files are open once I call the FCGI server), they are not synchronized with cloud server (web OneDrive).