C-sharp link SQL SERVERE connection failed

{

        string strConnection = "Server=DESKTOP-TH8QSR9;";

        strConnection += "initial catalog=test;";

        strConnection += "user id=DESKTOP-TH8QSR9\\suchao;";

        strConnection += "password=;";

        strConnection += "Connect Timeout=5";
        

clipboard.png

Mar.22,2021

strConnection += "user id=DESKTOP-TH8QSR9\\suchao;";

-- \ 

-- . 

is it not good to write directly? Concatenate strings with spaces or they are all concatenated
strConnection + = "initial catalog=test;";

  • SQL look up data

    when querying SQL, you need to process the data to find the difference. Some units are hours, times, and seconds. For example, when an hour subtracts seconds, the second should be converted to an hour with a difference less than a certain value to send m...

    Mar.22,2021
  • Mengxin solved the value of C-sharp database?

    sources of topics and their own ideas related codes Please paste the code text below (do not replace the code with pictures) string cString = "data source=.;initial catalog=project;integrated security=true;"; SqlConnec...

    Jan.26,2022
  • Query 100000 items of data with SQL or JSON+LINQ?

    I have a dataset with a size of about 100000. The dataset is rarely added or updated, mainly because of frequent query operations, efficient query, and regardless of memory footprint and preload time. Which solution is better to use SQL or JSON+LINQ? ...

    Mar.21,2022
  • Query 100000 items of data with SQL or JSON+LINQ?

    I have a dataset with a size of about 100000. The dataset is rarely added or updated, mainly because of frequent query operations, efficient query, and regardless of memory footprint and preload time. Which solution is better to use SQL or JSON+LINQ? ...

    Mar.21,2022
  • Query 100000 items of data with SQL or JSON+LINQ?

    I have a dataset with a size of about 100000. The dataset is rarely added or updated, mainly because of frequent query operations, efficient query, and regardless of memory footprint and preload time. Which solution is better to use SQL or JSON+LINQ? ...

    Mar.21,2022
Menu