anydac

What is the proper way to dynamically create and call a stored procedure in Delphi using FireDac?

只谈情不闲聊 提交于 2020-01-01 15:05:11
问题 I am relatively new to FireDAC. I want to be able to call a stored procedure "on the fly", dynamically. So far I have the following: function TForm21.ExecuteStoredProc(aSPName: string; aParams: TADParams): Boolean; var LSP: TADStoredProc; i: Integer; begin LSP := TADStoredProc.Create(nil); try LSP.Connection := ADConnection1; LSP.StoredProcName := aSPName; LSP.Prepare; for i := 0 to aParams.Count - 1 do begin LSP.Params[i].Value := aParams[i].Value; end; LSP.ExecProc; finally LSP.Free; end;

MSAccess SQL Too few parameters. Expected 4

泄露秘密 提交于 2019-12-24 00:58:53
问题 I'm using Delphi XE2 and AnyDAC and an MSAccess db. The table 'timea' has 5 fields: Rec_No AutoNumber App text User_ID text PW text Comment memo This code throws the error below. The query works just fine in Access query designer. sql := 'INSERT INTO [timea] (App, User_ID, PW, Comment) VALUES ("zoo", "Bill", "mi7", "Liger");'; adconnection1.ExecSQL(sql); Project PWB.exe raised exception class EMSAccessNativeException with message '[AnyDAC][Phys][ODBC][Microsoft][ODBC Microsoft Access Driver]

AnyDac aka FireDac cannot generate update query

孤街醉人 提交于 2019-12-13 15:13:35
问题 I was using UniDac for a long time now and decided to move on to FireDac as it has good Asynch methods after moving on i saw that none of my data editing works anymore it gives me an error: [FireDAC][Phys]-330. Cannot generate update query. Update table undefined. What I am trying to do here is i have a TFDStoredProc component who gets all the data from the database and lets me edit it, with unidac I could easily edit the data without any problem like this: StoredProc.Edit;

How to enable wirecompression on Firebird 3.0

孤街浪徒 提交于 2019-12-12 18:33:11
问题 I work with Firebird and Delphi, I want to implement access via internet with wirecompression; But I am unable to activate it. I have followed the steps inside this document for the new parameter(one of the few I was able to find) How to enable WireCompression on Firebird 3.0 using FireDAC In the tests I use Windows server 2012 R2 Firebird : Firebird-3.0.4.33054_0_Win32(32 bits) Also copied to executable folder. fbclient.dll zlib1.dll (idem server and client) created firebird.conf with

Displaying a MySql TIMEDIFF() in a DB grid

一笑奈何 提交于 2019-12-12 04:25:36
问题 When I use the command line, this query gives me pleasing results (it shows duation, which is what TIMEDIFF is about): mysql> select timediff(end_time_stamp,start_time_stamp) from test_runs; +-------------------------------------------+ | timediff(end_time_stamp,start_time_stamp) | +-------------------------------------------+ | 00:00:07 | | 00:00:11 | | 00:01:23 | +-------------------------------------------+ 3 rows in set (0.00 sec) When I put it in a DB grid in Delphi, the TIMEDIFFs are