ZEOSDBO Select * from hatasını gidermek

  03/07/2008, Yazar: Özgür Koca, Kategori: Delphi, Veritabanı

ZEOSDBO-6.6.2-rc ile ZQuery1.SQL.Add(‘select * from links’); sorgusunu çalıştırıp  ZQuery1.FieldbyName(‘title’).AsVariant; ile veriyi almaya calıştığımda aşağıdaki hata mesajını alıyordum;

Application raised an exception class EZSQLException with mesage ‘Column with name “Extra” was not found”

Nedenini anlayamadığım bu anlamsız istisna select * ile tüm alanlar seçildiğinde peydahlanırken, seçilecek alan isimleri belirtildiğinde oluşmuyor. Çözümü ilgili istisnayı yaratan kodu kapatmakla buldum. İgili kod ZDbcResultSet.pas dosyasının TZAbstractResultSet.GetColumnIndex isimli metodunda.

{**
Maps the given <code>ResultSet</code> column name to its
<code>ResultSet</code> column index.

@param columnName the name of the column
@return the column index of the given column name
}

function TZAbstractResultSet.GetColumnIndex(const ColumnName: string): Integer;
begin
Result := FindColumn(ColumnName);

//if Result < 1 then
//  raise EZSQLException.Create(Format(SColumnWasNotFound, [ColumnName]));
end;








Bu yazıya puan verin: 1 Puan2 Puan3 Puan4 Puan5 Puan6 Puan7 Puan8 Puan9 Puan10 Puan


Biraz gürültü yapın





Not: Yazdığınız yorum yönetici tarafından onaylandıktan sonra yayınlanacaktır.


  Yorumlara eposta ile abone ol




  • Hakkında | İletişim | Wordpress.org | RSS | Abone Ol

  • (c) 2005-2009 Wordpress Tema: Tankado & Theme by Tankado.com