Hi,
I have a form with two edit boxes. They are mainly used to enter ID number and Description. When i enter values in the edit boxes and click on ok button it should insert newly added ID and Desc to the relevant table.
My Table structure is as follows:
ID : Number - Primary key
Desc: Alpha [100]
I created my database using Paradox.
The code i used is as follows:
Var
ID: Integer;
Desc: String;
qry: TQuery;
ID := StrToInt( Edit1.Text );
Desc := Edit2.Text
qry.Close;
qry.SQL.Clear;
qry.SQL.Add( 'INSERT INTO Table1 ("ID", "Desc"
VALUES (ID, Desc)');
qry.ExecSQL;
But it doesn't seem to be working. Can any one help me out to solve my problem.
Thanks very much,
Sanjna.
I have a form with two edit boxes. They are mainly used to enter ID number and Description. When i enter values in the edit boxes and click on ok button it should insert newly added ID and Desc to the relevant table.
My Table structure is as follows:
ID : Number - Primary key
Desc: Alpha [100]
I created my database using Paradox.
The code i used is as follows:
Var
ID: Integer;
Desc: String;
qry: TQuery;
ID := StrToInt( Edit1.Text );
Desc := Edit2.Text
qry.Close;
qry.SQL.Clear;
qry.SQL.Add( 'INSERT INTO Table1 ("ID", "Desc"
qry.ExecSQL;
But it doesn't seem to be working. Can any one help me out to solve my problem.
Thanks very much,
Sanjna.