Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
511 B
3
Indexable
Never
public static async Task<bool> Conopen()
        {
            try
            {
                string? Cstring;
                Cstring =
                    $"Data Source = {Ipaddress};Initial Catalog=CNHSAttendance;Integrated Security=False;User ID={Uid};Password={Upass};";
                Cnn = new SqlConnection(Cstring);
                await Cnn.OpenAsync();
                return true;
            }
            catch
            {
                return false;
            }
        }