Reputation: 173
I try to get the version of an ASE Sybase version, using Delphi 2009 and dbExpress
My code is
with SQLQuery1 do
begin
SQL.Text := 'select @@version';
Open;
Memo1.Lines.Add(FieldList.Fields[0].Value);
Close;
end;
The Open statement raises an exception with message "SQLQuery1: field name missing".
What intrigues me is tha t with ADO, the same code works quite well and i get sommething like this:
Adaptive Server Enterprise/15.7.0/EBF 21204 SMP SP50 /P/X64/Windows Server/ase157sp5x/3286/64- bit/OPT/Thu Jul 11 16:47:22 2013
I also get the same error with this query
SQL.Text := 'select count(*) from myDB..sysobjects where name = ''db_vers'''
Upvotes: 2
Views: 250
Reputation: 25753
Try to add an alias as below
select @@version as version
It should work also for second query.
Upvotes: 2