-
Notifications
You must be signed in to change notification settings - Fork 0
Some simple examples
Paul Reeves edited this page Oct 4, 2024
·
1 revision
Examples
Select:
execute block returns (id varchar(20), n decimal(15,3)) as
begin
for execute statement
'select id, n from test_table'
on external 'odbc://dBase'
into :id, :n DO
suspend;
end^Insert:
execute block (id varchar(20), n decimal(15,3)) as
begin
execute statement
'insert into test_table(id, n) values (?,?)'
(:id, :n)
on external 'odbc://dBase';
end^Update:
execute block (id varchar(20), n decimal(15,3)) as
begin
execute statement
'update test_table set n = ? where id = ?'
(:n, :id)
on external 'odbc://dBase';
end^Delete:
execute block (id varchar(20)) as
begin
execute statement
'delete from test_table where id = ?'
(:id)
on external 'odbc://dBase';
end^Where 'dBase' is what is passed to the ODBC SQLDriverConnect() function, i.e. DSN