Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

inserting into tibtable

Status
Not open for further replies.

sancho1980

Technical User
Nov 25, 2005
15
DE
Hello,
can any of you help me, please. I have a paradox database which I'm trying to convert into an interbase database (called PROTODIC.gdb); I'v made my definitions with IBexpert and now I'm trying to insert a record into one of the tables of that new database. So I added to my Delphi data module the following components:

IBDatabase1: TIBDatabase
IBDatabase1.DataBaseName: C:\database\PROTODIC.GDB

DICENTRIES: TIBTable
DICENTRIES.Database: IBDatabase1
TableName: DICENTRIES
Transaction: DICENTRIESTRANSACTION

DICENTRIESTRANSACTION: TIBTransaction
DefaultDatabase: IBDatabase1

I then tried to insert a new record into DICENTRIES via:

DICENTRIES.Insert;

A look at my database shows that no record was inserted. Fair enough, I thought, because DICENTRIES has a couple of not-null constraints. But then, how do I insert a record into it? I know there is another procedure called TIBTable.InsertRecord(const Values: array of const) but I don't know how to work with the parameters that have to be handed over. Would anyone explain that to me? Or is the problem a completely different one from what I think? Just to make sure you have all the necessary information, here's the sql-code of the DICENTRIES table:

/* Table: DICENTRIES */

CREATE TABLE DICENTRIES (
ID INTEGER NOT NULL,
ASTERM VARCHAR(100) NOT NULL,
ASABK VARCHAR(10),
ASPRGM VARCHAR(15),
ASSEM VARCHAR(100),
ASVERW VARCHAR(100),
ZSTERM VARCHAR(100) NOT NULL,
ZSABK VARCHAR(10),
ZSPRGM VARCHAR(15),
ZSSEM VARCHAR(100),
ZSVERW VARCHAR(100),
ZSQCODE VARCHAR(15),
ASQCODE VARCHAR(15),
AUT VARCHAR(3),
DATUM DATE,
PROJ VARCHAR(20),
REV VARCHAR(1),
ABBILDUNG BLOB sub_type 0 segment size 1,
UPDAUT VARCHAR(3),
UPDDATUM DATE,
AUDIO BLOB sub_type 0 segment size 1,
VIDEO BLOB sub_type 0 segment size 1,
ZSDEF VARCHAR(10000),
ASDEF VARCHAR(10000));

/* Primary keys definition */

ALTER TABLE DICENTRIES ADD PRIMARY KEY (ID);

/* Foreign keys definition */

ALTER TABLE DICENTRIES ADD CONSTRAINT FK_DICENTRIES FOREIGN KEY (AUT) REFERENCES AUTS (AUT) ON DELETE SET DEFAULT ON UPDATE SET DEFAULT;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top