Page 1 of 1

Access Provider Error in Vista and Windows 7

Posted: Mon 21 Sep 2009 17:11
by johnbitner
On Vista 32bit and Windows 7 I get the following error using the AccessProvider trying to open the access database file.

"[Microsoft][ODBC Microsoft Access Driver]Invalid string or buffer length"

To recreate the problem do the following while running Vista 32 bit or Windows 7 RTM 32 bit.

UniConnection1.ProviderName:= 'ACCESS';
UniConnection1.Database:= 'C:\myapp\mydatabase.mdb';
UniConnection1.Connect;

This was testing with a clean VM of Windows 7 RTM. This same code works on Windows XP Pro SP3.

Posted: Tue 22 Sep 2009 11:08
by Plash
We have fixed this problem. The fix will be included in the next build of UniDAC.

Access Provider Error in Vista and Windows 7

Posted: Tue 22 Sep 2009 12:02
by johnbitner
Great, glad you found the issue. Now, we need this fix ASAP. Can we get a pre-release build, updated source code or at least instructions on where to fix this in the source we purchased? We hit a brick wall with this issue on our ms access database version and cannot wait a month or more for a major fix like this to continue testing. Our Vista and Win 7 testers cannot connect to the database at all because of this issue.

Thanks

Posted: Wed 23 Sep 2009 06:26
by Plash
Find the TODBCConnection.ObtainDriverInfo procedure in ODBCClasses.pas.
Replace the line

Code: Select all

  Check(FCli.SQLGetInfoInt(FSQLHDbc, SQL_IDENTIFIER_CASE, Val, 0, nil));
with

Code: Select all

  Check(FCli.SQLGetInfoInt(FSQLHDbc, SQL_IDENTIFIER_CASE, Val, 4, nil));