nanodbc
A small C++ wrapper for the native C ODBC API
Loading...
Searching...
No Matches
nanodbc::attribute Class Reference

A class representing a connection or a statement attribute. More...

#include <nanodbc.h>

Public Member Functions

 attribute (long const &attribute, long const &string_length, std::uintptr_t value_ptr) noexcept
 Creates an attribute from the three arguments the ODBC call takes.
 

Protected Attributes

long attribute_
 The Attribute argument of the ODBC call.
 
long string_length_
 The StringLength argument of the ODBC call.
 
void * value_ptr_
 The ValuePtr argument of the ODBC call.
 

Detailed Description

A class representing a connection or a statement attribute.

This is the variant-free form, used where std::variant is unavailable. The caller owns whatever value_ptr refers to and must keep it alive for as long as the attribute is used.

See https://learn.microsoft.com/en-us/sql/odbc/reference/syntax/sqlsetconnectattr-function

Constructor & Destructor Documentation

◆ attribute()

nanodbc::attribute::attribute ( long const &  attribute,
long const &  string_length,
std::uintptr_t  value_ptr 
)
inlinenoexcept

Creates an attribute from the three arguments the ODBC call takes.

Parameters
attributeThe Attribute argument of SQLSetConnectAttr or SQLSetStmtAttr.
string_lengthThe StringLength argument.
value_ptrThe ValuePtr argument, as an integer or a pointer.

The documentation for this class was generated from the following file: