Re: Currency Fields In Dynamic ADO Queries
- From: Brian Bushay TeamB <BBushay@xxxxxxxxx>
- Date: Thu, 23 Mar 2006 21:05:11 -0600
Now, the following code will execute correctly, if the dynamic SQL
statement contains only the fields that are shown in the Fields Editor.
The problem is that a seperate ADOQuery comp. and Datasource comp. must
be used, whenever I want a query with different fields and/or table. Is
there a simpler way that uses an ADOQuery component?
You can create persistent Tfields at runtime
var
f : TField;
i : integer;
begin
Query1.FieldDefs.Update
Query1.Close;
for i := 0 to Query1.FieldDefs.Count - 1 do
//create persistent field that do not exist
if Query1.FindField(Query1.FieldDefs[i].Name) = nil then
Query1.FieldDefs.Items[i].CreateField(Query1);
end;
--
Brian Bushay (TeamB)
Bbushay@xxxxxxxxx
.
- Prev by Date: Re: Access violation error on domain only
- Next by Date: Re: Connection String in SQL Server 2005 giving errors
- Previous by thread: Re: Currency Fields In Dynamic ADO Queries
- Next by thread: Deadlock exception not raised at client
- Index(es):