Select Table TOracleQuery

ulrich

Member
Hi,

sorry, but since I'm a newbie in this area I have the following silly question:
I like to append records to an existing database and like to manage this with TOracleQuery.
But how do I select the database for SetVariable?

Thank you for your support.

Ulrich
 
But how do I select the database for SetVariable?
What exactly do you mean by this? You select a database during TOracleSession.LogOn by specifying the LogonDatabase property.
 
Sorry for not being precise:

I meant the table. The table you address with into in a SQL command.

Ulrich
 
Last edited:
Normally the table name will be a static part of your SQL Text. If you need to pass the table name as a variable (which is quite unusual) you can use a substitution variable (variable type otSubst).
 
Thank you.
But obviously I haven't got the basics ... :-(
I want to insert something into a certain table by using TOracleQuery and setting up an insert query with SetVariable statements.

Like this:
try
with InsertQuery do
begin
SetVariable( ... );
:
SetVariable( ... );
Execute;
end;
except ...

To address my table I have to add a SQL statement?
I haven't got how to mix up SetVariable and SQL statments. :-(

Regards

Ulrich
 
You will indeed need to set the SQL.Text, either at design-time or at run-time. The User's Guide and demo projects contain several examples.
 
Back
Top