mirror of
https://github.com/islehorse/HISP.git
synced 2025-04-22 12:45:53 +12:00
change sqllite libary
This commit is contained in:
parent
6627ca5dc4
commit
41a6038527
7 changed files with 25 additions and 14 deletions
|
@ -13,6 +13,7 @@ using HISP.Game.SwfModules;
|
|||
|
||||
using MySqlConnector;
|
||||
using Microsoft.Data.Sqlite;
|
||||
using SQLitePCL;
|
||||
|
||||
namespace HISP.Server
|
||||
{
|
||||
|
@ -67,11 +68,16 @@ namespace HISP.Server
|
|||
public static void OpenDatabase()
|
||||
{
|
||||
if (!ConfigReader.SqlLite)
|
||||
{
|
||||
ConnectionString = "server=" + ConfigReader.DatabaseIP + ";user=" + ConfigReader.DatabaseUsername + ";password=" + ConfigReader.DatabasePassword + ";database=" + ConfigReader.DatabaseName;
|
||||
else
|
||||
ConnectionString = "Data Source=\"" + ConfigReader.DatabaseName + ".db\";";
|
||||
|
||||
DataFixerUpper.FixUpDb();
|
||||
}
|
||||
else
|
||||
{
|
||||
ConnectionString = "Data Source=\"" + ConfigReader.DatabaseName + ".db\";";
|
||||
Batteries.Init();
|
||||
}
|
||||
|
||||
|
||||
using (DbConnection db = connectDb())
|
||||
{
|
||||
|
@ -128,6 +134,7 @@ namespace HISP.Server
|
|||
|
||||
if (ConfigReader.SqlLite)
|
||||
{
|
||||
|
||||
try
|
||||
{
|
||||
DbCommand sqlCommand = db.CreateCommand();
|
||||
|
@ -624,6 +631,7 @@ namespace HISP.Server
|
|||
};
|
||||
}
|
||||
|
||||
DataFixerUpper.FixUpDb();
|
||||
}
|
||||
|
||||
public static void DeleteRanchOwner(int ranchId)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue