-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSqlFuncs.cs
More file actions
30 lines (26 loc) · 967 Bytes
/
SqlFuncs.cs
File metadata and controls
30 lines (26 loc) · 967 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SQLBACKUP
{
public class SqlFuncs
{
public SqlConnection SqlConnection()
{
SqlConnection conn = new SqlConnection();
conn.ConnectionString =
"Data Source=" + "."/*conString.Text*/ + ";" + "Initial Catalog= master ;" + "User id=" + "sa"/*conUsername.Text*/ + ";" + "Password=" + "guncel@123"/*conPassword.Text*/ + ";";
return conn;
}
public SqlConnection SqlConnectionWindowsAuth()
{
SqlConnection conn = new SqlConnection();
conn.ConnectionString =
"Data Source=" + "."/*conString.Text*/ + ";" + "Initial Catalog= master ;" + "User id=" + "sa"/*conUsername.Text*/ + ";" + "Password=" + "guncel@123"/*conPassword.Text*/ + ";";
return conn;
}
}
}