Skip to content

Commit

Permalink
Merge branch 'main' of git+ssh://github.com/SeedTactics/fms-insight
Browse files Browse the repository at this point in the history
  • Loading branch information
wuzzeb committed Aug 26, 2024
2 parents 0ff4f7b + e410514 commit a05f879
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion client/insight/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@seedtactics/insight-client",
"version": "15.2.1",
"version": "15.2.4",
"license": "BSD-3-Clause",
"private": true,
"type": "module",
Expand Down
9 changes: 6 additions & 3 deletions server/machines/mazak/OpenDatabaseKit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ private IDbConnection OpenReadonlyOleDb()
throw new Exception("VerE and Web only only supported on windows");
}

using var conn = new OleDbConnection(_connectionStr);
var conn = new OleDbConnection(_connectionStr);
while (attempts < 20)
{
try
Expand All @@ -119,6 +119,7 @@ private IDbConnection OpenReadonlyOleDb()
if (!(ex.Message.ToLower().IndexOf("try again") >= 0))
{
//if this is not a locking exception, throw it
conn.Close();
throw new DataException(ex.ToString());
}
}
Expand All @@ -130,6 +131,7 @@ private IDbConnection OpenReadonlyOleDb()
if (!(ex.Message.ToLower().IndexOf("try again") >= 0))
{
//if this is not a locking exception, throw it
conn.Close();
throw;
}
}
Expand All @@ -140,6 +142,7 @@ private IDbConnection OpenReadonlyOleDb()
attempts += 1;
}

conn.Close();
throw new Exception("Mazak database is locked and can not be accessed");
}

Expand Down Expand Up @@ -168,7 +171,7 @@ public OpenDatabaseKitTransactionDB(MazakConfig cfg)
if (MazakType == MazakDbType.MazakWeb || MazakType == MazakDbType.MazakVersionE)
{
_connectionStr =
"Provider=Microsoft.Jet.OLEDB.4.0;Password=\"\";"
"Provider=Microsoft.ACE.OLEDB.12.0;Password=\"\";"
+ "User ID=Admin;"
+ "Data Source="
+ System.IO.Path.Combine(cfg.SQLConnectionString, "FCNETUSER1.mdb")
Expand Down Expand Up @@ -818,7 +821,7 @@ public OpenDatabaseKitReadDB(MazakConfig mazakCfg, ICurrentLoadActions loadOper)
if (MazakType == MazakDbType.MazakWeb || MazakType == MazakDbType.MazakVersionE)
{
_connectionStr =
"Provider=Microsoft.Jet.OLEDB.4.0;Password=\"\";User ID=Admin;"
"Provider=Microsoft.ACE.OLEDB.12.0;Password=\"\";User ID=Admin;"
+ "Data Source="
+ System.IO.Path.Combine(mazakCfg.SQLConnectionString, "FCREADDAT01.mdb")
+ ";"
Expand Down
2 changes: 2 additions & 0 deletions server/machines/mazak/default-config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ EnableDebugLog = false
# FMS Insight supports three versions of Mazak's cell controller (Version E, Web, and Smooth).
# To specify exactly which version, uncomment the cooresponding setting below. If no setting
# is specified, Insight will attempt to detect the correct cell controller version.
# For Web and Smooth versions, install the Microsoft ACE OLEDB 12.0 driver from
# https://www.microsoft.com/en-us/download/details.aspx?id=54920
;VersionE = true
;Web Version = true
;Smooth Version = true
Expand Down

0 comments on commit a05f879

Please sign in to comment.