2022-02-20 14:13:19 +08:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace OrmTest
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Setting up the database name does not require you to create the database
|
|
|
|
|
/// 只需要设置IP和账户密码 ,自动建库
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class Config
|
|
|
|
|
{
|
2022-02-20 16:32:32 +08:00
|
|
|
|
public static string GetCurrentProjectPath
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
return Environment.CurrentDirectory.Replace(@"\bin\Debug", "");
|
|
|
|
|
}
|
|
|
|
|
}
|
2022-02-20 14:13:19 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Account have permission to create database
|
|
|
|
|
/// 用有建库权限的数据库账号
|
|
|
|
|
/// </summary>
|
2022-07-27 12:35:42 +08:00
|
|
|
|
public static string ConnectionString = "Provider=Microsoft.ACE.OleDB.16.0;Data Source="+GetCurrentProjectPath+"\\test.accdb";
|
2022-02-20 14:13:19 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Account have permission to create database
|
|
|
|
|
/// 用有建库权限的数据库账号
|
|
|
|
|
/// </summary>
|
2022-02-20 16:32:32 +08:00
|
|
|
|
public static string ConnectionString2 = ConnectionString;
|
2022-02-20 14:13:19 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Account have permission to create database
|
|
|
|
|
/// 用有建库权限的数据库账号
|
|
|
|
|
/// </summary>
|
2022-02-20 16:32:32 +08:00
|
|
|
|
public static string ConnectionString3 = ConnectionString;
|
2022-02-20 14:13:19 +08:00
|
|
|
|
}
|
|
|
|
|
}
|