Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Datenbanken (https://www.delphipraxis.net/15-datenbanken/)
-   -   Delphi Mit TIBTable auf eine Firebird-DB zugreifen. (https://www.delphipraxis.net/144066-mit-tibtable-auf-eine-firebird-db-zugreifen.html)

RWarnecke 29. Nov 2009 08:08

Datenbank: Firebird • Version: 2.1 • Zugriff über: IB

Mit TIBTable auf eine Firebird-DB zugreifen.
 
Hallo zusammen,

ich stelle mich gerade etwas zu doof an. Ich habe mir folgende Form zusammengebaut :
Code:
object Form3: TForm3
  Left = 0
  Top = 0
  Caption = 'Form3'
  ClientHeight = 338
  ClientWidth = 497
  Color = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'Tahoma'
  Font.Style = []
  OldCreateOrder = False
  DesignSize = (
    497
    338)
  PixelsPerInch = 96
  TextHeight = 13
  object DBGrd_1: TDBGrid
    Left = 8
    Top = 8
    Width = 481
    Height = 322
    Anchors = [akLeft, akTop, akRight, akBottom]
    DataSource = DtaSrc_1
    TabOrder = 0
    TitleFont.Charset = DEFAULT_CHARSET
    TitleFont.Color = clWindowText
    TitleFont.Height = -11
    TitleFont.Name = 'Tahoma'
    TitleFont.Style = []
    Columns = <
      item
        Expanded = False
        FieldName = 'ID'
        Width = 23
        Visible = True
      end
      item
        Expanded = False
        FieldName = 'PARENTID'
        Width = 59
        Visible = True
      end
      item
        Expanded = False
        FieldName = 'DESCRIPTION'
        Width = 138
        Visible = True
      end
      item
        Expanded = False
        FieldName = 'SEQUENCE'
        Width = 56
        Visible = True
      end>
  end
  object IBDBS_1: TIBDatabase
    Connected = True
    DatabaseName = '192.168.5.10:S:\Firebird\Code-Orakel.fdb'
    LoginPrompt = True
    DefaultTransaction = IBTrans_1
    TraceFlags = [tfQPrepare, tfQExecute, tfQFetch, tfConnect, tfTransact]
    Left = 448
    Top = 288
  end
  object IBTbl_1: TIBTable
    Database = IBDBS_1
    Transaction = IBTrans_1
    ObjectView = True
    FieldDefs = <
      item
        Name = 'ID'
        Attributes = [faRequired]
        DataType = ftInteger
      end
      item
        Name = 'PARENTID'
        DataType = ftInteger
      end
      item
        Name = 'DESCRIPTION'
        Attributes = [faRequired]
        DataType = ftString
        Size = 50
      end
      item
        Name = 'SEQUENCE'
        Attributes = [faRequired]
        DataType = ftInteger
      end>
    ReadOnly = True
    StoreDefs = True
    TableName = 'CATEGORY'
    Left = 448
    Top = 256
  end
  object IBTrans_1: TIBTransaction
    DefaultDatabase = IBDBS_1
    Left = 416
    Top = 288
  end
  object DtaSrc_1: TDataSource
    DataSet = IBTbl_1
    Left = 448
    Top = 224
  end
end
Wenn ich nun das Programm starte, zeigt er mir im TDBGrid nichts an. Warum ?

RWarnecke 29. Nov 2009 08:15

Re: Mit TIBTable auf eine Firebird-DB zugreifen.
 
Ich habe das Problem selber gelöst. Ich hatte lediglich vergessen IBTbl_1.Open beim Starten des Programms aufzurufen und ich dachte es liegt an der Zuweisung an den Komponenten. :wall:


Alle Zeitangaben in WEZ +1. Es ist jetzt 10:36 Uhr.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz