Hello guys,
The code below is a php code that check if the database connection is open :
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
echo "Connected successfully";
?>
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
echo "Connected successfully";
?>
I want to do an exact verification but in asp.net c# with razor syntax. my database connection code is below :
Code
var db = Database.Open(client); //client is my connection string defined in my web.config
ashish sadasing22 reputationPosted May 4, 2016, 4:44 AM EDT
Vincent Maverick DuranoRank #238 · 10.3K reputationPosted May 4, 2016, 6:28 AM EDT
Vincent Maverick DuranoRank #238 · 10.3K reputationPosted May 4, 2016, 4:27 AM EDT