question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] MS Access mdb file fails to connect: "Error getting information about available transaction isolation options from the connection"

See original GitHub issue

Describe your system

  • odbc Package Version: 2.4.0
  • ODBC Driver: MDBTools
  • Database Name: MS Access mdb database file
  • Database OS: PopOS 20.04 LTS (Ubuntu derivative)
  • Node.js Version: v14.17.4
  • Node.js OS: PopOS 20.04 LTS (Ubuntu derivative)

Describe the bug Attempting to connect to an MDB file fails with “Error getting information about available transaction isolation options from the connection”.

There was a fix to ignore that problem in #181, which was included with the 2.4 release, but something still seems to be amiss.

Expected behavior I would expect to be able connect without issues.

To Reproduce

const odbc = require('odbc');

async function connectToDatabase() {
  const connection = await odbc.connect('DSN=E2Test')
  console.log('w00t!')
}

connectToDatabase().catch(e => console.log(e));

Running the program fails with the following error:

$ node test-connect.js
[Error: [odbc] Error getting information about available transaction isolation options from the connection] {
  odbcErrors: []
}

Here is the trace file output:

[ODBC][761201][1628543228.273146][__handles.c][460]
		Exit:[SQL_SUCCESS]
			Environment = 0x5bfa510
[ODBC][761201][1628543228.273207][SQLSetEnvAttr.c][189]
		Entry:
			Environment = 0x5bfa510
			Attribute = SQL_ATTR_ODBC_VERSION
			Value = 0x3
			StrLen = -5
[ODBC][761201][1628543228.273222][SQLSetEnvAttr.c][381]
		Exit:[SQL_SUCCESS]
[ODBC][761201][1628543228.280610][SQLAllocHandle.c][377]
		Entry:
			Handle Type = 2
			Input Handle = 0x5bfa510
[ODBC][761201][1628543228.280644][SQLAllocHandle.c][493]
		Exit:[SQL_SUCCESS]
			Output Handle = 0x7fe508000d40
[ODBC][761201][1628543228.280672][SQLDriverConnect.c][748]
		Entry:
			Connection = 0x7fe508000d40
			Window Hdl = (nil)
			Str In = [DSN=E2Test][length = 10 (SQL_NTS)]
			Str Out = 0x7fe5258d65c0
			Str Out Max = 2048
			Str Out Ptr = (nil)
			Completion = 0
		UNICODE Using encoding ASCII 'ANSI_X3.4-1968' and UNICODE 'UCS-2LE'

[ODBC][761201][1628543228.286653][SQLDriverConnect.c][1727]
		Exit:[SQL_SUCCESS]
			Connection Out [[][length = 0 (SQL_NTS)]]
[ODBC][761201][1628543228.286685][SQLGetInfo.c][236]
		Entry:
			Connection = 0x7fe508000d40
			Info Type = SQL_MAX_COLUMN_NAME_LEN (30)
			Info Value = 0x5bfb3e0
			Buffer Length = 2
			StrLen = (nil)
[ODBC][761201][1628543228.286709][SQLGetInfo.c][236]
		Entry:
			Connection = 0x7fe508000d40
			Info Type = SQL_TXN_ISOLATION_OPTION (72)
			Info Value = 0x5bfb3e8
			Buffer Length = 4
			StrLen = (nil)
[ODBC][761201][1628543228.286722][SQLGetInfo.c][236]
		Entry:
			Connection = 0x7fe508000d40
			Info Type = SQL_GETDATA_EXTENSIONS (81)
			Info Value = 0x7fe5258dae24
			Buffer Length = 0
			StrLen = (nil)
[ODBC][761201][1628543228.286742][SQLGetDiagField.c][948]
		Entry:
			Connection = 0x7fe508000d40
			Rec Number = 0
			Diag Ident = 2
			Diag Info Ptr = 0x7fe5258da5c0
			Buffer Length = -6
			String Len Ptr = (nil)
[ODBC][761201][1628543228.286760][SQLGetDiagField.c][968]
		Exit:[SQL_SUCCESS]

Additional context I have verified I can connect to the DSN with isql:

$ isql E2Test
+---------------------------------------+
| Connected!                            |
|                                       |
| sql-statement                         |
| help [tablename]                      |
| quit                                  |
|                                       |
+---------------------------------------+
SQL>

From the prompt, I can query successfully.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:23 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
markdirishcommented, Oct 25, 2021

2.4.1 is now available! Feel free to reopen the issue if it is still a problem!

1reaction
markdirishcommented, Oct 11, 2021

Sorry guys, busy days. I am looking to get the PR reviewed and merged in ASAP, then get a new version spun out to fix the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error in Access when opening a database on a network file ...
When opening a database on a network file share, or with links to another database on a network file share, you may receive...
Read more >
[Fixed]: 'Unable to Open Access Database Over Network' Issue
The Access database files (.accdb/.mdb) may get corrupted due to abrupt system shutdown, network connection issue, power failure, etc.
Read more >
Microsoft Access Bug Alert! Cannot Open Any More ... - YouTube
Another bug has been found in Microsoft Access. If you're having any of the following problems then this video may apply to you:-...
Read more >
Automate Desktop and Automate Plus/Ultimate - Fortra
The Terminal (Connect) activity now supports the Credentials feature in Automate Plus/Ultimate. Fixes. Getting, setting, or accessing a dataset row value that ...
Read more >
Data access problems for DB2 databases - IBM
If your application server does not disconnect all connections from the database to allow rollback, the ended transaction persists in locking ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found