-
Notifications
You must be signed in to change notification settings - Fork 0
Method Create
Louis Richard edited this page Nov 22, 2019
·
1 revision
This method execute a given create query
- Parameter
- string query
- The create query you wish to execute
- string query
First, we connect to the database using the ConnectToDatabase method.
Then, using what ConnectToDatabase returns us, we define the next query to be executed using the CommandText attribute.
Finally, using the ExecuteNonQuery attribute, we execute said query.
We then close the Database connection using ConnectToDatabase with the parameter true.
Note : Because we don't care about what ConnectToDatabase returns us when closing the connection, we use an underscore ( _ ) to ignore the return value.
_ = ConnectToDatabase(true);Please, when using this project for your own, write a comment to say where you got it from :)
That's all I'm asking for.