Websites generally place databases and web servers separately as two servers. In this case, if the TXT files on the web server are used as the data source, you need to import the data to the database server.
If the Web server is installed with SQL, you can use the BCP method to import data, which is highly efficient.
Here we will discuss how to import data without installing SQL on the web.
You can create an Access database locally and use it as a springboard for data import.
DetailsCodeAs follows:
Select * Into [ ODBC; driver = SQL Server; server = XXX. XXX; uid = xx; Pwd = xxx; database = xxx ] . Aimtable From [ Text; HDR = no; database = D :\ ] . [ Fountain # txt ]
For convenience, I used select into. aimtable is the name of the table to be created, and D: \ is the folder where the file is stored. Here I put it under the root directory of drive D, and fountain is the file name, TXT is a file type.
With such a statement, you can import local file data to a remote database.