Skip to content

Database usage

Ned edited this page Oct 17, 2018 · 9 revisions

Construction

Database constructor takes in 4 parameters of type string:

-hostname

-username

-password

-database name

Inserting data

InsertData() function inserts new data into the database and takes 3/4 parameters:

-id (int)

-name (string)

-lastname (string)

-age (int) [optional, default value is 0]

Taking data from the database

RetrieveData() function returns a List type that contains all data specified in the command It takes one parameter that is a command query that will be given to the database:

-commmand (string)

Clone this wiki locally