Connect to remote dbf file with lazarus on linux - linux

I need migrate a windows application made with delphi xe3 to a linux platform using Lazarus.
This application connect to dbf files hosted on a windows server 2008.
I'm trying to connect tdbf component to the server but i can't.
The documentation does not tell anything about remote connections.
Can you recommend me some other options to do that?

Dbf1.filePath := '192.160.90.100:/F/shared-folder'; This looks like an NFS path which I don't believe TDBF supports. You will need to mount the relevant folder containing your DBF files on your local file system for TDBF to be able to access it properly.
However, I would strongly recommend you migrate your application away from DBF files and to a proper SQL-based client/server DBMS like Firebird, mySQL or PostgreSQL. There really is no valid reason for using 25+ year old desktop databases nowadays.

Related

Python/Pycharm on a nas server

I recently upgraded my mac-mini with external hard drives to a proper NAS server (DS920+).
With the mac-mini I installed Pycharm and was able to code/develop a few projects on it. Now with the NAS server, I can't find a tutorial on how to install pycharm. It seems that everything has to be done in command-line. Isn't there a way to have a proper IDE? or do I need to create a virtual machine with windows for instance and there I would install pycharm (?) My goal is not to develop code on the nas but rather on my local PC (mostly scripts for data fetching/automation) and have a nice user interface on the nas (and not the command line window)
Furthermore I have developped a web server based on dash/plotly. Ideally I would like to have the webserver deployed on the nas. So I have a collection of .py files and a main.py which lauches the web server. I would need to use "docker" in order to deploy my code onto the nas right?

ftp *.[cC][sS][vV] not working as intended on Windows

One of my client's ftp server recently moved from Linux to Windows.
Searching using *.[cC][sS][vV] looks for *.csv and *.CSV files as intended on Linux.
But this doesn't work on Windows. Is there a way to expand this correctly on Windows or perform a case-insensitive search on Windows ftp server?
The FTP specification does not allow any filemasks.
While some FTP servers do support this, you cannot rely on this functionality, if your script has to be platform-independent.
The Windows IIS FTP server does not support file masks. Even if it did, it would not support the set syntax ([]), as that's not supported in Windows file masks in general.
See also Get File Listing ending with A or B using Jscape FTP.
You have to retrieve all files (without any mask) and filter them locally in your code/script.

Reading CSV files located on LINUX server and updating the tables in SQL Server Database

I was wondering how do we ingest CSV files located on a Red Hat LINUX server into SQL Server Database Table.
I know we can write a Stored Procedure/Bulk Insert to read the files that are located on the same Windows Server as SQL Server and update the database but not sure how to do it when the files are present in LINUX.
Any help would be greatly appreciated
Since you know how to proceed once the csv file is on your Windows box, it seems this question amounts to how to get the file from a Linux server to a Windows server. I suggest rcp or rsync. There are Windows versions of both.

Alternative for file access in windows share files

We have an application (built on .NET), which will need to read some mass storage files.
So we deploy the application in the Web server, and put the data in the data server. Then the application in the web server will access the files through windows share files.(Both the Web server and data Server use the Windows Server OS.
Now, we tried to change from windows to linux, then how about the file access?
The Samba suite provides windows file server functionality for unix systems.
Also you might like to look at NFS.
Even OCFS2 might be an alternative.

How to deploy a data file on tomcat web server in linux debian OS

I have a web application developed using JSP and Servlet. This web application is deployed on server having Debian Linux as OS and The Tomcat version is 5.5.31. As this applications required some data files, These data files will be get created automatically when setting are done using a standalone java application. This application is deployed on another machine. This setup is done. As I dont know much about Debian Linux and where my application is goes on it so I have some doubts in deployment of these autimatically generated data files which are as follows
As I made the .war file of my web application and deployed it using Tomcat Manager. so I dont know where exactly my application goes. I dont know the exact path. How do I find it?
Is it possible to create FTP for this web application which is deployed on Debian Linux server? I think that if creating FTP is possible then I will directly connect to FTP using my Stand alone Java program and will easily do the creation of the file and other file and directory manipulation.
If you've deployed a war, the application isn't anywhere on the filesystem as such. Most servers will unpack the war somewhere, but you shouldn’t rely on where that is.
I can think of several options:
getServletContext().getAttribute("javax.servlet.context.tempdir") to get the application's temp directory, then inform you external program of this location and place the file somewhere in there in a know location.
Arrange for a "know location" outside of the application, such as /tmp/somewhere or /var/cache/your-app/somewhere to place such files. (Note: /tmp is usually cleaned on startup of a linux machine)
As for getting the file onto the server from a remote machine: You could get your client to upload the file directly to your webapp (something like Apache HTTPClient will help you there), which means that you could do without the "know location" above. If you want to do this outside of the application though, I'd avoid FTP (due to security). Instead, I'd go with scp (secure copy).
Edit: Reading between the lines a little, you mention "setting" in the data file. If this is a configuration file which is not changed once the app is running, you may find it more convenient to have a "deploy" step on your server which simply takes the settings file and adds it to the war before deploying it. This is easy enough with "ant war" for example. You could then access the file using getClass().getResourceStream(..) or such.

Resources