Get the Database Connection String issue in the C configuration file

Updated on technology 2024-03-05
18 answers
  1. Anonymous users2024-02-06

    with"connstr"Try it.

    The complete one is"connstr"]

    You may want to refer to the following;

    I also use the 2005 file where all the references are:

    using system;

    using ;

    using ;

    using ;

    using ;

    using ;

    After that, you can use it directly.

    If you're creating a project, right-click on the References folder to add a reference and add it.

    You right-click to add a reference.

  2. Anonymous users2024-02-05

    Outdated things can still be used

  3. Anonymous users2024-02-04

    According to the ** you wrote, I tested it and can get the value.

  4. Anonymous users2024-02-03

    If the VS database is a free version, right-click on the database properties and there is a connection string that pops up on the right.

    If SQL is using the standard edition, you can manage the database in VS and the external database strings are the same.

  5. Anonymous users2024-02-02

    Leave an interface for the partner to read the configuration file and let him do it himself, so that they can write the function of the encryption configuration file by themselves, which is relatively safe.

  6. Anonymous users2024-02-01

    Let's take a look at Microsoft's official documentation.

    Secure connection information.

    Web Links.

  7. Anonymous users2024-01-31

    Classmate, I did the following test on this question:

    public string ss()

    return sss;

    Your problem should be in the configuration file, and the connection string in your configuration file is not added to lockitem="true"this property.

    If you don't add it, it's all false, and it's OK to add it, hehe, I hope it can help you.

  8. Anonymous users2024-01-30

    What database are you connected to?

    You can't just write it, and then store the connection string in the configuration file and you can change it at any time, how convenient!

  9. Anonymous users2024-01-29

    Is the connectionstrings configured in your configuration file correct?

  10. Anonymous users2024-01-28

    Gives you a class that can read stuff directly from the ini file.

    public class inifile

    Write the ini file.

    //// section

    / key/ value

    public void writeinivalue(string section, string key, string value)

    Read the specified part of the ini file.

    //// section

    / key/ string

    public string readinivalue(string section, string key)}

  11. Anonymous users2024-01-27

    This file is in text format and can be read out by reading a stream of text files.

  12. Anonymous users2024-01-26

    Some things don't come with by default, so right-click to add a reference and select the appropriate assembly.

    There are two uses:

    string

    constr="constr"].connectionstring;

    string

    constr="constr"].connectionstring;

  13. Anonymous users2024-01-25

    Why is it bad? The connectionstrings in config are originally meant to put connection strings, of course, it is best to encrypt them to prevent the configuration file from being opened and causing leaks.

    If you don't put it in the configuration file and write it in **, then as soon as the database is changed, the program will have to be changed, and the programmer will be tired.

  14. Anonymous users2024-01-24

    Apparently up to the mark! It should be written into the configuration file both in terms of security and operabilityconfig)。Adopt "MD5" encryption!

    There are other ways, that is, every time you need to manipulate the database, you go to the background to write a connection, and then open the connection, so that if there are too many operations, it will not seem very troublesome.

    And in fact. The config file also appeared to solve such a problem, of course. config is very powerful.

  15. Anonymous users2024-01-23

    It is generally written in the matching.

    If you put it in the file, if it is not written in the configuration file, but written in the program, when your program is generated and released, and then your deployment environment is different from your development environment, and the database is changed, isn't it a toss?

    Write it in the configuration file, and then encrypt the serial, and then decrypt and restore the serial in the program, which can be said to be the best way.

  16. Anonymous users2024-01-22

    Just write it in the configuration file!

  17. Anonymous users2024-01-21

    There are two ways, one is to read with xmldocument.

    One is to override the configmanager class of the program's source.

  18. Anonymous users2024-01-20

    You can configure it in the config file of your system.

    Add the path to your file and use it.

    string myxmlpath= "path"].connectionstring ;

    Read out the path, then mount, and manipulate the XML

    Let's read it with ConnectionStrings.

    sqlstring is an example.

    var xml = "myxmlpath");

    var xmlsqlnode=

    elements() implements an IENUMERABLE interface for XML to support LINQ

    asparallel() enables multi-core processor concurrent lookup nodes.

    where(n=>"name")."sqlstring"Find the node of the SQL.

    select(n=>"connectionstring").value) to get the data connection of the SQL statement.

    first();

    This xmlsqlnode is the database connection address of sql.

Related questions
8 answers2024-03-05

Let's give you a method.,This method is set up.,You can change it to read.,If you can read the configuration, it's no problem, right? >>>More

11 answers2024-03-05

1. As long as it is not a 64-bit Vista system, let him delete the temporary file cookie history in IE, then enter the content tab of IE attributes, click to clear the SSL status, and then click the setting button behind autocomplete, delete the form and password, and then log in to the game. >>>More

9 answers2024-03-05

I think it works, I did it once when I first started working, and I don't remember it very well, but you can try it with the seek function, locate it first, read it later, and I remember when I was doing this, I read the book The C Programmer, which is about 234 pages.

8 answers2024-03-05

Your anomaly was triggered, but it was eaten.

Because the using statement is actually try....Finally, your ** is equivalent to. >>>More

11 answers2024-03-05

textreader reader;

int linecount = 0; >>>More