Solved

TQuery

Posted on 1998-11-15
1
238 Views
Last Modified: 2010-04-04
At runtime I want to use a query to find the sum of a table field called value. I don't know the table name until runtime. I've tried using the Param method to set the table name, but Delphi won't play ball. Anyone got any ideas. Thanks.
0
Comment
Question by:cavalry
1 Comment
 
LVL 1

Accepted Solution

by:
EmmDieh earned 20 total points
ID: 1346917
You can't use a parameter for the table name. The middle layer
can't prepare the SQL-Statement
You'll have to build the query during runtime with someting
like
SQL.Clear;
SQL.Add('select count(Field) from');
SQL.Add(TableName);


0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Newbie Thread Programming 1 151
Delphi XE10, MySQL Query 4 143
Connection between libmysql.dll and MySQL Versions 7 98
MS Access from Delphi 31 28
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question