Watch, Follow, &
Connect with Us

Please visit our new home
community.embarcadero.com.


Welcome, Guest
Guest Settings
Help

Thread: ADO after KB4041681



Permlink Replies: 4 - Last Post: Oct 17, 2017 5:06 AM Last Post By: Dariusz Cembala Threads: [ Previous | Next ]
stefano sganzerla

Posts: 1
Registered: 7/1/11
ADO after KB4041681
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 12, 2017 4:50 AM
After security update KB4041681 of 10/10/2017, our ADO connection gives error on open:

Unexpected error from external database driver (1)

Someone has the same problem ?
Some ideas that aren't remove the update ?

AdoConnection.Connected := False;
AdoConnection.ConnectionString := 'Provider=Microsoft.Jet.OLEDB.4.0;' +
                                  'Data Source=example.xls;' +
                                  'Extended Properties="Excel 8.0;IMEX=1";';
try
  AdoConnection.Open;
...
Delvecchio Pierre

Posts: 1
Registered: 11/23/08
Re: ADO after KB4041681
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 12, 2017 7:08 AM   in response to: stefano sganzerla in response to: stefano sganzerla
Hi,

I have the same problem (Win 7) and to solve it you can try this:

1) Fast for angry customer (hum, my case):
- Try to retrieve the previous version msexcl40.dll version 4.0.9801.0 and copy this library to your application folder
- launch regedit
- edit key HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Jet\4.0\Engines\Excel\win32old with value of your application folder
- restart computer

2) if you have firedac you can use TFDConnection and TFDQuery like this:
place on your form:
TFDConnection property name=dbXLS
TFDQuery property name = qryXLS

...
qryXLS.Close;
dbXLS.Params.Clear;
dbXLS.Params.Add('DriverID=ODBC');
dbXLS.Params.Add(
    'ODBCDriver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)}'
);
XlsFile := 'YourExcelFile.xls';
dbXLS.Params.Add(format('Database=%s', [XlsFile]));
 
try
  dbXLS.Connected := true;
  qryXLS.SQL.Text := 'SELECT * FROM [Sheet1$]';
  try
    qryXLS.Open
  except
    ShowMessage(format('Error open %s', [XlsFile]));
 
  end;
except
 
end;


Best regards,
Delvecchio Pierre
Stagiair MendriX

Posts: 1
Registered: 6/20/16
Re: ADO after KB4041681
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 16, 2017 5:29 AM   in response to: stefano sganzerla in response to: stefano sganzerla
Having the same problem when trying to read excel files. One of our customers found out, that when the excel file was opened in excel, Ado could read the file as well. This was not the case in prior to the windwos update, when the file could NOT be read when open in excel.

Maybe this also works when the file is opened in any other program, like notepad. Not tested.

Nervertheless, we recommend this workaround for as long MS doesn't provide a proper fix.
Attila Molnár

Posts: 1
Registered: 7/19/13
Re: ADO after KB4041681
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 16, 2017 5:36 AM   in response to: stefano sganzerla in response to: stefano sganzerla
Dariusz Cembala

Posts: 1
Registered: 9/16/07
Re: ADO after KB4041681
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 17, 2017 5:06 AM   in response to: Attila Molnár in response to: Attila Molnár
Attila Molnár wrote:
- change connection string (Office install is required if I unserstand correctly)
Not Office. You need to install Access Database Engine it's a free download from MS site. You don't need to install it if you already have Office installed.
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02