schrei
2007-05-22 11:05:10 UTC
Hello,
I made a simple sql database program.
On the form i inserted a SqlControls.Table object, which i linked to
a 'table:SqlDB.Table' Object.
If i do a test, the result of a sql select statment, has no effect to
the SqlControl object on the form. But if i delete and insert the
SqlControl on the form again, the SqlControl works.
Do i make something wrong, or is that a bug?
Here the source code:
MODULE Test;
IMPORT Dialog, Views, TextModels, TextControllers, SqlDB, SqlControls;
VAR statement*: ARRAY 1024 OF CHAR;
table*: SqlDB.Table; (* anchor for database *)
PROCEDURE Execute*;
VAR res: INTEGER; db: SqlDB.Database;
id, pwd, database, driver: ARRAY 32 OF CHAR;
BEGIN
id := ""; password := "";
database := "Test Database";
driver := SqlOdbc3";
IF table = NIL THEN
SqlDB.debug:=TRUE;
SqlDB.OpenDatabase(driver,id,pwd,database,SqlDB.async,SqlDB.showErrors,db,res);
table := db.NewTable();
END;
table.Exec(statement);
Dialog.Update(table);
END Execute;
BEGIN
END Test.
Yours sincerely
Helmut
I made a simple sql database program.
On the form i inserted a SqlControls.Table object, which i linked to
a 'table:SqlDB.Table' Object.
If i do a test, the result of a sql select statment, has no effect to
the SqlControl object on the form. But if i delete and insert the
SqlControl on the form again, the SqlControl works.
Do i make something wrong, or is that a bug?
Here the source code:
MODULE Test;
IMPORT Dialog, Views, TextModels, TextControllers, SqlDB, SqlControls;
VAR statement*: ARRAY 1024 OF CHAR;
table*: SqlDB.Table; (* anchor for database *)
PROCEDURE Execute*;
VAR res: INTEGER; db: SqlDB.Database;
id, pwd, database, driver: ARRAY 32 OF CHAR;
BEGIN
id := ""; password := "";
database := "Test Database";
driver := SqlOdbc3";
IF table = NIL THEN
SqlDB.debug:=TRUE;
SqlDB.OpenDatabase(driver,id,pwd,database,SqlDB.async,SqlDB.showErrors,db,res);
table := db.NewTable();
END;
table.Exec(statement);
Dialog.Update(table);
END Execute;
BEGIN
END Test.
Yours sincerely
Helmut