-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSqlConnectionScript.cs
More file actions
26 lines (22 loc) · 887 Bytes
/
SqlConnectionScript.cs
File metadata and controls
26 lines (22 loc) · 887 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
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System.Data.SqlClient;
public class SqlConnectionScript : MonoBehaviour
{
private string connstring;
// Start is called before the first frame update
void Start()
{
connstring = "Server=tcp:unityposedetection.database.windows.net,1433;Initial Catalog=unityposedetection;Persist Security Info=False;User ID=daniyusra;Password=ImagineCup2022;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;";
SqlConnection conn = new SqlConnection(connstring);
conn.Open();
SqlCommand cmd = new SqlCommand("Insert Into userData Values ('COK5', 'COK', 'COK', '20120618 10:34:09 AM')", conn);
cmd.ExecuteNonQuery();
conn.Close();
}
// Update is called once per frame
void Update()
{
}
}