How to get data from Select sentence without fieldsName
Posted: Tue 06 Apr 2010 17:40
Hi i´ve a little problem, i'm developing a webServicesSQL using Delphi, my webServicesSQL is a dataModule and i use MyDAC.
I do know how to get the fields obtained from a SQL sentences without using the TMyQuery's fieldValues property. Anyone know???. Below i write a piece of code
Suposing a make a request 'SELECT * FROM calls ' and the Sentences responce 3 fields (id, call, timestamtp) and 3 rows, using TmyQuerys's fieldValue property is : MyQuery1.FieldValues['id'] .... BUT if i dont know the fields name ???
function TWebServicesSQL.ejecutaQuery(SentSQL: UTF8String; Int: ShortInt): AnsiString;
beginSentSQL := URL_Decode(SentSQL);
if myConexion.Connected then
begin
myQuery.SQL.Text := SentSQL;
myQuery.Prepare;
if myQuery.IsQuery then
begin
myQuery.Execute;
result := ' ??';
end
else
...
end
REGARDS
ARTURO

I do know how to get the fields obtained from a SQL sentences without using the TMyQuery's fieldValues property. Anyone know???. Below i write a piece of code
Suposing a make a request 'SELECT * FROM calls ' and the Sentences responce 3 fields (id, call, timestamtp) and 3 rows, using TmyQuerys's fieldValue property is : MyQuery1.FieldValues['id'] .... BUT if i dont know the fields name ???
function TWebServicesSQL.ejecutaQuery(SentSQL: UTF8String; Int: ShortInt): AnsiString;
beginSentSQL := URL_Decode(SentSQL);
if myConexion.Connected then
begin
myQuery.SQL.Text := SentSQL;
myQuery.Prepare;
if myQuery.IsQuery then
begin
myQuery.Execute;
result := ' ??';
end
else
...
end
REGARDS
ARTURO