How to fetch the contents of the path from the database

Updated on technology 2024-02-28
14 answers
  1. Anonymous users2024-02-06

    protected void page_load(object sender, eventargs e)

    Get the file path.

    string strfilename = "F: 3c group doc txt");

    Instantiate a file class.

    streamreader strreader = new streamreader(strfilename);

    Read all the contents of the file.

    Close the file (required).

    Addendum: That's true, after testing, you can only use relative paths, not absolute paths, for what you said about how to separate that txt file from the whole path, I think this should be very simple, you can't write the file to the database is to write the absolute path, right? The key lies in the path you write the data, if you don't understand, send me a short message to discuss together, and it's best to add your QQ number.

  2. Anonymous users2024-02-05

    Read with a stream! It is then printed onto the page.

  3. Anonymous users2024-02-04

    1. Double-click to open the link to open the corresponding total connection.

    2. Double-click the database to open the database and activate the corresponding content.

    3. You can see the specific content under the database, such as **, etc.

    4. Click on the table to view the specific data**, different**.

    5. Double-click the data on the left to open the specific.

    6. You can display all the specific content and detailed information in the table.

  4. Anonymous users2024-02-03

    This required hyperlink points to the absolute path of the file on the server, i.e. the compilation path of the file obtained below

    **Get the compilation path of the current project.

    For example, e: MyEclipse Workspace MyProject Build Classes

    /string filepath = "").getpath();

    Get the compilation path where the upload file is located in the current project.

    For example, e: MyEclipse Workspace MyProject Build Classes Upload

    /string filepath ="upload/").getpath();

  5. Anonymous users2024-02-02

    string extend =

    lastindexof("."));

    The extension of the file.

    string folder = "/" + "/" + "/" + "/";

    The directory where the uploaded file is stored.

    folder);

    create a folder, getbase(request); Get the physical path (location in disk) of the item

    string imgpath = folder + extend;The relative path (without the drive letter) that produces a new **

    getbase(request) +imgpath);Upload the file (here it's just copied because the upload thing has already been done before).

    This path is inserted into the database.

    worker = ;

    Insert a record into the database.

    When querying, you can get the path to insert into the database.

  6. Anonymous users2024-02-01

    You're talking about an Internet café, first of all, you need to open the database port of the router where the server is located, such as 1433 for SQL Server and 3306 for MySQL, the database client software is used to connect (with IP address) + port number. You also need an account password, etc.

    For example, use SQL Server's query analyzer), or you can use remote desktop to connect directly to the server and directly manipulate anything on the server), specific settings for the server to allow remote desktop connection, router port configuration.

  7. Anonymous users2024-01-31

    Copy the database path and enter it on the command line.

  8. Anonymous users2024-01-30

    Connect directly, then turn on.

  9. Anonymous users2024-01-29

    JSP is displayed by loading the path, which can be saved in the project or saved to a certain road on disk. **Put it under webroot, generally it is webroot to create an img or pic folder to save pictures. jsp is used so that it can be loaded to **.

  10. Anonymous users2024-01-28

    So why not just save the content of the text?

  11. Anonymous users2024-01-27

    Just put the taken value in.

  12. Anonymous users2024-01-26

    Read out the path to the database, and then construct the address string as the address of image src.

  13. Anonymous users2024-01-25

    You don't specify what the database system is, and you don't specify what format the export file is, according to the analysis of the export file name you provide, it is estimated that it is the generated SQL scripts (SQL script), if you export this script contains the entire database structure definition and data, then you can't directly take out one of the table definitions and data. But SQL scripts can be used directly with a simple texter or a tool for writing **, and you can use the following methods to generate a script that only you need to extract the table definition and data:

    1) Open the file with the user, use the search function of the device (generally CTL+F), find the string of the table name you need, after finding it, keep the structure definition and data items of the table you need, and delete the definition and data of the table that you need up and down. Save as another file. (You can also copy part of the definition and data part of the found table to a new file and save it, how to do it depends on the size of the script and your familiarity with SQL scripts).

    2) Use this new script to execute and import the tables you need.

    Of course, if you need to automate the import and export in the program, and the export content is not controlled by your program, then the above method is not suitable, you can only import all the exported content into a temporary library, and then copy the tables you need in the temporary library to the actual database you use.

  14. Anonymous users2024-01-24

    Extract the SQL statements in it and rebuild a SQL document

Related questions
13 answers2024-02-28

Let's say the textbox is named textbox and the string of numbers to be displayed is strfloat: >>>More

6 answers2024-02-28

The prospect of learning UI is good, and there are many training institutions, so the local people may choose to visit and understand the real teachers and educational strength of the school before making a choice. Share the general development of the UI, I hope it will be useful to you. >>>More

9 answers2024-02-28

You can make an information query system, if you haven't done it before, it is recommended to use ASP to write it first, this is relatively simple, even people who do not have a basic knowledge of network programming can get started in a short period of time. The written web program can be called on the network, and different permissions can be set for different users. In this way, you can achieve the function you want, but this is only the basic, and you should learn more deeply to achieve more complete functions. >>>More

10 answers2024-02-28

The database is generally composed of many tables, for example, the school builds a database, which can build a student table (including the student's name, age, student number, class, date of birth), a teacher table (including the teacher's name, age, teaching class, teaching category), a report sheet (including the student's student number, and the grades of each subject), etc. These are the ways in which the files are stored in the database, and try to make sure that the items in a table are closely related and have the same attributes, if this condition cannot be met, a table must be built (the redundancy of the built table has 4 levels). In order to meet the user's query needs, we also need to make a number of views, for example, you can make a view of his items have the name of the student, age, grades of each subject, and the teacher of each subject, etc., we can also export new items according to the existing items, for the purpose of simplicity, for example, the view can add an average grade, we add different permissions and roles to each view, and provide it to different people to query to protect the security of the database. >>>More

9 answers2024-02-28

Create a database.

Select the Program Management SQL Server 2008 SQL Server Management Studio command in the Start menu to open the SQL Server Management Studio window and establish a connection using Windows or SQL Server authentication. >>>More