ODBC Extensions

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Jörg Burdorf
User
User
Posts: 22
Joined: Sun Dec 16, 2018 12:54 pm

ODBC Extensions

Post by Jörg Burdorf »

Hi !

To extend the ODBC funtionality here ars some ideas:

1. Transactions.

That means, there is a SQL block something like that:

begin transaction
update table set field = 'this is a test' where field is ''
if sqlcode = 0 then
commit
else
rollback

2. Query Timeout parameter

This parameter defines the timeout in seconds, so the query not runs forever.
for example

querytimeout=60

the query terminates after 60 seconds.

This is a global ODBC parameter.

3. Additional Parameters in the Connection String:

Normaly the ODBC connection string looks like

DSN=mydb;Uid=myuser;Using=password;

Some DB systems allow to send additional Parameters with the connection string:

DSN=mydb;Uid=myuser;Using=password;Autocommit=0;clientfunctionpath='MYPATH';