Access Provider Error in Vista and Windows 7

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
johnbitner
Posts: 22
Joined: Thu 10 Sep 2009 16:18
Location: United States

Access Provider Error in Vista and Windows 7

Post by johnbitner » Mon 21 Sep 2009 17:11

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.

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Tue 22 Sep 2009 11:08

We have fixed this problem. The fix will be included in the next build of UniDAC.

johnbitner
Posts: 22
Joined: Thu 10 Sep 2009 16:18
Location: United States

Access Provider Error in Vista and Windows 7

Post by johnbitner » Tue 22 Sep 2009 12:02

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

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Wed 23 Sep 2009 06:26

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));

Post Reply