Exemplo n.º 1
0
        private static void UpdateStudent()
        {
            //Get db connection string.
            DBMSSQL Db = GetMSSQLDB();

            //Declare the update statement.
            String Query = "UPDATE Student SET LastName = 'Peters' WHERE ID='4';";

            //Execute the query
            Db.NonQuery(Query);
        }
Exemplo n.º 2
0
        private static void DeleteStudent()
        {
            //Get db connection string.
            DBMSSQL Db = GetMSSQLDB();

            //Declare the delete statement.
            String Query = "DELETE From Student WHERE ID='4';";

            //Execute the query
            Db.NonQuery(Query);
        }
Exemplo n.º 3
0
        private static void CreateStudent()
        {
            //Get db connection string.
            DBMSSQL Db = GetMSSQLDB();

            //Declare the insert statement.
            String Query = "INSERT INTO Student (ID,LastName, FirstName, StreetAddress) Values (4,'Murkel','Cliff','115 Niagara Ave');";

            //Execute the query
            Db.NonQuery(Query);
        }