Delphi + INAP: Invalid statement error
Posted in 2000
Hello, I have the following piece of code - IDatabase and IQuery are global variables (no TForm or TDatamodule) and are constructed properly. code snippet: IDatabase.InformixServer := 'testhost'; IDatabase.Host := 'testhost'; IDatabase.Service := 'port_number'; Database.Protocol := 'onsoctcp'; IDatabase.DatabaseName := 'testdb'; IDatabase.User := 'user'; IDatabase.Password := 'password'; IDatabase.Open; IQuery.DatabaseName := IDatabase; IQuery.SQL.Clear; IQuery.SQL.Add ('execute procedure char2int ("1")'); (i) IQuery.ExecSQL; The problem is that at (i), Exception TIfxException with message "TIfxStatement.Execute: Invalid statement type" is raised. I am not able to guess where the problem is. When I enter the same query with the same DB environment to the SQL Query utility (from expectit.de), I get the correct result (char2int is a test procedure which converts string to integer) and no errors. TIA, Ondrej Krajicek -- OK-)