|GNOME Data Access manual|
It can be made, more or less, as in the old version, using gda_command_new(), but now, this function needs a few parameters and, in this version, you do not link a command to a connection, so you execute a command in a connection as we'll see later. You can see how to create commands and examples about this here.
Non queries are queries that do not return data, as insertions, deletions, and so on. The function we use is gda_connection_execute_non_query () and returns the number of affected tuples or -1 in case of error. Here you see an example.
It is better not to execute more than one SQL sentence for each command because the result can be unexpected.
As you can see in the following example, the function we use to obtain data from a SQL sentence is gda_connection_execute_single_command () and needs the parameters of non queries. The difference is that now the function returns the data model or NULL in case of error.
As in the case of non queries, you must not use several semicolon-separated sentences, because you have a special function to do this, but it is not recommended.
|||Now you have a GdaRecordsetclass, but it is not recommended.|
|<<< Configuration and connections||Managing data >>>|