Veri cekmeye calışırken .Ekteki hatayı alıyorum.
var uForm:TclStyleForm; clProGrid: TCLProGrid; selectQuery : TclSqlQuery;
void AddDataToGrid { try selectQuery.SQL.Text = 'SELECT CARI_ADI , CARI_ULKE from TBLCARISB'; selectQuery.Open; if (selectQuery.Found) { uForm.RemoveGridBinding('mylink'); uForm.AddNewGridBinding(clProGrid,selectQuery, 'mylink'); } else { ShowMessage('Kayıt bulunamadı!'); } except ShowMessage('Exception class: '+LastExceptionClassName+' Exception Message: ' +LastExceptionMessage); } }
{ uForm= TclStyleForm.Create(Self); uForm.clSetStyle(uForm.LightSB); clProGrid = uForm.AddNewProGrid(uForm, 'clProGrid'); clProGrid.BeginUpdate; uForm.AddNewEvent(clProGrid,tbeOnProGridCellDblClick,'SummaryButtonCellClick'); //GridForm.AddNewEvent(clProGrid,tbeOnProGridCellDblClick,'SummaryButtonCellDblClick'); //clProGrid.OnCellClick = 'CellClick' clProGrid.Align = alClient; clProGrid.Margins.Bottom = 12; clProGrid.NormalLayoutFillColor = clAlphaColor.clHexToColor('#ebf3ff'); clProGrid.FixedLayoutFillColor = clAlphaColor.clBlue; clProGrid.Options.Selection.Mode = smSingleRow;//smSingleRow VEYA smSingleColumn VEYA smNone clProGrid.SelectedLayoutFillColor = clAlphaColor.clHexToColor('#a8c2ff'); //Seçilen Satır Rengi clProGrid.SelectedLayoutFontColor = clAlphaColor.clBlack; //Seçilen Satır Yazı Rengi clProGrid.FocusedLayoutFillColor = clAlphaColor.clHexToColor('#ffffff'); // Seçilen Hücre Rengi //clProGrid.Colors[2,5] = clAlphaColor.clWhite; clProGrid.BandLayoutFillColor = clAlphaColor.clCyan; clProGrid.BandLayoutFontColor = clAlphaColor.clBlack; clProGrid.FocusedLayoutFontColor = clAlphaColor.clBlack; clProGrid.NormalLayoutFontColor = clAlphaColor.clBlack; clProGrid.FixedLayoutFontColor = clAlphaColor.clWhite; clProGrid.Options.ColumnSize.Stretch = false; //clProGrid.Options.ColumnSize.StretchAll = True; clProGrid.AutoSizeColumns(True, 100); // Kolon genişliği ayarlama clProGrid.EndUpdate; selectQuery = TClSqlQuery.Create(nil); Clomosy.DBSQLServerConnect('SQL Server', '172.16.222.94', 'sa', '1', 'CINAR', 50000); selectQuery.Connection = Clomosy.DBSQLServerConnection; AddDataToGrid; uForm.Run; }
uploads/209/Görsel_2024-08-02_saat_16_2024-08-02_16-49-41.45_2024-08-02_16-49-41.00_23cb6168_2024-08-02_16-49-41.jpg" rel="nofollow - uploads/209/Görsel_2024-08-02_saat_16_2024-08-02_16-49-41.45_2024-08-02_16-49-41.00_23cb6168_2024-08-02_16-49-41.jpg
|