<div class="meta" robots="noindex">

</div>

Method

# ODBCDatabase.SetConnectionAttribute

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

<div class="warning">

<div class="title">

Warning

</div>

This item was deprecated in version 2019r2. Please use `ODBCDatabase.ConnectionAttribute<odbcdatabase.connectionattribute>` as a replacement.

</div>

## Description

Sets attributes that govern aspects of connections.

## Notes

The attribute can be specified using the `ODBCConstant</api/databases/odbcconstant>` constants. The value is only set after the connection is made. Only `Integer</api/data_types/integer>` attributes may be set with this method. To set a `String</api/data_types/string>` attribute before the connection is made, see the Attribute property.

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

### References

[SQLSetConnectAttr ODBC function](http://msdn.microsoft.com/en-us/library/windows/desktop/ms713605(v=vs.85).aspx)

## Sample code

Setting an attribute to disable AutoCommit:

``` xojo
db.SetConnectionAttribute(ODBCConstant.SQL_AUTOCOMMIT, ODBCConstant.SQL_AUTOCOMMIT_OFF)
```

## Compatibility

All project types on all supported operating systems.
