import { StyleSheet, Text, View } from "react-native"; import React from "react"; import MSSQL from "react-native-mssql"; const config = { server: "******", //ip address of the mssql database username: "***", //username to login to the database password: "*******", //password to login to the database database: "******", //the name of the database to connect to port: 16000, //OPTIONAL, port of the database on the server timeout: 5, //OPTIONAL, login timeout for the server }; const DataFunction = async () => { const connected = await MSSQL.connect(config); const query = "SELECT class FROM cls_sec"; const result = await MSSQL.executeQuery(query); const closed = await MSSQL.close(); };
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)