• Skip to main content
  • Skip to header right navigation
  • Skip to site footer
CDP Studio logo

CDP Studio

The no-code and full-code software development tool for distributed control systems and HMI

  • Doc
  • Why CDP
    • Software developers
    • Automation engineers
    • Managers
  • Products
    • Automation Designer
    • HMI Designer
    • Maritime HMIs
  • Services
  • Use cases
  • Pricing
  • Try CDP

CDP Studio Documentation

  • DBInterface C++ Classes
  • IDatabaseStatement
  • 5.0.0

IDatabaseStatement Class

(CDP2SQL::IDatabaseStatement)

Abstract interface base for SQL statements. More...

Header: #include <IDatabaseStatement>
  • List of all members, including inherited members

Public Functions

virtual ~IDatabaseStatement()
virtual void Bind(int param, int value) = 0
virtual void Bind(int param, int64_t value) = 0
virtual void Bind(int param, const std::string &value)
virtual void Bind(int param, const char *value) = 0
virtual void Bind(int param, const unsigned char *blobValue, int len) = 0
virtual void Bind(int param, double value) = 0
virtual void Bind(int param, bool value) = 0
virtual void BindNull(int param) = 0
virtual void Close() = 0
virtual void Compile(const std::string &sqlString) = 0
virtual void Execute() = 0
virtual void ExecuteQuery(IDatabaseQuery *qr) = 0
virtual void Reset() = 0

Detailed Description

Abstract interface base for SQL statements.

Concrete implementations are created (and destroyed) by IDatabaseConnection.

Member Function Documentation

[virtual] IDatabaseStatement::~IDatabaseStatement()

Should have virtual destructor for all abstract classes. Must close statement if open.

[pure virtual] void IDatabaseStatement::Bind(int param, int value)

Binds placeholder at position param to integer value value.

[pure virtual] void IDatabaseStatement::Bind(int param, int64_t value)

Binds placeholder at position param to int64_t value value.

[virtual] void IDatabaseStatement::Bind(int param, const std::string &value)

Binds placeholder at position param to string value value.

[pure virtual] void IDatabaseStatement::Bind(int param, const char *value)

Binds placeholder at position param to string value value.

[pure virtual] void IDatabaseStatement::Bind(int param, const unsigned char *blobValue, int len)

Binds placeholder at position param to blobValue with length len.

[pure virtual] void IDatabaseStatement::Bind(int param, double value)

Binds placeholder at position param to floating point value value.

[pure virtual] void IDatabaseStatement::Bind(int param, bool value)

Binds placeholder at position param to boolean value value.

[pure virtual] void IDatabaseStatement::BindNull(int param)

Binds placeholder at position param to SQL NULL.

[pure virtual] void IDatabaseStatement::Close()

Closes and finalizes the statement. Should do any major cleanup on the statement.

[pure virtual] void IDatabaseStatement::Compile(const std::string &sqlString)

Compiles an SQL string for the statment.

[pure virtual] void IDatabaseStatement::Execute()

Executes the statement.

All placeholders must have been bound to values.

[pure virtual] void IDatabaseStatement::ExecuteQuery(IDatabaseQuery *qr)

Executes the query.

[pure virtual] void IDatabaseStatement::Reset()

Resets the statement for reuse.

Remember to re-Bind all placeholder values before calling Execute().

The content of this document is confidential information not to be published without the consent of CDP Technologies AS.

CDP Technologies AS, www.cdpstudio.com

Get started with CDP Studio today

Let us help you take your great ideas and turn them into the products your customer will love.

Try CDP Studio for free
Why CDP Studio?

CDP Technologies AS
Hundsværgata 8,
P.O. Box 144
6001 Ålesund, Norway

Tel: +47 990 80 900
E-mail: info@cdptech.com

Company

About CDP

Contact us

Services

Partners

Blog

Developers

Get started

User manuals

Support

Document download

Release notes

My account

Follow CDP

  • LinkedIn
  • YouTube
  • GitHub

© Copyright 2025 CDP Technologies. Privacy and cookie policy.

Return to top