Закрыть
×
=0) { let js = text.slice(pos1, pos2); + '<\/' + "script" + '>'; arrText.push(js); // next pos1 = pos2; continue; } } } break; } return arrText; } function OpenDialog(parentDiv, urlContent) { parentDiv = document.getElementById('modal-background'); // new !!!!!!! parentDiv.appendChild(document.getElementById('modal-template')); document.getElementById('modal-background').style.display = "flex"; // !!!!! block document.getElementById('modal-template').style.display = "flex"; // !!!!! document.getElementById('modal-body').innerHTML = ""; post_url(urlContent, "", function(text_from_server) { var element = document.getElementById('modal-body'); element.innerHTML = text_from_server; // add scripts var arrJSText = get_scripts(text_from_server); for (var i=0; i
dir.by
Праздники ...
Праздники ...
Рождество (Католическое) 25 Декабря
Концерты, выставки ...
Концерты, выставки ...
Спектакль "Мистер Икс"|||г. Минск 15 сентября, 26 декабря 2026
Афишу
Спорт занятия ...
Спорт занятия ...
Йога (занятия)
Спорт занятие
Компьютер, программы...
Компьютер, программы...
Объявления ...
Объявления ...
Медицинские перевозки лежачих больных
Объявление
Новости ...
Новости ...
Форум ...
Форум ...
обсуждение...
<<
Поиск >>
Поиск
Концерты
Спорт
Форум
Компьютер
Компьютер, программы
→
ADO.NET (working with the database on C#)
Database connection string | ADO.NET, C#
посмотрели
7854
раз
обновлено: 22 July 2025
To make a connection string, do the following:
In
Visual Studio
click
Tools
→
Connect to Database...
in the menu
In the "Add Connection" window, select
Server name:
Select the computer where the server is located for the database.
The server for the database is the program
SQl Server
1)
can be selected from the list [v]
2)
You can write
local
, which means we will use
SQL Server
on your computer (locally).
Select or enter a database name:
Choose a database name
1)
can be selected from the list [v]
Click
Test Connection
to see if there is a connection to the database (i.e. if we have specified
server name
and
database name
correctly)
Press the
"Advanced..."
button
Let's copy the text:
C#
In the
C#
code, we will use it to connect to the database
string
connectionString
= @
"
Data Source=localhost;Initial Catalog=MyDatabase1;Integrated Security=True;Trust Server Certificate=True
"
;
← Previous topic
Read the image from the database and save it to a file | ADO.NET, C#
Your feedback ... Comments ...
Your Name
Your comment
(www links can only be added by a logged-in user)
+ Picture
Новость
"Черная пятница" Dreame в Беларуси – две недели скидок до 3400 рублей
•
What is ADO.NET?
•
Let"s create a ADO.NET console application (C#, database)
Working with data in ADO.NET
•
Read the data (select) from the Database using SqlCommand and SqlDataReader in ADO.NET C#. Database Type Mapping
•
Read (select) data from the Database using SqlDataAdapter and DataSet | ADO.NET, C#
•
Get a scalar (single) value: Count, Min, Max, Sum, etc. | ADO.NET, C#
•
Add data (insert into) to the Database using SqlCommand | ADO.NET, C#
•
Change the data (update) in the Database using SqlCommand | ADO.NET, C#
•
Delete data in the Database using SqlCommand | ADO.NET, C#
Stored procedures in ADO.NET
•
Stored procedures in ADO.NET | C#
Transactions in ADO.NET
•
Transactions in ADO.NET | Database in the C# console application
Reading the picture from the database ADO.NET
•
Read the image from the database and save it to a file | ADO.NET, C#
Additional topics, questions
•
Database connection string | ADO.NET, C#
Ваши вопросы присылайте по почте:
info@dir.by