I'm trying to develop a dll for my application and what is good is that i have the code in pascal developed on Borland Delphi 6 BUT the problem is there are some objects which i can't define them in c++ .
So i need help for this migration and if there is someone can help me what is the best solution and objects in c++ relatives to this objects in Pascal :
I have searched all over for a proper manual - alas! I need to produce a Rave Report from an SQL statement in Delphi7, something like
SELECT * FROM tblTransaction WHERE TransDate>=[Starting Date] And TransDate<=[End Date]
ORDER BY Category, TransDate; (TransDate and Category are fields in the table)
The report must look like an MS Access report GROUPED by Category, then all the Transactions in that group (Category) ordered by TransDate, followed by a sub-total for the group and, finally, an overall TOTAL for all the transactions. The transactions are invoices with such information as supplier, date paid, detail, etc.
The SQL must be passed to Rave Reports from Delphi, as must be the ConnectionString to the database.
There are sites advertising examples of Rave for sale but, they are not specific and I do not want to spend unless I know it's what I'm looking for.
Need a clarification in Delphi 7
I have two applications running simultaniously.
One will feed the next with trigger files.
Here i want the second application to pick the oldest file in the list of files available.
Please suggest me an idea with example...
First application is a report file generator, at the end of report generation it will create a trigger file with root path of those Report files. The second application will pick the trigger file and will Archive those report files to DB...
if i have ten trigger files present named 1.trg, 2.trg ... so on... The second application will pick the 1.trg and process it. After processing. it is not picking the 2.trg where as it starts picking 11.trg which the report gen was currently writing in. Where in i need the second application to pick 2.trg...
I want to send automatic mail from my Delphi application with attachment without invocation of any client tool like outlook. Actually My application runs as a windows service and every 5 minute generate some response files. I want those files to be mailed automatically. But how do I do that?
Im not in with Delhi but what i do is: create an EML-file, open a socket and send the stuff. Actually it is not so difficult to create a socket that follows the SMTP-protocol...
If you like i can give you some code to do that (or look at the RFC's describing the SMTP-protocol)
I'm controling excel successfully, but now I came up with a problem.
I use Excel97.pas due to compatibility reasons. With this I successfully control 100% of excel 97-2003 and 90% of excel 2007.
It is for complex export of data with Pivots and Charts. The only thing not working in 2007 is the build in charttypes but that is not so important, but help there would also be appreciated.
But now the problem:
I'm starting excel in a new instance. When I try to enable the events, however this fails wenn an other instance has the printpreview open. For now I present a message telling the user to close the preview, but I prefer to do without. I have not found any way to close the preview or any other way around it.
I use an ADOQuery, ADODataSource and DBGrid to populate a Read-only DBGrid from an Access table. I then use an ADOCommand to execute an SQL statement to either Update, Insert or Delete a record in the table. How do I get the DBGrid to automatically display the updated table? I have tried to Refresh or Update the DBGrid, also Close and Open, and Active=False and True on the ADOQuery, all to no avail.
I tried to define a TDataSource which I can Create before running the query and FreeAndNil afterwards but, I get an error 'Not enough parameters' when I do MyDataSource := TDataSource.Create. I think this approach could work?
All I have is an ADOQuery, an ADODataSource and a DBGrid. I tried to create the ADOQuery and DataSource programmatically but it did not work. I have not tried to do the same with the DBGrid. To my knowledge a DataSource does not have an Active, Close, Open or Refresh property, that's why I tried creating and freeing it but the data still did not change in the DBGrid.
Str := 'UPDATE tblTransaction SET tblTransaction.Category = "' + NewCat+ '", ' +
'tblTransaction.TaxDeductable="' + NewExp + '" ' +
'WHERE (((tblTransaction.Category) = "ZZZZ"));';
cmdCategory.CommandText := Str;
//and then this bit in the ShowData procedure
with qryCategory do
Active := False; //I also tried Close and Open
ConnectionString := cnnStr;
SQL.Text := 'SELECT Category,Expense FROM tblCategory ORDER BY Category';
Active := True;
//The DBGrid should now show this change