http://bugs.winehq.org/show_bug.cgi?id=5603
Summary: MS Dao 3.5 with builtin OLEAUT32.DLL fail to evalutate expressions in SQL sentences Product: Wine Version: 0.9.16. Platform: All OS/Version: All Status: UNCONFIRMED Severity: normal Priority: P3 Component: wine-ole AssignedTo: wine-bugs@winehq.org ReportedBy: paolo.salvan@xvision.it
Using DAO 3.5 (the engine for MS Access 97 databases) and Wine 0.9.9/15/16 I've got a trouble:
when I launch a query that uses some expressions (ie: "SELECT Format(...) FROM Customers") the query fails, lamenting that the function doesn't exist... (A note that can help: Dao uses VBAR332.DLL or Expsrv.dll module to evaluate expressions)
The console log says: ---- fixme:ole:MSFT_ReadValue BSTR length = -1? fixme:ole:MSFT_ReadValue BSTR length = -1? ---- Replacing the builtin OLEAUT32.DLL with the native DLL everything works ok.
The attached minimal project reproduce the problem; before starting it, install standard Dao 3.5 setup from MS or install http://download.danea.it/demo/def2006demo09b.exe (that is my SW, it install a minimal Dao3.5)
BTW, this is the minimal bit of Delphi code to reproduce the problem:
procedure TForm1.Button1Click(Sender: TObject); var daodbeng: DAODBEngine; daodb: DAODatabase; daors: DAORecordset; begin try daodbeng:= OpDAO35.CreateEngine; daodb:= daodbeng.OpenDatabase(ChangeFileExt(Application.ExeName, '.mdb'), false, false, ''); // This works under Windows, fails under Wine: daors:= daodb.OpenRecordset('SELECT Format(#1/1/2000#, "yyyy", 2) FROM TConfig', dbOpenDynaset, _, _); // This always works: //daors:= daodb.OpenRecordset('SELECT * FROM TConfig', dbOpenDynaset, _, _); daors.Free; daodb.Free; daodbeng.Free;
ShowMessage('OK'); except on e: Exception do ShowMessage('Exception: ' + e.ClassName + '; Msg: ' + e.Message); end; end;