DotNetDupe
4.0.6
C++17/20 Implementation of the .NET Base Class Library (BCL)
Toggle main menu visibility
Loading...
Searching...
No Matches
SqlConnection.h
Go to the documentation of this file.
1
#pragma once
2
#include "
Common.h
"
3
#include "
System/Data/Common/DbConnection.h
"
4
5
namespace
DotNetDupe
{
6
namespace
System
{
7
namespace
Data
{
8
namespace
SqlClient
{
9
16
class
SqlConnection
:
public
DotNetDupe::System::Data::Common::DbConnection
{
17
private
:
18
struct
Impl;
19
DotNetDupe::System::SmartPointer<Impl>
m_pImpl;
20
21
public
:
23
DOTNETDUPE_API
SqlConnection
();
24
27
DOTNETDUPE_API
SqlConnection
(
const
DotNetDupe::System::String
& sConnectionString);
28
30
DOTNETDUPE_API
~SqlConnection
()
override
;
31
34
DOTNETDUPE_API
DotNetDupe::System::String
GetConnectionString
()
const override
;
35
38
DOTNETDUPE_API
void
SetConnectionString
(
const
DotNetDupe::System::String
& sConnStr)
override
;
39
42
DOTNETDUPE_API
DotNetDupe::System::String
GetDatabaseName
()
const
;
43
46
DOTNETDUPE_API
bool
IsOpen
()
const
;
47
49
DOTNETDUPE_API
void
Open
()
override
;
50
52
DOTNETDUPE_API
void
Close
()
override
;
53
56
DOTNETDUPE_API
DotNetDupe::System::SmartPointer<DotNetDupe::System::Data::Common::DbCommand>
CreateCommand
()
override
;
57
};
58
59
}
60
}
61
}
62
}
Common.h
Defines common cross-platform macros, export decorators, and fundamental types.
DOTNETDUPE_API
#define DOTNETDUPE_API
Platform-specific linkage decoration for exporting or importing library symbols.
Definition
Common.h:20
DbConnection.h
DotNetDupe::System::Data::Common::DbConnection
Represents an abstract connection to an ADO.NET compatible data source.
Definition
DbConnection.h:22
DotNetDupe::System::Data::SqlClient::SqlConnection::Open
void Open() override
Opens a database connection with the property settings specified by the ConnectionString.
Definition
SqlConnection.cpp:81
DotNetDupe::System::Data::SqlClient::SqlConnection::~SqlConnection
~SqlConnection() override
Destructor ensuring connection closure.
DotNetDupe::System::Data::SqlClient::SqlConnection::SqlConnection
SqlConnection()
Initializes a new instance of the SqlConnection class.
Definition
SqlConnection.cpp:23
DotNetDupe::System::Data::SqlClient::SqlConnection::SetConnectionString
void SetConnectionString(const DotNetDupe::System::String &sConnStr) override
Sets the string used to open a SQL database.
Definition
SqlConnection.cpp:50
DotNetDupe::System::Data::SqlClient::SqlConnection::CreateCommand
DotNetDupe::System::SmartPointer< DotNetDupe::System::Data::Common::DbCommand > CreateCommand() override
Creates and returns a SqlCommand object associated with the SqlConnection.
Definition
SqlConnection.cpp:92
DotNetDupe::System::Data::SqlClient::SqlConnection::GetDatabaseName
DotNetDupe::System::String GetDatabaseName() const
Gets the name of the current database.
Definition
SqlConnection.cpp:57
DotNetDupe::System::Data::SqlClient::SqlConnection::IsOpen
bool IsOpen() const
Gets whether the connection is currently open.
Definition
SqlConnection.cpp:61
DotNetDupe::System::Data::SqlClient::SqlConnection::Close
void Close() override
Closes the connection to the database.
Definition
SqlConnection.cpp:87
DotNetDupe::System::Data::SqlClient::SqlConnection::GetConnectionString
DotNetDupe::System::String GetConnectionString() const override
Gets the string used to open a SQL database.
Definition
SqlConnection.cpp:33
DotNetDupe::System::SmartPointer
A unified smart pointer that supports both unique and shared ownership semantics.
Definition
SmartPointer.h:72
DotNetDupe::System::String
Represents text as a sequence of UTF-8 code units with culture-invariant operations.
Definition
String.h:74
DotNetDupe::System::Data::SqlClient
Definition
SqlCommand.h:8
DotNetDupe::System::Data
Definition
DbCommand.h:11
DotNetDupe::System
Definition
Action.h:11
DotNetDupe
Definition
IServiceCollection.h:7
Include
System
Data
SqlClient
SqlConnection.h
Generated by
1.18.0