Changed Project config to build on x86
This commit is contained in:
parent
121dace628
commit
ef025afe0f
@ -16,7 +16,8 @@ namespace TeamHobby.HobbyProjectGenerator.Main
|
|||||||
}
|
}
|
||||||
public string? GetPassword()
|
public string? GetPassword()
|
||||||
{
|
{
|
||||||
Console.WriteLine("Please enter a password:");
|
Console.WriteLine("Please enter " +
|
||||||
|
"a password:");
|
||||||
string? userPassword = Console.ReadLine();
|
string? userPassword = Console.ReadLine();
|
||||||
return userPassword;
|
return userPassword;
|
||||||
}
|
}
|
||||||
@ -26,8 +27,8 @@ namespace TeamHobby.HobbyProjectGenerator.Main
|
|||||||
|
|
||||||
public static void Main(string[] args)
|
public static void Main(string[] args)
|
||||||
{
|
{
|
||||||
// Logger log = new Logger();
|
// Logger log = new Logger();
|
||||||
Logger.PrintTest();
|
//Logger.PrintTest();
|
||||||
//GetCredentials credentials = new GetCredentials();
|
//GetCredentials credentials = new GetCredentials();
|
||||||
//string? username = credentials.GetUserName();
|
//string? username = credentials.GetUserName();
|
||||||
//string? password = credentials.GetPassword();
|
//string? password = credentials.GetPassword();
|
||||||
@ -36,38 +37,38 @@ namespace TeamHobby.HobbyProjectGenerator.Main
|
|||||||
//Console.WriteLine(value: $"username is {username}\npassword is {password}");
|
//Console.WriteLine(value: $"username is {username}\npassword is {password}");
|
||||||
|
|
||||||
// Creating the Factory class
|
// Creating the Factory class
|
||||||
//string dbType = "sql";
|
string dbType = "sql";
|
||||||
//RelationalDataSourceFactory dbFactory = new RelationalDataSourceFactory();
|
RelationalDataSourceFactory dbFactory = new RelationalDataSourceFactory();
|
||||||
|
|
||||||
//// Testing Data Access Layer
|
// Testing Data Access Layer
|
||||||
//string dbInfo = "DRIVER={MariaDB ODBC 3.1 Driver};" +
|
string dbInfo = "DRIVER={MariaDB ODBC 3.1 Driver};" +
|
||||||
// "SERVER=localhost;" +
|
"TCPIP=1;" +
|
||||||
// "DATABASE=hobby;" +
|
"SERVER=localhost;" +
|
||||||
// "UID=root;" +
|
"DATABASE=hobby;" +
|
||||||
// "PASSWORD=Teamhobby;" +
|
"UID=root;" +
|
||||||
// "OPTION=3";
|
"PASSWORD=Teamhobby;";
|
||||||
//IDataSource<string> datasource = dbFactory.getDataSource(dbType,dbInfo);
|
IDataSource<string> datasource = dbFactory.getDataSource(dbType, dbInfo);
|
||||||
|
|
||||||
//string sqlQuery = "Select * from log;";
|
string sqlQuery = "Select * from log;";
|
||||||
//Object result = datasource.ReadData(sqlQuery);
|
Object result = datasource.ReadData(sqlQuery);
|
||||||
//Console.WriteLine("type of Result: " + result.GetType());
|
Console.WriteLine("type of Result: " + result.GetType());
|
||||||
//OdbcDataReader reader = null;
|
OdbcDataReader reader = null;
|
||||||
|
|
||||||
//if (result.GetType() == typeof(OdbcDataReader))
|
if (result.GetType() == typeof(OdbcDataReader))
|
||||||
//{
|
{
|
||||||
// reader = (OdbcDataReader)result;
|
reader = (OdbcDataReader)result;
|
||||||
|
|
||||||
//}
|
}
|
||||||
|
|
||||||
//Console.WriteLine("Reading from the database");
|
Console.WriteLine("Reading from the database");
|
||||||
//while (reader.Read())
|
while (reader.Read())
|
||||||
//{
|
{
|
||||||
// Console.WriteLine("Date={0} {1} {2} {3} {4} {5}", reader[0], reader[1], reader[2], reader[3], reader[4], reader[5]);
|
Console.WriteLine("Date={0} {1} {2} {3} {4} {5}", reader[0], reader[1], reader[2], reader[3], reader[4], reader[5]);
|
||||||
//}
|
}
|
||||||
//SqlDAO sqlDS = (SqlDAO)datasource;
|
SqlDAO sqlDS = (SqlDAO)datasource;
|
||||||
|
|
||||||
//// Closing the connection
|
// Closing the connection
|
||||||
//sqlDS.getConnection().Close();
|
sqlDS.getConnection().Close();
|
||||||
|
|
||||||
// 2.Inserting Data into the database:
|
// 2.Inserting Data into the database:
|
||||||
//string sqlWrite = "INSERT into log(lvname, catname, userop, logmessage) values " +
|
//string sqlWrite = "INSERT into log(lvname, catname, userop, logmessage) values " +
|
||||||
|
|||||||
@ -5,6 +5,7 @@
|
|||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
|
<PlatformTarget>x86</PlatformTarget>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user