mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-19 18:22:23 +08:00
Update AccessCore
This commit is contained in:
@@ -341,7 +341,7 @@ namespace SqlSugar.Access
|
|||||||
|
|
||||||
private void Close(bool isOpen)
|
private void Close(bool isOpen)
|
||||||
{
|
{
|
||||||
if (this.Context.CurrentConnectionConfig.IsAutoCloseConnection = true && isOpen)
|
if (this.Context.CurrentConnectionConfig.IsAutoCloseConnection&& isOpen)
|
||||||
{
|
{
|
||||||
this.Context.Ado.Connection.Close();
|
this.Context.Ado.Connection.Close();
|
||||||
}
|
}
|
||||||
@@ -350,7 +350,7 @@ namespace SqlSugar.Access
|
|||||||
private bool Open()
|
private bool Open()
|
||||||
{
|
{
|
||||||
var isOpen = false;
|
var isOpen = false;
|
||||||
if (this.Context.CurrentConnectionConfig.IsAutoCloseConnection = true && this.Context.Ado.Connection.State == ConnectionState.Closed)
|
if (this.Context.CurrentConnectionConfig.IsAutoCloseConnection&& this.Context.Ado.Connection.State == ConnectionState.Closed)
|
||||||
{
|
{
|
||||||
this.Context.Ado.Connection.Open();
|
this.Context.Ado.Connection.Open();
|
||||||
isOpen = true;
|
isOpen = true;
|
||||||
|
@@ -8,6 +8,7 @@ namespace SqlSugar.Access
|
|||||||
{
|
{
|
||||||
public class AccessInsertBuilder : InsertBuilder
|
public class AccessInsertBuilder : InsertBuilder
|
||||||
{
|
{
|
||||||
|
public override bool IsOleDb { get; set; } = true;
|
||||||
public override string SqlTemplate
|
public override string SqlTemplate
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -17,7 +18,7 @@ namespace SqlSugar.Access
|
|||||||
return @"INSERT INTO {0}
|
return @"INSERT INTO {0}
|
||||||
({1})
|
({1})
|
||||||
VALUES
|
VALUES
|
||||||
({2}) ;";
|
({2}) ;select @@identity";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user