mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2026-08-03 22:37:12 +02:00
Major plugin refactor and cleanup.
Switched to POCO library for unified platform/library interface. Deprecated the external module API. It was creating more problems than solving. Removed most built-in libraries in favor of system libraries for easier maintenance. Cleaned and secured code with help from static analyzers.
This commit is contained in:
Vendored
+38
@@ -0,0 +1,38 @@
|
||||
# Sources
|
||||
file(GLOB SRCS_G "src/*.cpp")
|
||||
POCO_SOURCES_AUTO(ODBC_SRCS ${SRCS_G})
|
||||
|
||||
# Headers
|
||||
file(GLOB_RECURSE HDRS_G "include/*.h")
|
||||
POCO_HEADERS_AUTO(ODBC_SRCS ${HDRS_G})
|
||||
|
||||
# Version Resource
|
||||
if(MSVC AND BUILD_SHARED_LIBS)
|
||||
source_group("Resources" FILES ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
list(APPEND ODBC_SRCS ${PROJECT_SOURCE_DIR}/DLLVersion.rc)
|
||||
endif()
|
||||
|
||||
add_library(DataODBC ${ODBC_SRCS})
|
||||
add_library(Poco::DataODBC ALIAS DataODBC)
|
||||
set_target_properties(DataODBC
|
||||
PROPERTIES
|
||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION}
|
||||
OUTPUT_NAME PocoDataODBC
|
||||
DEFINE_SYMBOL ODBC_EXPORTS
|
||||
)
|
||||
|
||||
target_link_libraries(DataODBC PUBLIC Poco::Data ODBC::ODBC)
|
||||
target_include_directories(DataODBC
|
||||
PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||
$<INSTALL_INTERFACE:include>
|
||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
|
||||
)
|
||||
target_compile_definitions(DataODBC PUBLIC THREADSAFE)
|
||||
|
||||
POCO_INSTALL(DataODBC)
|
||||
POCO_GENERATE_PACKAGE(DataODBC)
|
||||
|
||||
if(ENABLE_TESTS)
|
||||
add_subdirectory(testsuite)
|
||||
endif()
|
||||
Vendored
+19
@@ -0,0 +1,19 @@
|
||||
#
|
||||
# Makefile
|
||||
#
|
||||
# Makefile for Poco ODBC
|
||||
#
|
||||
|
||||
include $(POCO_BASE)/build/rules/global
|
||||
|
||||
include ODBC.make
|
||||
|
||||
objects = Binder ConnectionHandle Connector EnvironmentHandle \
|
||||
Extractor ODBCException ODBCMetaColumn ODBCStatementImpl \
|
||||
Parameter Preparator SessionImpl TypeInfo Unicode Utility
|
||||
|
||||
target = PocoDataODBC
|
||||
target_version = $(LIBVERSION)
|
||||
target_libs = PocoData PocoFoundation
|
||||
|
||||
include $(POCO_BASE)/build/rules/lib
|
||||
Vendored
+65
@@ -0,0 +1,65 @@
|
||||
#
|
||||
# ODBC.make
|
||||
#
|
||||
# Makefile fragment for finding ODBC library
|
||||
#
|
||||
|
||||
ifndef POCO_ODBC_INCLUDE
|
||||
POCO_ODBC_INCLUDE = /usr/include
|
||||
endif
|
||||
|
||||
ifndef POCO_ODBC_LIB
|
||||
ifeq (0, $(shell test -d /usr/lib/$(OSARCH)-linux-gnu; echo $$?))
|
||||
POCO_ODBC_LIB = /usr/lib/$(OSARCH)-linux-gnu
|
||||
else ifeq (0, $(shell test -d /usr/lib64; echo $$?))
|
||||
POCO_ODBC_LIB = /usr/lib64
|
||||
else
|
||||
POCO_ODBC_LIB = /usr/lib
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(LINKMODE),STATIC)
|
||||
LIBLINKEXT = .a
|
||||
else
|
||||
ifeq ($(OSNAME), CYGWIN)
|
||||
LIBLINKEXT = $(IMPLIBLINKEXT)
|
||||
else
|
||||
LIBLINKEXT = $(SHAREDLIBLINKEXT)
|
||||
endif
|
||||
endif
|
||||
|
||||
INCLUDE += -I$(POCO_ODBC_INCLUDE)
|
||||
SYSLIBS += -L$(POCO_ODBC_LIB)
|
||||
|
||||
##
|
||||
## MinGW
|
||||
##
|
||||
ifeq ($(POCO_CONFIG),MinGW)
|
||||
# -DODBCVER=0x0300: SQLHandle declaration issue
|
||||
# -DNOMINMAX : MIN/MAX macros defined in windows conflict with libstdc++
|
||||
CXXFLAGS += -DODBCVER=0x0300 -DNOMINMAX
|
||||
|
||||
##
|
||||
## unixODBC
|
||||
##
|
||||
else ifeq (0, $(shell test -e $(POCO_ODBC_LIB)/libodbc$(LIBLINKEXT); echo $$?))
|
||||
SYSLIBS += -lodbc
|
||||
ifeq (0, $(shell test -e $(POCO_ODBC_LIB)/libodbcinst$(LIBLINKEXT); echo $$?))
|
||||
SYSLIBS += -lodbcinst
|
||||
endif
|
||||
COMMONFLAGS += -DPOCO_UNIXODBC
|
||||
|
||||
##
|
||||
## iODBC
|
||||
##
|
||||
else ifeq (0, $(shell test -e $(POCO_ODBC_LIB)/libiodbc$(LIBLINKEXT); echo $$?))
|
||||
SYSLIBS += -liodbc -liodbcinst
|
||||
COMMONFLAGS += -DPOCO_IODBC -I/usr/include/iodbc
|
||||
|
||||
# TODO: OSX >= 10.8 deprecated non-Unicode ODBC API functions, silence warnings until iODBC Unicode support
|
||||
COMMONFLAGS += -Wno-deprecated-declarations
|
||||
|
||||
else
|
||||
$(error No ODBC library found. Please install unixODBC or iODBC or specify POCO_ODBC_LIB and try again)
|
||||
endif
|
||||
|
||||
Vendored
+17
@@ -0,0 +1,17 @@
|
||||
vc.project.guid = 1B29820D-375F-11DB-837B-00123FC423B5
|
||||
vc.project.name = ODBC
|
||||
vc.project.target = PocoDataODBC
|
||||
vc.project.type = library
|
||||
vc.project.pocobase = ..\\..
|
||||
vc.project.outdir = ${vc.project.pocobase}
|
||||
vc.project.platforms = Win32
|
||||
vc.project.configurations = debug_shared, release_shared, debug_static_mt, release_static_mt, debug_static_md, release_static_md
|
||||
vc.project.prototype = ${vc.project.name}_vs90.vcproj
|
||||
vc.project.compiler.include = ..\\..\\Foundation\\include;..\\..\\Data\\include
|
||||
vc.project.compiler.defines = THREADSAFE
|
||||
vc.project.compiler.defines.shared = ${vc.project.name}_EXPORTS
|
||||
vc.project.compiler.defines.debug_shared = ${vc.project.compiler.defines.shared}
|
||||
vc.project.compiler.defines.release_shared = ${vc.project.compiler.defines.shared}
|
||||
vc.project.linker.dependencies = odbc32.lib odbccp32.lib
|
||||
vc.solution.create = true
|
||||
vc.solution.include = testsuite\\TestSuite
|
||||
Vendored
+60
@@ -0,0 +1,60 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 10.00
|
||||
# Visual Studio 2008
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ODBC", "ODBC_vs90.vcproj", "{1B29820D-375F-11DB-837B-00123FC423B5}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestSuite", "testsuite\TestSuite_vs90.vcproj", "{00627063-395B-4413-9099-23BDB56562FA}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5} = {1B29820D-375F-11DB-837B-00123FC423B5}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
debug_shared|Win32 = debug_shared|Win32
|
||||
release_shared|Win32 = release_shared|Win32
|
||||
debug_static_mt|Win32 = debug_static_mt|Win32
|
||||
release_static_mt|Win32 = release_static_mt|Win32
|
||||
debug_static_md|Win32 = debug_static_md|Win32
|
||||
release_static_md|Win32 = release_static_md|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.debug_shared|Win32.ActiveCfg = debug_shared|Win32
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.debug_shared|Win32.Build.0 = debug_shared|Win32
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.debug_shared|Win32.Deploy.0 = debug_shared|Win32
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.release_shared|Win32.ActiveCfg = release_shared|Win32
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.release_shared|Win32.Build.0 = release_shared|Win32
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.release_shared|Win32.Deploy.0 = release_shared|Win32
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.release_static_mt|Win32.Build.0 = release_static_mt|Win32
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.debug_static_md|Win32.Build.0 = debug_static_md|Win32
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.debug_static_md|Win32.Deploy.0 = debug_static_md|Win32
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.release_static_md|Win32.ActiveCfg = release_static_md|Win32
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.release_static_md|Win32.Build.0 = release_static_md|Win32
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.release_static_md|Win32.Deploy.0 = release_static_md|Win32
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.debug_shared|Win32.ActiveCfg = debug_shared|Win32
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.debug_shared|Win32.Build.0 = debug_shared|Win32
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.debug_shared|Win32.Deploy.0 = debug_shared|Win32
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.release_shared|Win32.ActiveCfg = release_shared|Win32
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.release_shared|Win32.Build.0 = release_shared|Win32
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.release_shared|Win32.Deploy.0 = release_shared|Win32
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.release_static_mt|Win32.Build.0 = release_static_mt|Win32
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.debug_static_md|Win32.Build.0 = debug_static_md|Win32
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.debug_static_md|Win32.Deploy.0 = debug_static_md|Win32
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.release_static_md|Win32.ActiveCfg = release_static_md|Win32
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.release_static_md|Win32.Build.0 = release_static_md|Win32
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.release_static_md|Win32.Deploy.0 = release_static_md|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
+787
@@ -0,0 +1,787 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9.00"
|
||||
Name="ODBC"
|
||||
ProjectGUID="{1B29820D-375F-11DB-837B-00123FC423B5}"
|
||||
RootNamespace="ODBC"
|
||||
Keyword="Win32Proj"
|
||||
TargetFrameworkVersion="0"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="debug_shared|Win32"
|
||||
OutputDirectory="obj\$(ConfigurationName)"
|
||||
IntermediateDirectory="obj\$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalOptions=""
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=".\include;..\..\Foundation\include;..\..\Data\include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;THREADSAFE;ODBC_EXPORTS"
|
||||
StringPooling="true"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
BufferSecurityCheck="true"
|
||||
TreatWChar_tAsBuiltInType="true"
|
||||
ForceConformanceInForLoopScope="true"
|
||||
RuntimeTypeInfo="true"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="3"
|
||||
CompileAs="0"
|
||||
DisableSpecificWarnings=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalOptions=""
|
||||
AdditionalDependencies="odbc32.lib odbccp32.lib"
|
||||
OutputFile="..\..\bin\PocoDataODBCd.dll"
|
||||
LinkIncremental="2"
|
||||
SuppressStartupBanner="true"
|
||||
AdditionalLibraryDirectories="..\..\lib"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="..\..\bin\PocoDataODBCd.pdb"
|
||||
SubSystem="1"
|
||||
ImportLibrary="..\..\lib\PocoDataODBCd.lib"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="release_shared|Win32"
|
||||
OutputDirectory="obj\$(ConfigurationName)"
|
||||
IntermediateDirectory="obj\$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalOptions=""
|
||||
Optimization="4"
|
||||
InlineFunctionExpansion="1"
|
||||
EnableIntrinsicFunctions="true"
|
||||
FavorSizeOrSpeed="1"
|
||||
OmitFramePointers="true"
|
||||
AdditionalIncludeDirectories=".\include;..\..\Foundation\include;..\..\Data\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;THREADSAFE;ODBC_EXPORTS"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="2"
|
||||
BufferSecurityCheck="false"
|
||||
TreatWChar_tAsBuiltInType="true"
|
||||
ForceConformanceInForLoopScope="true"
|
||||
RuntimeTypeInfo="true"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="0"
|
||||
CompileAs="0"
|
||||
DisableSpecificWarnings=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalOptions=""
|
||||
AdditionalDependencies="odbc32.lib odbccp32.lib"
|
||||
OutputFile="..\..\bin\PocoDataODBC.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
AdditionalLibraryDirectories="..\..\lib"
|
||||
GenerateDebugInformation="false"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
ImportLibrary="..\..\lib\PocoDataODBC.lib"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="debug_static_mt|Win32"
|
||||
OutputDirectory="obj\$(ConfigurationName)"
|
||||
IntermediateDirectory="obj\$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalOptions=""
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=".\include;..\..\Foundation\include;..\..\Data\include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;POCO_STATIC;THREADSAFE"
|
||||
StringPooling="true"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
BufferSecurityCheck="true"
|
||||
TreatWChar_tAsBuiltInType="true"
|
||||
ForceConformanceInForLoopScope="true"
|
||||
RuntimeTypeInfo="true"
|
||||
UsePrecompiledHeader="0"
|
||||
ProgramDataBaseFileName="..\..\lib\PocoDataODBCMTd.pdb"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="3"
|
||||
CompileAs="0"
|
||||
DisableSpecificWarnings=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile="..\..\lib\PocoDataODBCMTd.lib"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="release_static_mt|Win32"
|
||||
OutputDirectory="obj\$(ConfigurationName)"
|
||||
IntermediateDirectory="obj\$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalOptions=""
|
||||
Optimization="4"
|
||||
InlineFunctionExpansion="1"
|
||||
EnableIntrinsicFunctions="true"
|
||||
FavorSizeOrSpeed="1"
|
||||
OmitFramePointers="true"
|
||||
AdditionalIncludeDirectories=".\include;..\..\Foundation\include;..\..\Data\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;POCO_STATIC;THREADSAFE"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="0"
|
||||
BufferSecurityCheck="false"
|
||||
TreatWChar_tAsBuiltInType="true"
|
||||
ForceConformanceInForLoopScope="true"
|
||||
RuntimeTypeInfo="true"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="0"
|
||||
CompileAs="0"
|
||||
DisableSpecificWarnings=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile="..\..\lib\PocoDataODBCMT.lib"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="debug_static_md|Win32"
|
||||
OutputDirectory="obj\$(ConfigurationName)"
|
||||
IntermediateDirectory="obj\$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalOptions=""
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=".\include;..\..\Foundation\include;..\..\Data\include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;POCO_STATIC;THREADSAFE"
|
||||
StringPooling="true"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
BufferSecurityCheck="true"
|
||||
TreatWChar_tAsBuiltInType="true"
|
||||
ForceConformanceInForLoopScope="true"
|
||||
RuntimeTypeInfo="true"
|
||||
UsePrecompiledHeader="0"
|
||||
ProgramDataBaseFileName="..\..\lib\PocoDataODBCMDd.pdb"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="3"
|
||||
CompileAs="0"
|
||||
DisableSpecificWarnings=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile="..\..\lib\PocoDataODBCMDd.lib"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="release_static_md|Win32"
|
||||
OutputDirectory="obj\$(ConfigurationName)"
|
||||
IntermediateDirectory="obj\$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalOptions=""
|
||||
Optimization="4"
|
||||
InlineFunctionExpansion="1"
|
||||
EnableIntrinsicFunctions="true"
|
||||
FavorSizeOrSpeed="1"
|
||||
OmitFramePointers="true"
|
||||
AdditionalIncludeDirectories=".\include;..\..\Foundation\include;..\..\Data\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;POCO_STATIC;THREADSAFE"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="2"
|
||||
BufferSecurityCheck="false"
|
||||
TreatWChar_tAsBuiltInType="true"
|
||||
ForceConformanceInForLoopScope="true"
|
||||
RuntimeTypeInfo="true"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="0"
|
||||
CompileAs="0"
|
||||
DisableSpecificWarnings=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile="..\..\lib\PocoDataODBCMD.lib"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="ODBC"
|
||||
>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Data\ODBC\Binder.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Data\ODBC\ConnectionHandle.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Data\ODBC\Connector.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Data\ODBC\Diagnostics.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Data\ODBC\EnvironmentHandle.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Data\ODBC\Error.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Data\ODBC\Extractor.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Data\ODBC\Handle.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Data\ODBC\ODBC.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Data\ODBC\ODBCException.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Data\ODBC\ODBCMetaColumn.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Data\ODBC\ODBCStatementImpl.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Data\ODBC\Parameter.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Data\ODBC\Preparator.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Data\ODBC\SessionImpl.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Data\ODBC\TypeInfo.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Data\ODBC\Unicode.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Data\ODBC\Unicode_UNIXODBC.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Data\ODBC\Unicode_WIN32.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Data\ODBC\Utility.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\src\Binder.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\ConnectionHandle.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\Connector.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\EnvironmentHandle.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\Extractor.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\ODBCException.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\ODBCMetaColumn.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\ODBCStatementImpl.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\Parameter.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\Preparator.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\SessionImpl.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\TypeInfo.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\Unicode.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\Unicode_UNIXODBC.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="debug_shared|Win32"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="release_shared|Win32"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="debug_static_mt|Win32"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="release_static_mt|Win32"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="debug_static_md|Win32"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="release_static_md|Win32"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\Unicode_WIN32.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="debug_shared|Win32"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="release_shared|Win32"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="debug_static_mt|Win32"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="release_static_mt|Win32"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="debug_static_md|Win32"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="release_static_md|Win32"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\Utility.cpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<File
|
||||
RelativePath="..\..\DLLVersion.rc"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="debug_static_mt|Win32"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="release_static_mt|Win32"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="debug_static_md|Win32"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="release_static_md|Win32"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
||||
Vendored
+102
@@ -0,0 +1,102 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 14
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ODBC", "ODBC_vs140.vcxproj", "{1B29820D-375F-11DB-837B-00123FC423B5}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestSuite", "testsuite\TestSuite_vs140.vcxproj", "{00627063-395B-4413-9099-23BDB56562FA}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5} = {1B29820D-375F-11DB-837B-00123FC423B5}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
debug_shared|Win32 = debug_shared|Win32
|
||||
release_shared|Win32 = release_shared|Win32
|
||||
debug_static_mt|Win32 = debug_static_mt|Win32
|
||||
release_static_mt|Win32 = release_static_mt|Win32
|
||||
debug_static_md|Win32 = debug_static_md|Win32
|
||||
release_static_md|Win32 = release_static_md|Win32
|
||||
debug_shared|x64 = debug_shared|x64
|
||||
release_shared|x64 = release_shared|x64
|
||||
debug_static_mt|x64 = debug_static_mt|x64
|
||||
release_static_mt|x64 = release_static_mt|x64
|
||||
debug_static_md|x64 = debug_static_md|x64
|
||||
release_static_md|x64 = release_static_md|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.debug_shared|Win32.ActiveCfg = debug_shared|Win32
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.debug_shared|Win32.Build.0 = debug_shared|Win32
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.debug_shared|Win32.Deploy.0 = debug_shared|Win32
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.release_shared|Win32.ActiveCfg = release_shared|Win32
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.release_shared|Win32.Build.0 = release_shared|Win32
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.release_shared|Win32.Deploy.0 = release_shared|Win32
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.release_static_mt|Win32.Build.0 = release_static_mt|Win32
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.debug_static_md|Win32.Build.0 = debug_static_md|Win32
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.debug_static_md|Win32.Deploy.0 = debug_static_md|Win32
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.release_static_md|Win32.ActiveCfg = release_static_md|Win32
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.release_static_md|Win32.Build.0 = release_static_md|Win32
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.release_static_md|Win32.Deploy.0 = release_static_md|Win32
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.debug_shared|x64.ActiveCfg = debug_shared|x64
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.debug_shared|x64.Build.0 = debug_shared|x64
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.debug_shared|x64.Deploy.0 = debug_shared|x64
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.release_shared|x64.ActiveCfg = release_shared|x64
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.release_shared|x64.Build.0 = release_shared|x64
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.release_shared|x64.Deploy.0 = release_shared|x64
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.debug_static_mt|x64.ActiveCfg = debug_static_mt|x64
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.debug_static_mt|x64.Build.0 = debug_static_mt|x64
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.debug_static_mt|x64.Deploy.0 = debug_static_mt|x64
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.release_static_mt|x64.ActiveCfg = release_static_mt|x64
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.release_static_mt|x64.Build.0 = release_static_mt|x64
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.release_static_mt|x64.Deploy.0 = release_static_mt|x64
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.debug_static_md|x64.ActiveCfg = debug_static_md|x64
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.debug_static_md|x64.Build.0 = debug_static_md|x64
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.debug_static_md|x64.Deploy.0 = debug_static_md|x64
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.release_static_md|x64.ActiveCfg = release_static_md|x64
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.release_static_md|x64.Build.0 = release_static_md|x64
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.release_static_md|x64.Deploy.0 = release_static_md|x64
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.debug_shared|Win32.ActiveCfg = debug_shared|Win32
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.debug_shared|Win32.Build.0 = debug_shared|Win32
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.debug_shared|Win32.Deploy.0 = debug_shared|Win32
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.release_shared|Win32.ActiveCfg = release_shared|Win32
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.release_shared|Win32.Build.0 = release_shared|Win32
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.release_shared|Win32.Deploy.0 = release_shared|Win32
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.release_static_mt|Win32.Build.0 = release_static_mt|Win32
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.debug_static_md|Win32.Build.0 = debug_static_md|Win32
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.debug_static_md|Win32.Deploy.0 = debug_static_md|Win32
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.release_static_md|Win32.ActiveCfg = release_static_md|Win32
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.release_static_md|Win32.Build.0 = release_static_md|Win32
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.release_static_md|Win32.Deploy.0 = release_static_md|Win32
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.debug_shared|x64.ActiveCfg = debug_shared|x64
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.debug_shared|x64.Build.0 = debug_shared|x64
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.debug_shared|x64.Deploy.0 = debug_shared|x64
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.release_shared|x64.ActiveCfg = release_shared|x64
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.release_shared|x64.Build.0 = release_shared|x64
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.release_shared|x64.Deploy.0 = release_shared|x64
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.debug_static_mt|x64.ActiveCfg = debug_static_mt|x64
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.debug_static_mt|x64.Build.0 = debug_static_mt|x64
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.debug_static_mt|x64.Deploy.0 = debug_static_mt|x64
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.release_static_mt|x64.ActiveCfg = release_static_mt|x64
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.release_static_mt|x64.Build.0 = release_static_mt|x64
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.release_static_mt|x64.Deploy.0 = release_static_mt|x64
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.debug_static_md|x64.ActiveCfg = debug_static_md|x64
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.debug_static_md|x64.Build.0 = debug_static_md|x64
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.debug_static_md|x64.Deploy.0 = debug_static_md|x64
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.release_static_md|x64.ActiveCfg = release_static_md|x64
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.release_static_md|x64.Build.0 = release_static_md|x64
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.release_static_md|x64.Deploy.0 = release_static_md|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
+658
@@ -0,0 +1,658 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="debug_shared|Win32">
|
||||
<Configuration>debug_shared</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="debug_shared|x64">
|
||||
<Configuration>debug_shared</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="debug_static_md|Win32">
|
||||
<Configuration>debug_static_md</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="debug_static_md|x64">
|
||||
<Configuration>debug_static_md</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="debug_static_mt|Win32">
|
||||
<Configuration>debug_static_mt</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="debug_static_mt|x64">
|
||||
<Configuration>debug_static_mt</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="release_shared|Win32">
|
||||
<Configuration>release_shared</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="release_shared|x64">
|
||||
<Configuration>release_shared</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="release_static_md|Win32">
|
||||
<Configuration>release_static_md</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="release_static_md|x64">
|
||||
<Configuration>release_static_md</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="release_static_mt|Win32">
|
||||
<Configuration>release_static_mt</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="release_static_mt|x64">
|
||||
<Configuration>release_static_mt</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectName>ODBC</ProjectName>
|
||||
<ProjectGuid>{1B29820D-375F-11DB-837B-00123FC423B5}</ProjectGuid>
|
||||
<RootNamespace>ODBC</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props"/>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props"/>
|
||||
<ImportGroup Label="ExtensionSettings"/>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros"/>
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>14.0.25420.1</_ProjectFileVersion>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">PocoDataODBCd</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">PocoDataODBCmdd</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">PocoDataODBCmtd</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">PocoDataODBC</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">PocoDataODBCmd</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">PocoDataODBCmt</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">PocoDataODBC64d</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">PocoDataODBCmdd</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">PocoDataODBCmtd</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">PocoDataODBC64</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">PocoDataODBCmd</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">PocoDataODBCmt</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">
|
||||
<OutDir>..\..\bin\</OutDir>
|
||||
<IntDir>obj\ODBC\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">
|
||||
<OutDir>..\..\bin\</OutDir>
|
||||
<IntDir>obj\ODBC\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">
|
||||
<OutDir>..\..\lib\</OutDir>
|
||||
<IntDir>obj\ODBC\$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">
|
||||
<OutDir>..\..\lib\</OutDir>
|
||||
<IntDir>obj\ODBC\$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">
|
||||
<OutDir>..\..\lib\</OutDir>
|
||||
<IntDir>obj\ODBC\$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">
|
||||
<OutDir>..\..\lib\</OutDir>
|
||||
<IntDir>obj\ODBC\$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">
|
||||
<OutDir>..\..\bin64\</OutDir>
|
||||
<IntDir>obj64\ODBC\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">
|
||||
<OutDir>..\..\bin64\</OutDir>
|
||||
<IntDir>obj64\ODBC\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">
|
||||
<OutDir>..\..\lib64\</OutDir>
|
||||
<IntDir>obj64\ODBC\$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">
|
||||
<OutDir>..\..\lib64\</OutDir>
|
||||
<IntDir>obj64\ODBC\$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">
|
||||
<OutDir>..\..\lib64\</OutDir>
|
||||
<IntDir>obj64\ODBC\$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">
|
||||
<OutDir>..\..\lib64\</OutDir>
|
||||
<IntDir>obj64\ODBC\$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;THREADSAFE;ODBC_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>..\..\bin\PocoDataODBCd.dll</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>..\..\bin\PocoDataODBCd.pdb</ProgramDatabaseFile>
|
||||
<AdditionalLibraryDirectories>..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<ImportLibrary>..\..\lib\PocoDataODBCd.lib</ImportLibrary>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;THREADSAFE;ODBC_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat/>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>..\..\bin\PocoDataODBC.dll</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<AdditionalLibraryDirectories>..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<ImportLibrary>..\..\lib\PocoDataODBC.lib</ImportLibrary>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;POCO_STATIC;THREADSAFE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<ProgramDataBaseFileName>..\..\lib\PocoDataODBCmtd.pdb</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Lib>
|
||||
<OutputFile>..\..\lib\PocoDataODBCmtd.lib</OutputFile>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;POCO_STATIC;THREADSAFE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat/>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Lib>
|
||||
<OutputFile>..\..\lib\PocoDataODBCmt.lib</OutputFile>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;POCO_STATIC;THREADSAFE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<ProgramDataBaseFileName>..\..\lib\PocoDataODBCmdd.pdb</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Lib>
|
||||
<OutputFile>..\..\lib\PocoDataODBCmdd.lib</OutputFile>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;POCO_STATIC;THREADSAFE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<ProgramDataBaseFileName>..\..\lib\PocoDataODBCmd.pdb</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat/>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Lib>
|
||||
<AdditionalDependencies>odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>..\..\lib\PocoDataODBCmd.lib</OutputFile>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;THREADSAFE;ODBC_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>..\..\bin64\PocoDataODBC64d.dll</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>..\..\bin64\PocoDataODBC64d.pdb</ProgramDatabaseFile>
|
||||
<AdditionalLibraryDirectories>..\..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<ImportLibrary>..\..\lib64\PocoDataODBCd.lib</ImportLibrary>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;THREADSAFE;ODBC_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat/>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>..\..\bin64\PocoDataODBC64.dll</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<AdditionalLibraryDirectories>..\..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<ImportLibrary>..\..\lib64\PocoDataODBC.lib</ImportLibrary>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;POCO_STATIC;THREADSAFE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<ProgramDataBaseFileName>..\..\lib64\PocoDataODBCmtd.pdb</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Lib>
|
||||
<OutputFile>..\..\lib64\PocoDataODBCmtd.lib</OutputFile>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;POCO_STATIC;THREADSAFE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat/>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Lib>
|
||||
<OutputFile>..\..\lib64\PocoDataODBCmt.lib</OutputFile>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;POCO_STATIC;THREADSAFE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<ProgramDataBaseFileName>..\..\lib64\PocoDataODBCmdd.pdb</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Lib>
|
||||
<OutputFile>..\..\lib64\PocoDataODBCmdd.lib</OutputFile>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;POCO_STATIC;THREADSAFE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat/>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Lib>
|
||||
<OutputFile>..\..\lib64\PocoDataODBCmd.lib</OutputFile>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\Binder.h"/>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\ConnectionHandle.h"/>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\Connector.h"/>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\Diagnostics.h"/>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\EnvironmentHandle.h"/>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\Error.h"/>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\Extractor.h"/>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\Handle.h"/>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\ODBC.h"/>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\ODBCException.h"/>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\ODBCMetaColumn.h"/>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\ODBCStatementImpl.h"/>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\Parameter.h"/>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\Preparator.h"/>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\SessionImpl.h"/>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\TypeInfo.h"/>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\Unicode.h"/>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\Unicode_UNIXODBC.h"/>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\Unicode_WIN32.h"/>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\Utility.h"/>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="src\Binder.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ConnectionHandle.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Connector.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\EnvironmentHandle.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Extractor.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ODBCException.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ODBCMetaColumn.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ODBCStatementImpl.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Parameter.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Preparator.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\SessionImpl.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\TypeInfo.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Unicode.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Unicode_UNIXODBC.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Unicode_WIN32.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Utility.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="..\..\DLLVersion.rc">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets"/>
|
||||
<ImportGroup Label="ExtensionTargets"/>
|
||||
</Project>
|
||||
+129
@@ -0,0 +1,129 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="ODBC">
|
||||
<UniqueIdentifier>{50f4f13f-d848-4c21-8bbe-7bca8d108627}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="ODBC\Header Files">
|
||||
<UniqueIdentifier>{96b31926-914e-4d75-b75e-3111b7506df8}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="ODBC\Source Files">
|
||||
<UniqueIdentifier>{238af948-93f5-4111-ac6b-94e7e7d8a338}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\Binder.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\ConnectionHandle.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\Connector.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\Diagnostics.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\EnvironmentHandle.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\Error.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\Extractor.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\Handle.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\ODBC.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\ODBCException.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\ODBCMetaColumn.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\ODBCStatementImpl.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\Parameter.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\Preparator.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\SessionImpl.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\TypeInfo.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\Unicode.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\Unicode_UNIXODBC.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\Unicode_WIN32.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\Utility.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="src\Binder.cpp">
|
||||
<Filter>ODBC\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ConnectionHandle.cpp">
|
||||
<Filter>ODBC\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Connector.cpp">
|
||||
<Filter>ODBC\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\EnvironmentHandle.cpp">
|
||||
<Filter>ODBC\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Extractor.cpp">
|
||||
<Filter>ODBC\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ODBCException.cpp">
|
||||
<Filter>ODBC\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ODBCMetaColumn.cpp">
|
||||
<Filter>ODBC\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ODBCStatementImpl.cpp">
|
||||
<Filter>ODBC\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Parameter.cpp">
|
||||
<Filter>ODBC\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Preparator.cpp">
|
||||
<Filter>ODBC\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\SessionImpl.cpp">
|
||||
<Filter>ODBC\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\TypeInfo.cpp">
|
||||
<Filter>ODBC\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Unicode.cpp">
|
||||
<Filter>ODBC\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Unicode_UNIXODBC.cpp">
|
||||
<Filter>ODBC\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Unicode_WIN32.cpp">
|
||||
<Filter>ODBC\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Utility.cpp">
|
||||
<Filter>ODBC\Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="..\..\DLLVersion.rc" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
Vendored
+102
@@ -0,0 +1,102 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 15
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ODBC", "ODBC_vs150.vcxproj", "{1B29820D-375F-11DB-837B-00123FC423B5}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestSuite", "testsuite\TestSuite_vs150.vcxproj", "{00627063-395B-4413-9099-23BDB56562FA}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5} = {1B29820D-375F-11DB-837B-00123FC423B5}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
debug_shared|Win32 = debug_shared|Win32
|
||||
release_shared|Win32 = release_shared|Win32
|
||||
debug_static_mt|Win32 = debug_static_mt|Win32
|
||||
release_static_mt|Win32 = release_static_mt|Win32
|
||||
debug_static_md|Win32 = debug_static_md|Win32
|
||||
release_static_md|Win32 = release_static_md|Win32
|
||||
debug_shared|x64 = debug_shared|x64
|
||||
release_shared|x64 = release_shared|x64
|
||||
debug_static_mt|x64 = debug_static_mt|x64
|
||||
release_static_mt|x64 = release_static_mt|x64
|
||||
debug_static_md|x64 = debug_static_md|x64
|
||||
release_static_md|x64 = release_static_md|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.debug_shared|Win32.ActiveCfg = debug_shared|Win32
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.debug_shared|Win32.Build.0 = debug_shared|Win32
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.debug_shared|Win32.Deploy.0 = debug_shared|Win32
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.release_shared|Win32.ActiveCfg = release_shared|Win32
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.release_shared|Win32.Build.0 = release_shared|Win32
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.release_shared|Win32.Deploy.0 = release_shared|Win32
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.release_static_mt|Win32.Build.0 = release_static_mt|Win32
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.debug_static_md|Win32.Build.0 = debug_static_md|Win32
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.debug_static_md|Win32.Deploy.0 = debug_static_md|Win32
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.release_static_md|Win32.ActiveCfg = release_static_md|Win32
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.release_static_md|Win32.Build.0 = release_static_md|Win32
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.release_static_md|Win32.Deploy.0 = release_static_md|Win32
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.debug_shared|x64.ActiveCfg = debug_shared|x64
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.debug_shared|x64.Build.0 = debug_shared|x64
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.debug_shared|x64.Deploy.0 = debug_shared|x64
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.release_shared|x64.ActiveCfg = release_shared|x64
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.release_shared|x64.Build.0 = release_shared|x64
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.release_shared|x64.Deploy.0 = release_shared|x64
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.debug_static_mt|x64.ActiveCfg = debug_static_mt|x64
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.debug_static_mt|x64.Build.0 = debug_static_mt|x64
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.debug_static_mt|x64.Deploy.0 = debug_static_mt|x64
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.release_static_mt|x64.ActiveCfg = release_static_mt|x64
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.release_static_mt|x64.Build.0 = release_static_mt|x64
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.release_static_mt|x64.Deploy.0 = release_static_mt|x64
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.debug_static_md|x64.ActiveCfg = debug_static_md|x64
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.debug_static_md|x64.Build.0 = debug_static_md|x64
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.debug_static_md|x64.Deploy.0 = debug_static_md|x64
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.release_static_md|x64.ActiveCfg = release_static_md|x64
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.release_static_md|x64.Build.0 = release_static_md|x64
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.release_static_md|x64.Deploy.0 = release_static_md|x64
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.debug_shared|Win32.ActiveCfg = debug_shared|Win32
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.debug_shared|Win32.Build.0 = debug_shared|Win32
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.debug_shared|Win32.Deploy.0 = debug_shared|Win32
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.release_shared|Win32.ActiveCfg = release_shared|Win32
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.release_shared|Win32.Build.0 = release_shared|Win32
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.release_shared|Win32.Deploy.0 = release_shared|Win32
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.release_static_mt|Win32.Build.0 = release_static_mt|Win32
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.debug_static_md|Win32.Build.0 = debug_static_md|Win32
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.debug_static_md|Win32.Deploy.0 = debug_static_md|Win32
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.release_static_md|Win32.ActiveCfg = release_static_md|Win32
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.release_static_md|Win32.Build.0 = release_static_md|Win32
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.release_static_md|Win32.Deploy.0 = release_static_md|Win32
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.debug_shared|x64.ActiveCfg = debug_shared|x64
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.debug_shared|x64.Build.0 = debug_shared|x64
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.debug_shared|x64.Deploy.0 = debug_shared|x64
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.release_shared|x64.ActiveCfg = release_shared|x64
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.release_shared|x64.Build.0 = release_shared|x64
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.release_shared|x64.Deploy.0 = release_shared|x64
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.debug_static_mt|x64.ActiveCfg = debug_static_mt|x64
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.debug_static_mt|x64.Build.0 = debug_static_mt|x64
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.debug_static_mt|x64.Deploy.0 = debug_static_mt|x64
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.release_static_mt|x64.ActiveCfg = release_static_mt|x64
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.release_static_mt|x64.Build.0 = release_static_mt|x64
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.release_static_mt|x64.Deploy.0 = release_static_mt|x64
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.debug_static_md|x64.ActiveCfg = debug_static_md|x64
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.debug_static_md|x64.Build.0 = debug_static_md|x64
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.debug_static_md|x64.Deploy.0 = debug_static_md|x64
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.release_static_md|x64.ActiveCfg = release_static_md|x64
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.release_static_md|x64.Build.0 = release_static_md|x64
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.release_static_md|x64.Deploy.0 = release_static_md|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
+658
@@ -0,0 +1,658 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="debug_shared|Win32">
|
||||
<Configuration>debug_shared</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="debug_shared|x64">
|
||||
<Configuration>debug_shared</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="debug_static_md|Win32">
|
||||
<Configuration>debug_static_md</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="debug_static_md|x64">
|
||||
<Configuration>debug_static_md</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="debug_static_mt|Win32">
|
||||
<Configuration>debug_static_mt</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="debug_static_mt|x64">
|
||||
<Configuration>debug_static_mt</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="release_shared|Win32">
|
||||
<Configuration>release_shared</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="release_shared|x64">
|
||||
<Configuration>release_shared</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="release_static_md|Win32">
|
||||
<Configuration>release_static_md</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="release_static_md|x64">
|
||||
<Configuration>release_static_md</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="release_static_mt|Win32">
|
||||
<Configuration>release_static_mt</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="release_static_mt|x64">
|
||||
<Configuration>release_static_mt</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectName>ODBC</ProjectName>
|
||||
<ProjectGuid>{1B29820D-375F-11DB-837B-00123FC423B5}</ProjectGuid>
|
||||
<RootNamespace>ODBC</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props"/>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props"/>
|
||||
<ImportGroup Label="ExtensionSettings"/>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros"/>
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>15.0.28307.799</_ProjectFileVersion>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">PocoDataODBCd</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">PocoDataODBCmdd</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">PocoDataODBCmtd</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">PocoDataODBC</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">PocoDataODBCmd</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">PocoDataODBCmt</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">PocoDataODBC64d</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">PocoDataODBCmdd</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">PocoDataODBCmtd</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">PocoDataODBC64</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">PocoDataODBCmd</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">PocoDataODBCmt</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">
|
||||
<OutDir>..\..\bin\</OutDir>
|
||||
<IntDir>obj\ODBC\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">
|
||||
<OutDir>..\..\bin\</OutDir>
|
||||
<IntDir>obj\ODBC\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">
|
||||
<OutDir>..\..\lib\</OutDir>
|
||||
<IntDir>obj\ODBC\$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">
|
||||
<OutDir>..\..\lib\</OutDir>
|
||||
<IntDir>obj\ODBC\$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">
|
||||
<OutDir>..\..\lib\</OutDir>
|
||||
<IntDir>obj\ODBC\$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">
|
||||
<OutDir>..\..\lib\</OutDir>
|
||||
<IntDir>obj\ODBC\$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">
|
||||
<OutDir>..\..\bin64\</OutDir>
|
||||
<IntDir>obj64\ODBC\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">
|
||||
<OutDir>..\..\bin64\</OutDir>
|
||||
<IntDir>obj64\ODBC\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">
|
||||
<OutDir>..\..\lib64\</OutDir>
|
||||
<IntDir>obj64\ODBC\$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">
|
||||
<OutDir>..\..\lib64\</OutDir>
|
||||
<IntDir>obj64\ODBC\$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">
|
||||
<OutDir>..\..\lib64\</OutDir>
|
||||
<IntDir>obj64\ODBC\$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">
|
||||
<OutDir>..\..\lib64\</OutDir>
|
||||
<IntDir>obj64\ODBC\$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;THREADSAFE;ODBC_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>..\..\bin\PocoDataODBCd.dll</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>..\..\bin\PocoDataODBCd.pdb</ProgramDatabaseFile>
|
||||
<AdditionalLibraryDirectories>..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<ImportLibrary>..\..\lib\PocoDataODBCd.lib</ImportLibrary>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;THREADSAFE;ODBC_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat/>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>..\..\bin\PocoDataODBC.dll</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<AdditionalLibraryDirectories>..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<ImportLibrary>..\..\lib\PocoDataODBC.lib</ImportLibrary>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;POCO_STATIC;THREADSAFE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<ProgramDataBaseFileName>..\..\lib\PocoDataODBCmtd.pdb</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Lib>
|
||||
<OutputFile>..\..\lib\PocoDataODBCmtd.lib</OutputFile>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;POCO_STATIC;THREADSAFE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat/>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Lib>
|
||||
<OutputFile>..\..\lib\PocoDataODBCmt.lib</OutputFile>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;POCO_STATIC;THREADSAFE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<ProgramDataBaseFileName>..\..\lib\PocoDataODBCmdd.pdb</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Lib>
|
||||
<OutputFile>..\..\lib\PocoDataODBCmdd.lib</OutputFile>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;POCO_STATIC;THREADSAFE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<ProgramDataBaseFileName>..\..\lib\PocoDataODBCmd.pdb</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat/>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Lib>
|
||||
<AdditionalDependencies>odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>..\..\lib\PocoDataODBCmd.lib</OutputFile>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;THREADSAFE;ODBC_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>..\..\bin64\PocoDataODBC64d.dll</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>..\..\bin64\PocoDataODBC64d.pdb</ProgramDatabaseFile>
|
||||
<AdditionalLibraryDirectories>..\..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<ImportLibrary>..\..\lib64\PocoDataODBCd.lib</ImportLibrary>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;THREADSAFE;ODBC_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat/>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>..\..\bin64\PocoDataODBC64.dll</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<AdditionalLibraryDirectories>..\..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<ImportLibrary>..\..\lib64\PocoDataODBC.lib</ImportLibrary>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;POCO_STATIC;THREADSAFE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<ProgramDataBaseFileName>..\..\lib64\PocoDataODBCmtd.pdb</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Lib>
|
||||
<OutputFile>..\..\lib64\PocoDataODBCmtd.lib</OutputFile>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;POCO_STATIC;THREADSAFE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat/>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Lib>
|
||||
<OutputFile>..\..\lib64\PocoDataODBCmt.lib</OutputFile>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;POCO_STATIC;THREADSAFE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<ProgramDataBaseFileName>..\..\lib64\PocoDataODBCmdd.pdb</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Lib>
|
||||
<OutputFile>..\..\lib64\PocoDataODBCmdd.lib</OutputFile>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;POCO_STATIC;THREADSAFE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat/>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Lib>
|
||||
<OutputFile>..\..\lib64\PocoDataODBCmd.lib</OutputFile>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\Binder.h"/>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\ConnectionHandle.h"/>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\Connector.h"/>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\Diagnostics.h"/>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\EnvironmentHandle.h"/>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\Error.h"/>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\Extractor.h"/>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\Handle.h"/>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\ODBC.h"/>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\ODBCException.h"/>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\ODBCMetaColumn.h"/>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\ODBCStatementImpl.h"/>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\Parameter.h"/>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\Preparator.h"/>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\SessionImpl.h"/>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\TypeInfo.h"/>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\Unicode.h"/>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\Unicode_UNIXODBC.h"/>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\Unicode_WIN32.h"/>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\Utility.h"/>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="src\Binder.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ConnectionHandle.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Connector.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\EnvironmentHandle.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Extractor.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ODBCException.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ODBCMetaColumn.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ODBCStatementImpl.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Parameter.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Preparator.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\SessionImpl.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\TypeInfo.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Unicode.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Unicode_UNIXODBC.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Unicode_WIN32.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Utility.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="..\..\DLLVersion.rc">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets"/>
|
||||
<ImportGroup Label="ExtensionTargets"/>
|
||||
</Project>
|
||||
+129
@@ -0,0 +1,129 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="ODBC">
|
||||
<UniqueIdentifier>{7733c67d-59ee-464d-8041-316aeaad2ed7}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="ODBC\Header Files">
|
||||
<UniqueIdentifier>{b9790491-1b4a-4bda-b7a6-7107f479818d}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="ODBC\Source Files">
|
||||
<UniqueIdentifier>{e790735e-3033-49d2-9fd1-bbe554539879}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\Binder.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\ConnectionHandle.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\Connector.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\Diagnostics.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\EnvironmentHandle.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\Error.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\Extractor.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\Handle.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\ODBC.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\ODBCException.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\ODBCMetaColumn.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\ODBCStatementImpl.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\Parameter.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\Preparator.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\SessionImpl.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\TypeInfo.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\Unicode.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\Unicode_UNIXODBC.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\Unicode_WIN32.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\Utility.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="src\Binder.cpp">
|
||||
<Filter>ODBC\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ConnectionHandle.cpp">
|
||||
<Filter>ODBC\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Connector.cpp">
|
||||
<Filter>ODBC\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\EnvironmentHandle.cpp">
|
||||
<Filter>ODBC\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Extractor.cpp">
|
||||
<Filter>ODBC\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ODBCException.cpp">
|
||||
<Filter>ODBC\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ODBCMetaColumn.cpp">
|
||||
<Filter>ODBC\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ODBCStatementImpl.cpp">
|
||||
<Filter>ODBC\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Parameter.cpp">
|
||||
<Filter>ODBC\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Preparator.cpp">
|
||||
<Filter>ODBC\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\SessionImpl.cpp">
|
||||
<Filter>ODBC\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\TypeInfo.cpp">
|
||||
<Filter>ODBC\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Unicode.cpp">
|
||||
<Filter>ODBC\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Unicode_UNIXODBC.cpp">
|
||||
<Filter>ODBC\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Unicode_WIN32.cpp">
|
||||
<Filter>ODBC\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Utility.cpp">
|
||||
<Filter>ODBC\Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="..\..\DLLVersion.rc" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
Vendored
+102
@@ -0,0 +1,102 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ODBC", "ODBC_vs160.vcxproj", "{1B29820D-375F-11DB-837B-00123FC423B5}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestSuite", "testsuite\TestSuite_vs160.vcxproj", "{00627063-395B-4413-9099-23BDB56562FA}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5} = {1B29820D-375F-11DB-837B-00123FC423B5}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
debug_shared|Win32 = debug_shared|Win32
|
||||
release_shared|Win32 = release_shared|Win32
|
||||
debug_static_mt|Win32 = debug_static_mt|Win32
|
||||
release_static_mt|Win32 = release_static_mt|Win32
|
||||
debug_static_md|Win32 = debug_static_md|Win32
|
||||
release_static_md|Win32 = release_static_md|Win32
|
||||
debug_shared|x64 = debug_shared|x64
|
||||
release_shared|x64 = release_shared|x64
|
||||
debug_static_mt|x64 = debug_static_mt|x64
|
||||
release_static_mt|x64 = release_static_mt|x64
|
||||
debug_static_md|x64 = debug_static_md|x64
|
||||
release_static_md|x64 = release_static_md|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.debug_shared|Win32.ActiveCfg = debug_shared|Win32
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.debug_shared|Win32.Build.0 = debug_shared|Win32
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.debug_shared|Win32.Deploy.0 = debug_shared|Win32
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.release_shared|Win32.ActiveCfg = release_shared|Win32
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.release_shared|Win32.Build.0 = release_shared|Win32
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.release_shared|Win32.Deploy.0 = release_shared|Win32
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.release_static_mt|Win32.Build.0 = release_static_mt|Win32
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.debug_static_md|Win32.Build.0 = debug_static_md|Win32
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.debug_static_md|Win32.Deploy.0 = debug_static_md|Win32
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.release_static_md|Win32.ActiveCfg = release_static_md|Win32
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.release_static_md|Win32.Build.0 = release_static_md|Win32
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.release_static_md|Win32.Deploy.0 = release_static_md|Win32
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.debug_shared|x64.ActiveCfg = debug_shared|x64
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.debug_shared|x64.Build.0 = debug_shared|x64
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.debug_shared|x64.Deploy.0 = debug_shared|x64
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.release_shared|x64.ActiveCfg = release_shared|x64
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.release_shared|x64.Build.0 = release_shared|x64
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.release_shared|x64.Deploy.0 = release_shared|x64
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.debug_static_mt|x64.ActiveCfg = debug_static_mt|x64
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.debug_static_mt|x64.Build.0 = debug_static_mt|x64
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.debug_static_mt|x64.Deploy.0 = debug_static_mt|x64
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.release_static_mt|x64.ActiveCfg = release_static_mt|x64
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.release_static_mt|x64.Build.0 = release_static_mt|x64
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.release_static_mt|x64.Deploy.0 = release_static_mt|x64
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.debug_static_md|x64.ActiveCfg = debug_static_md|x64
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.debug_static_md|x64.Build.0 = debug_static_md|x64
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.debug_static_md|x64.Deploy.0 = debug_static_md|x64
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.release_static_md|x64.ActiveCfg = release_static_md|x64
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.release_static_md|x64.Build.0 = release_static_md|x64
|
||||
{1B29820D-375F-11DB-837B-00123FC423B5}.release_static_md|x64.Deploy.0 = release_static_md|x64
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.debug_shared|Win32.ActiveCfg = debug_shared|Win32
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.debug_shared|Win32.Build.0 = debug_shared|Win32
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.debug_shared|Win32.Deploy.0 = debug_shared|Win32
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.release_shared|Win32.ActiveCfg = release_shared|Win32
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.release_shared|Win32.Build.0 = release_shared|Win32
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.release_shared|Win32.Deploy.0 = release_shared|Win32
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.release_static_mt|Win32.Build.0 = release_static_mt|Win32
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.debug_static_md|Win32.Build.0 = debug_static_md|Win32
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.debug_static_md|Win32.Deploy.0 = debug_static_md|Win32
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.release_static_md|Win32.ActiveCfg = release_static_md|Win32
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.release_static_md|Win32.Build.0 = release_static_md|Win32
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.release_static_md|Win32.Deploy.0 = release_static_md|Win32
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.debug_shared|x64.ActiveCfg = debug_shared|x64
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.debug_shared|x64.Build.0 = debug_shared|x64
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.debug_shared|x64.Deploy.0 = debug_shared|x64
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.release_shared|x64.ActiveCfg = release_shared|x64
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.release_shared|x64.Build.0 = release_shared|x64
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.release_shared|x64.Deploy.0 = release_shared|x64
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.debug_static_mt|x64.ActiveCfg = debug_static_mt|x64
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.debug_static_mt|x64.Build.0 = debug_static_mt|x64
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.debug_static_mt|x64.Deploy.0 = debug_static_mt|x64
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.release_static_mt|x64.ActiveCfg = release_static_mt|x64
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.release_static_mt|x64.Build.0 = release_static_mt|x64
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.release_static_mt|x64.Deploy.0 = release_static_mt|x64
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.debug_static_md|x64.ActiveCfg = debug_static_md|x64
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.debug_static_md|x64.Build.0 = debug_static_md|x64
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.debug_static_md|x64.Deploy.0 = debug_static_md|x64
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.release_static_md|x64.ActiveCfg = release_static_md|x64
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.release_static_md|x64.Build.0 = release_static_md|x64
|
||||
{00627063-395B-4413-9099-23BDB56562FA}.release_static_md|x64.Deploy.0 = release_static_md|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
+658
@@ -0,0 +1,658 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="debug_shared|Win32">
|
||||
<Configuration>debug_shared</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="debug_shared|x64">
|
||||
<Configuration>debug_shared</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="debug_static_md|Win32">
|
||||
<Configuration>debug_static_md</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="debug_static_md|x64">
|
||||
<Configuration>debug_static_md</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="debug_static_mt|Win32">
|
||||
<Configuration>debug_static_mt</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="debug_static_mt|x64">
|
||||
<Configuration>debug_static_mt</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="release_shared|Win32">
|
||||
<Configuration>release_shared</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="release_shared|x64">
|
||||
<Configuration>release_shared</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="release_static_md|Win32">
|
||||
<Configuration>release_static_md</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="release_static_md|x64">
|
||||
<Configuration>release_static_md</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="release_static_mt|Win32">
|
||||
<Configuration>release_static_mt</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="release_static_mt|x64">
|
||||
<Configuration>release_static_mt</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectName>ODBC</ProjectName>
|
||||
<ProjectGuid>{1B29820D-375F-11DB-837B-00123FC423B5}</ProjectGuid>
|
||||
<RootNamespace>ODBC</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props"/>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props"/>
|
||||
<ImportGroup Label="ExtensionSettings"/>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros"/>
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>15.0.28307.799</_ProjectFileVersion>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">PocoDataODBCd</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">PocoDataODBCmdd</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">PocoDataODBCmtd</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">PocoDataODBC</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">PocoDataODBCmd</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">PocoDataODBCmt</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">PocoDataODBC64d</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">PocoDataODBCmdd</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">PocoDataODBCmtd</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">PocoDataODBC64</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">PocoDataODBCmd</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">PocoDataODBCmt</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">
|
||||
<OutDir>..\..\bin\</OutDir>
|
||||
<IntDir>obj\ODBC\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">
|
||||
<OutDir>..\..\bin\</OutDir>
|
||||
<IntDir>obj\ODBC\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">
|
||||
<OutDir>..\..\lib\</OutDir>
|
||||
<IntDir>obj\ODBC\$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">
|
||||
<OutDir>..\..\lib\</OutDir>
|
||||
<IntDir>obj\ODBC\$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">
|
||||
<OutDir>..\..\lib\</OutDir>
|
||||
<IntDir>obj\ODBC\$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">
|
||||
<OutDir>..\..\lib\</OutDir>
|
||||
<IntDir>obj\ODBC\$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">
|
||||
<OutDir>..\..\bin64\</OutDir>
|
||||
<IntDir>obj64\ODBC\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">
|
||||
<OutDir>..\..\bin64\</OutDir>
|
||||
<IntDir>obj64\ODBC\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">
|
||||
<OutDir>..\..\lib64\</OutDir>
|
||||
<IntDir>obj64\ODBC\$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">
|
||||
<OutDir>..\..\lib64\</OutDir>
|
||||
<IntDir>obj64\ODBC\$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">
|
||||
<OutDir>..\..\lib64\</OutDir>
|
||||
<IntDir>obj64\ODBC\$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">
|
||||
<OutDir>..\..\lib64\</OutDir>
|
||||
<IntDir>obj64\ODBC\$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;THREADSAFE;ODBC_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>..\..\bin\PocoDataODBCd.dll</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>..\..\bin\PocoDataODBCd.pdb</ProgramDatabaseFile>
|
||||
<AdditionalLibraryDirectories>..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<ImportLibrary>..\..\lib\PocoDataODBCd.lib</ImportLibrary>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;THREADSAFE;ODBC_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat/>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>..\..\bin\PocoDataODBC.dll</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<AdditionalLibraryDirectories>..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<ImportLibrary>..\..\lib\PocoDataODBC.lib</ImportLibrary>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;POCO_STATIC;THREADSAFE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<ProgramDataBaseFileName>..\..\lib\PocoDataODBCmtd.pdb</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Lib>
|
||||
<OutputFile>..\..\lib\PocoDataODBCmtd.lib</OutputFile>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;POCO_STATIC;THREADSAFE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat/>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Lib>
|
||||
<OutputFile>..\..\lib\PocoDataODBCmt.lib</OutputFile>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;POCO_STATIC;THREADSAFE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<ProgramDataBaseFileName>..\..\lib\PocoDataODBCmdd.pdb</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Lib>
|
||||
<OutputFile>..\..\lib\PocoDataODBCmdd.lib</OutputFile>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;POCO_STATIC;THREADSAFE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<ProgramDataBaseFileName>..\..\lib\PocoDataODBCmd.pdb</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat/>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Lib>
|
||||
<AdditionalDependencies>odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>..\..\lib\PocoDataODBCmd.lib</OutputFile>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;THREADSAFE;ODBC_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>..\..\bin64\PocoDataODBC64d.dll</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>..\..\bin64\PocoDataODBC64d.pdb</ProgramDatabaseFile>
|
||||
<AdditionalLibraryDirectories>..\..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<ImportLibrary>..\..\lib64\PocoDataODBCd.lib</ImportLibrary>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;THREADSAFE;ODBC_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat/>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>..\..\bin64\PocoDataODBC64.dll</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<AdditionalLibraryDirectories>..\..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<ImportLibrary>..\..\lib64\PocoDataODBC.lib</ImportLibrary>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;POCO_STATIC;THREADSAFE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<ProgramDataBaseFileName>..\..\lib64\PocoDataODBCmtd.pdb</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Lib>
|
||||
<OutputFile>..\..\lib64\PocoDataODBCmtd.lib</OutputFile>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;POCO_STATIC;THREADSAFE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat/>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Lib>
|
||||
<OutputFile>..\..\lib64\PocoDataODBCmt.lib</OutputFile>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;POCO_STATIC;THREADSAFE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<ProgramDataBaseFileName>..\..\lib64\PocoDataODBCmdd.pdb</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Lib>
|
||||
<OutputFile>..\..\lib64\PocoDataODBCmdd.lib</OutputFile>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<AdditionalIncludeDirectories>.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;POCO_STATIC;THREADSAFE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat/>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Lib>
|
||||
<OutputFile>..\..\lib64\PocoDataODBCmd.lib</OutputFile>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\Binder.h"/>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\ConnectionHandle.h"/>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\Connector.h"/>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\Diagnostics.h"/>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\EnvironmentHandle.h"/>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\Error.h"/>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\Extractor.h"/>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\Handle.h"/>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\ODBC.h"/>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\ODBCException.h"/>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\ODBCMetaColumn.h"/>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\ODBCStatementImpl.h"/>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\Parameter.h"/>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\Preparator.h"/>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\SessionImpl.h"/>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\TypeInfo.h"/>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\Unicode.h"/>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\Unicode_UNIXODBC.h"/>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\Unicode_WIN32.h"/>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\Utility.h"/>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="src\Binder.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ConnectionHandle.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Connector.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\EnvironmentHandle.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Extractor.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ODBCException.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ODBCMetaColumn.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ODBCStatementImpl.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Parameter.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Preparator.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\SessionImpl.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\TypeInfo.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Unicode.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Unicode_UNIXODBC.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Unicode_WIN32.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Utility.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="..\..\DLLVersion.rc">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets"/>
|
||||
<ImportGroup Label="ExtensionTargets"/>
|
||||
</Project>
|
||||
+129
@@ -0,0 +1,129 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="ODBC">
|
||||
<UniqueIdentifier>{01707a8d-a3d6-4b70-8f70-7287a14b1746}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="ODBC\Header Files">
|
||||
<UniqueIdentifier>{411e4e11-ca0d-496b-a136-d225efd991b8}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="ODBC\Source Files">
|
||||
<UniqueIdentifier>{ecf8fac7-8acd-482d-b81c-88d9e282f0e5}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\Binder.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\ConnectionHandle.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\Connector.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\Diagnostics.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\EnvironmentHandle.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\Error.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\Extractor.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\Handle.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\ODBC.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\ODBCException.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\ODBCMetaColumn.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\ODBCStatementImpl.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\Parameter.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\Preparator.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\SessionImpl.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\TypeInfo.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\Unicode.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\Unicode_UNIXODBC.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\Unicode_WIN32.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Data\ODBC\Utility.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="src\Binder.cpp">
|
||||
<Filter>ODBC\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ConnectionHandle.cpp">
|
||||
<Filter>ODBC\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Connector.cpp">
|
||||
<Filter>ODBC\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\EnvironmentHandle.cpp">
|
||||
<Filter>ODBC\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Extractor.cpp">
|
||||
<Filter>ODBC\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ODBCException.cpp">
|
||||
<Filter>ODBC\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ODBCMetaColumn.cpp">
|
||||
<Filter>ODBC\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ODBCStatementImpl.cpp">
|
||||
<Filter>ODBC\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Parameter.cpp">
|
||||
<Filter>ODBC\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Preparator.cpp">
|
||||
<Filter>ODBC\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\SessionImpl.cpp">
|
||||
<Filter>ODBC\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\TypeInfo.cpp">
|
||||
<Filter>ODBC\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Unicode.cpp">
|
||||
<Filter>ODBC\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Unicode_UNIXODBC.cpp">
|
||||
<Filter>ODBC\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Unicode_WIN32.cpp">
|
||||
<Filter>ODBC\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Utility.cpp">
|
||||
<Filter>ODBC\Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="..\..\DLLVersion.rc" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,4 @@
|
||||
include(CMakeFindDependencyMacro)
|
||||
find_dependency(PocoFoundation)
|
||||
find_dependency(PocoData)
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/PocoDataODBCTargets.cmake")
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
Foundation
|
||||
Data
|
||||
+1508
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,99 @@
|
||||
//
|
||||
// ConnectionHandle.h
|
||||
//
|
||||
// Library: Data/ODBC
|
||||
// Package: ODBC
|
||||
// Module: ConnectionHandle
|
||||
//
|
||||
// Definition of ConnectionHandle.
|
||||
//
|
||||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#ifndef Data_ODBC_ConnectionHandle_INCLUDED
|
||||
#define Data_ODBC_ConnectionHandle_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Data/ODBC/ODBC.h"
|
||||
#include "Poco/Data/ODBC/EnvironmentHandle.h"
|
||||
#ifdef POCO_OS_FAMILY_WINDOWS
|
||||
#include <windows.h>
|
||||
#endif
|
||||
#include <sqltypes.h>
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Data {
|
||||
namespace ODBC {
|
||||
|
||||
class SessionImpl;
|
||||
|
||||
class ODBC_API ConnectionHandle
|
||||
/// ODBC connection handle class
|
||||
{
|
||||
public:
|
||||
ConnectionHandle(EnvironmentHandle* pEnvironment = 0);
|
||||
/// Creates the ConnectionHandle.
|
||||
|
||||
~ConnectionHandle();
|
||||
/// Creates the ConnectionHandle.
|
||||
|
||||
operator const SQLHDBC& () const;
|
||||
/// Const conversion operator into reference to native type.
|
||||
|
||||
const SQLHDBC& handle() const;
|
||||
/// Returns const reference to handle;
|
||||
|
||||
private:
|
||||
operator SQLHDBC& ();
|
||||
/// Conversion operator into reference to native type.
|
||||
|
||||
SQLHDBC& handle();
|
||||
/// Returns reference to handle;
|
||||
|
||||
ConnectionHandle(const ConnectionHandle&);
|
||||
const ConnectionHandle& operator=(const ConnectionHandle&);
|
||||
|
||||
const EnvironmentHandle* _pEnvironment;
|
||||
SQLHDBC _hdbc;
|
||||
bool _ownsEnvironment;
|
||||
|
||||
friend class Poco::Data::ODBC::SessionImpl;
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// inlines
|
||||
//
|
||||
inline ConnectionHandle::operator const SQLHDBC& () const
|
||||
{
|
||||
return handle();
|
||||
}
|
||||
|
||||
|
||||
inline const SQLHDBC& ConnectionHandle::handle() const
|
||||
{
|
||||
return _hdbc;
|
||||
}
|
||||
|
||||
|
||||
inline ConnectionHandle::operator SQLHDBC& ()
|
||||
{
|
||||
return handle();
|
||||
}
|
||||
|
||||
|
||||
inline SQLHDBC& ConnectionHandle::handle()
|
||||
{
|
||||
return _hdbc;
|
||||
}
|
||||
|
||||
|
||||
} } } // namespace Poco::Data::ODBC
|
||||
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,96 @@
|
||||
//
|
||||
// Connector.h
|
||||
//
|
||||
// Library: Data/ODBC
|
||||
// Package: ODBC
|
||||
// Module: Connector
|
||||
//
|
||||
// Definition of the Connector class.
|
||||
//
|
||||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#ifndef Data_ODBC_Connector_INCLUDED
|
||||
#define Data_ODBC_Connector_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Data/ODBC/ODBC.h"
|
||||
#include "Poco/Data/Connector.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Data {
|
||||
namespace ODBC {
|
||||
|
||||
|
||||
class ODBC_API Connector: public Poco::Data::Connector
|
||||
/// Connector instantiates SqLite SessionImpl objects.
|
||||
{
|
||||
public:
|
||||
static const std::string KEY;
|
||||
/// Keyword for creating ODBC sessions.
|
||||
|
||||
Connector();
|
||||
/// Creates the Connector.
|
||||
|
||||
~Connector();
|
||||
/// Destroys the Connector.
|
||||
|
||||
const std::string& name() const;
|
||||
/// Returns the name associated with this connector.
|
||||
|
||||
Poco::AutoPtr<Poco::Data::SessionImpl> createSession(const std::string& connectionString,
|
||||
std::size_t timeout = Poco::Data::SessionImpl::LOGIN_TIMEOUT_DEFAULT);
|
||||
/// Creates a ODBC SessionImpl object and initializes it with the given connectionString.
|
||||
|
||||
static void registerConnector();
|
||||
/// Registers the Connector under the Keyword Connector::KEY at the Poco::Data::SessionFactory
|
||||
|
||||
static void unregisterConnector();
|
||||
/// Unregisters the Connector under the Keyword Connector::KEY at the Poco::Data::SessionFactory
|
||||
|
||||
static void bindStringToLongVarChar(bool flag = true);
|
||||
/// If set to true (default), std::string is bound to SQL_LONGVARCHAR.
|
||||
///
|
||||
/// This can cause issues with SQL Server, resulting in an error
|
||||
/// ("The data types varchar and text are incompatible in the equal to operator")
|
||||
/// when comparing against a VARCHAR.
|
||||
///
|
||||
/// Set this to false to bind std::string to SQL_VARCHAR.
|
||||
///
|
||||
/// NOTE: This is a global setting, affecting all sessions.
|
||||
/// This setting should not be changed after the first Session has
|
||||
/// been created.
|
||||
|
||||
static bool stringBoundToLongVarChar();
|
||||
/// Returns true if std::string is bound to SQL_LONGVARCHAR,
|
||||
/// otherwise false (bound to SQL_VARCHAR).
|
||||
|
||||
private:
|
||||
static bool _bindStringToLongVarChar;
|
||||
};
|
||||
|
||||
|
||||
///
|
||||
/// inlines
|
||||
///
|
||||
inline const std::string& Connector::name() const
|
||||
{
|
||||
return KEY;
|
||||
}
|
||||
|
||||
|
||||
inline bool Connector::stringBoundToLongVarChar()
|
||||
{
|
||||
return _bindStringToLongVarChar;
|
||||
}
|
||||
|
||||
|
||||
} } } // namespace Poco::Data::ODBC
|
||||
|
||||
|
||||
#endif // Data_ODBC_Connector_INCLUDED
|
||||
@@ -0,0 +1,239 @@
|
||||
//
|
||||
// Diagnostics.h
|
||||
//
|
||||
// Library: Data/ODBC
|
||||
// Package: ODBC
|
||||
// Module: Diagnostics
|
||||
//
|
||||
// Definition of Diagnostics.
|
||||
//
|
||||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#ifndef Data_ODBC_Diagnostics_INCLUDED
|
||||
#define Data_ODBC_Diagnostics_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Data/ODBC/ODBC.h"
|
||||
#include <vector>
|
||||
#include <cstring>
|
||||
#ifdef POCO_OS_FAMILY_WINDOWS
|
||||
#include <windows.h>
|
||||
#endif
|
||||
#include <sqlext.h>
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Data {
|
||||
namespace ODBC {
|
||||
|
||||
|
||||
template <typename H, SQLSMALLINT handleType>
|
||||
class Diagnostics
|
||||
/// Utility class providing functionality for retrieving ODBC diagnostic
|
||||
/// records. Diagnostics object must be created with corresponding handle
|
||||
/// as constructor argument. During construction, diagnostic records fields
|
||||
/// are populated and the object is ready for querying.
|
||||
{
|
||||
public:
|
||||
|
||||
static const unsigned int SQL_STATE_SIZE = SQL_SQLSTATE_SIZE + 1;
|
||||
static const unsigned int SQL_MESSAGE_LENGTH = SQL_MAX_MESSAGE_LENGTH + 1;
|
||||
static const unsigned int SQL_NAME_LENGTH = 128;
|
||||
static const std::string DATA_TRUNCATED;
|
||||
|
||||
struct DiagnosticFields
|
||||
{
|
||||
/// SQLGetDiagRec fields
|
||||
SQLCHAR _sqlState[SQL_STATE_SIZE];
|
||||
SQLCHAR _message[SQL_MESSAGE_LENGTH];
|
||||
SQLINTEGER _nativeError;
|
||||
};
|
||||
|
||||
typedef std::vector<DiagnosticFields> FieldVec;
|
||||
typedef typename FieldVec::const_iterator Iterator;
|
||||
|
||||
explicit Diagnostics(const H& handle): _handle(handle)
|
||||
/// Creates and initializes the Diagnostics.
|
||||
{
|
||||
std::memset(_connectionName, 0, sizeof(_connectionName));
|
||||
std::memset(_serverName, 0, sizeof(_serverName));
|
||||
diagnostics();
|
||||
}
|
||||
|
||||
~Diagnostics()
|
||||
/// Destroys the Diagnostics.
|
||||
{
|
||||
}
|
||||
|
||||
std::string sqlState(int index) const
|
||||
/// Returns SQL state.
|
||||
{
|
||||
poco_assert (index < count());
|
||||
return std::string((char*) _fields[index]._sqlState);
|
||||
}
|
||||
|
||||
std::string message(int index) const
|
||||
/// Returns error message.
|
||||
{
|
||||
poco_assert (index < count());
|
||||
return std::string((char*) _fields[index]._message);
|
||||
}
|
||||
|
||||
long nativeError(int index) const
|
||||
/// Returns native error code.
|
||||
{
|
||||
poco_assert (index < count());
|
||||
return _fields[index]._nativeError;
|
||||
}
|
||||
|
||||
std::string connectionName() const
|
||||
/// Returns the connection name.
|
||||
/// If there is no active connection, connection name defaults to NONE.
|
||||
/// If connection name is not applicable for query context (such as when querying environment handle),
|
||||
/// connection name defaults to NOT_APPLICABLE.
|
||||
{
|
||||
return std::string((char*) _connectionName);
|
||||
}
|
||||
|
||||
std::string serverName() const
|
||||
/// Returns the server name.
|
||||
/// If the connection has not been established, server name defaults to NONE.
|
||||
/// If server name is not applicable for query context (such as when querying environment handle),
|
||||
/// connection name defaults to NOT_APPLICABLE.
|
||||
{
|
||||
return std::string((char*) _serverName);
|
||||
}
|
||||
|
||||
int count() const
|
||||
/// Returns the number of contained diagnostic records.
|
||||
{
|
||||
return (int) _fields.size();
|
||||
}
|
||||
|
||||
void reset()
|
||||
/// Resets the diagnostic fields container.
|
||||
{
|
||||
_fields.clear();
|
||||
}
|
||||
|
||||
const FieldVec& fields() const
|
||||
{
|
||||
return _fields;
|
||||
}
|
||||
|
||||
Iterator begin() const
|
||||
{
|
||||
return _fields.begin();
|
||||
}
|
||||
|
||||
Iterator end() const
|
||||
{
|
||||
return _fields.end();
|
||||
}
|
||||
|
||||
const Diagnostics& diagnostics()
|
||||
{
|
||||
DiagnosticFields df;
|
||||
SQLSMALLINT count = 1;
|
||||
SQLSMALLINT messageLength = 0;
|
||||
static const std::string none = "None";
|
||||
static const std::string na = "Not applicable";
|
||||
|
||||
reset();
|
||||
|
||||
while (!Utility::isError(SQLGetDiagRec(handleType,
|
||||
_handle,
|
||||
count,
|
||||
df._sqlState,
|
||||
&df._nativeError,
|
||||
df._message,
|
||||
SQL_MESSAGE_LENGTH,
|
||||
&messageLength)))
|
||||
{
|
||||
if (1 == count)
|
||||
{
|
||||
// success of the following two calls is optional
|
||||
// (they fail if connection has not been established yet
|
||||
// or return empty string if not applicable for the context)
|
||||
if (Utility::isError(SQLGetDiagField(handleType,
|
||||
_handle,
|
||||
count,
|
||||
SQL_DIAG_CONNECTION_NAME,
|
||||
_connectionName,
|
||||
sizeof(_connectionName),
|
||||
&messageLength)))
|
||||
{
|
||||
std::size_t len = sizeof(_connectionName) > none.length() ?
|
||||
none.length() : sizeof(_connectionName) - 1;
|
||||
std::memcpy(_connectionName, none.c_str(), len);
|
||||
}
|
||||
else if (0 == _connectionName[0])
|
||||
{
|
||||
std::size_t len = sizeof(_connectionName) > na.length() ?
|
||||
na.length() : sizeof(_connectionName) - 1;
|
||||
std::memcpy(_connectionName, na.c_str(), len);
|
||||
}
|
||||
|
||||
if (Utility::isError(SQLGetDiagField(handleType,
|
||||
_handle,
|
||||
count,
|
||||
SQL_DIAG_SERVER_NAME,
|
||||
_serverName,
|
||||
sizeof(_serverName),
|
||||
&messageLength)))
|
||||
{
|
||||
std::size_t len = sizeof(_serverName) > none.length() ?
|
||||
none.length() : sizeof(_serverName) - 1;
|
||||
std::memcpy(_serverName, none.c_str(), len);
|
||||
}
|
||||
else if (0 == _serverName[0])
|
||||
{
|
||||
std::size_t len = sizeof(_serverName) > na.length() ?
|
||||
na.length() : sizeof(_serverName) - 1;
|
||||
std::memcpy(_serverName, na.c_str(), len);
|
||||
}
|
||||
}
|
||||
|
||||
_fields.push_back(df);
|
||||
|
||||
std::memset(df._sqlState, 0, SQL_STATE_SIZE);
|
||||
std::memset(df._message, 0, SQL_MESSAGE_LENGTH);
|
||||
df._nativeError = 0;
|
||||
|
||||
++count;
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
Diagnostics();
|
||||
|
||||
/// SQLGetDiagField fields
|
||||
SQLCHAR _connectionName[SQL_NAME_LENGTH];
|
||||
SQLCHAR _serverName[SQL_NAME_LENGTH];
|
||||
|
||||
/// Diagnostics container
|
||||
FieldVec _fields;
|
||||
|
||||
/// Context handle
|
||||
const H& _handle;
|
||||
};
|
||||
|
||||
|
||||
typedef Diagnostics<SQLHENV, SQL_HANDLE_ENV> EnvironmentDiagnostics;
|
||||
typedef Diagnostics<SQLHDBC, SQL_HANDLE_DBC> ConnectionDiagnostics;
|
||||
typedef Diagnostics<SQLHSTMT, SQL_HANDLE_STMT> StatementDiagnostics;
|
||||
typedef Diagnostics<SQLHDESC, SQL_HANDLE_DESC> DescriptorDiagnostics;
|
||||
|
||||
|
||||
} } } // namespace Poco::Data::ODBC
|
||||
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,94 @@
|
||||
//
|
||||
// EnvironmentHandle.h
|
||||
//
|
||||
// Library: Data/ODBC
|
||||
// Package: ODBC
|
||||
// Module: EnvironmentHandle
|
||||
//
|
||||
// Definition of EnvironmentHandle.
|
||||
//
|
||||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#ifndef Data_ODBC_EnvironmentHandle_INCLUDED
|
||||
#define Data_ODBC_EnvironmentHandle_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Data/ODBC/ODBC.h"
|
||||
#ifdef POCO_OS_FAMILY_WINDOWS
|
||||
#include <windows.h>
|
||||
#endif
|
||||
#include <sqltypes.h>
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Data {
|
||||
namespace ODBC {
|
||||
|
||||
|
||||
class ODBC_API EnvironmentHandle
|
||||
/// ODBC environment handle class
|
||||
{
|
||||
public:
|
||||
EnvironmentHandle();
|
||||
/// Creates the EnvironmentHandle.
|
||||
|
||||
~EnvironmentHandle();
|
||||
/// Destroys the EnvironmentHandle.
|
||||
|
||||
operator const SQLHENV& () const;
|
||||
/// Const conversion operator into reference to native type.
|
||||
|
||||
const SQLHENV& handle() const;
|
||||
/// Returns const reference to handle.
|
||||
|
||||
private:
|
||||
operator SQLHENV& ();
|
||||
/// Conversion operator into reference to native type.
|
||||
|
||||
SQLHENV& handle();
|
||||
/// Returns reference to handle.
|
||||
|
||||
EnvironmentHandle(const EnvironmentHandle&);
|
||||
const EnvironmentHandle& operator=(const EnvironmentHandle&);
|
||||
|
||||
SQLHENV _henv;
|
||||
bool _isOwner;
|
||||
};
|
||||
|
||||
|
||||
///
|
||||
/// inlines
|
||||
///
|
||||
inline EnvironmentHandle::operator const SQLHENV& () const
|
||||
{
|
||||
return handle();
|
||||
}
|
||||
|
||||
|
||||
inline const SQLHENV& EnvironmentHandle::handle() const
|
||||
{
|
||||
return _henv;
|
||||
}
|
||||
|
||||
|
||||
inline EnvironmentHandle::operator SQLHENV& ()
|
||||
{
|
||||
return handle();
|
||||
}
|
||||
|
||||
|
||||
inline SQLHENV& EnvironmentHandle::handle()
|
||||
{
|
||||
return _henv;
|
||||
}
|
||||
|
||||
|
||||
} } } // namespace Poco::Data::ODBC
|
||||
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,124 @@
|
||||
//
|
||||
// Error.h
|
||||
//
|
||||
// Library: Data/ODBC
|
||||
// Package: ODBC
|
||||
// Module: Error
|
||||
//
|
||||
// Definition of Error.
|
||||
//
|
||||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#ifndef Data_ODBC_Error_INCLUDED
|
||||
#define Data_ODBC_Error_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Data/ODBC/ODBC.h"
|
||||
#include "Poco/Data/ODBC/Utility.h"
|
||||
#include "Poco/Data/ODBC/Diagnostics.h"
|
||||
#include "Poco/Format.h"
|
||||
#include <vector>
|
||||
#ifdef POCO_OS_FAMILY_WINDOWS
|
||||
#include <windows.h>
|
||||
#endif
|
||||
#include <sqlext.h>
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Data {
|
||||
namespace ODBC {
|
||||
|
||||
|
||||
template <typename H, SQLSMALLINT handleType>
|
||||
class Error
|
||||
/// Class encapsulating ODBC diagnostic record collection. Collection is generated
|
||||
/// during construction. Class provides access and string generation for the collection
|
||||
/// as well as individual diagnostic records.
|
||||
{
|
||||
public:
|
||||
explicit Error(const H& handle) : _diagnostics(handle)
|
||||
/// Creates the Error.
|
||||
{
|
||||
}
|
||||
|
||||
~Error()
|
||||
/// Destroys the Error.
|
||||
{
|
||||
}
|
||||
|
||||
const Diagnostics<H, handleType>& diagnostics() const
|
||||
/// Returns the associated diagnostics.
|
||||
{
|
||||
return _diagnostics;
|
||||
}
|
||||
|
||||
int count() const
|
||||
/// Returns the count of diagnostic records.
|
||||
{
|
||||
return (int) _diagnostics.count();
|
||||
}
|
||||
|
||||
std::string& toString(int index, std::string& str) const
|
||||
/// Generates the string for the diagnostic record.
|
||||
{
|
||||
if ((index < 0) || (index > (count() - 1)))
|
||||
return str;
|
||||
|
||||
std::string s;
|
||||
Poco::format(s,
|
||||
"===========================\n"
|
||||
"ODBC Diagnostic record #%d:\n"
|
||||
"===========================\n"
|
||||
"SQLSTATE = %s\nNative Error Code = %ld\n%s\n\n",
|
||||
index + 1,
|
||||
_diagnostics.sqlState(index),
|
||||
_diagnostics.nativeError(index),
|
||||
_diagnostics.message(index));
|
||||
|
||||
str.append(s);
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
std::string toString() const
|
||||
/// Generates the string for the diagnostic record collection.
|
||||
{
|
||||
std::string str;
|
||||
|
||||
Poco::format(str,
|
||||
"Connection:%s\nServer:%s\n",
|
||||
_diagnostics.connectionName(),
|
||||
_diagnostics.serverName());
|
||||
|
||||
std::string s;
|
||||
for (int i = 0; i < count(); ++i)
|
||||
{
|
||||
s.clear();
|
||||
str.append(toString(i, s));
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
private:
|
||||
Error();
|
||||
|
||||
Diagnostics<H, handleType> _diagnostics;
|
||||
};
|
||||
|
||||
|
||||
typedef Error<SQLHENV, SQL_HANDLE_ENV> EnvironmentError;
|
||||
typedef Error<SQLHDBC, SQL_HANDLE_DBC> ConnectionError;
|
||||
typedef Error<SQLHSTMT, SQL_HANDLE_STMT> StatementError;
|
||||
typedef Error<SQLHSTMT, SQL_HANDLE_DESC> DescriptorError;
|
||||
|
||||
|
||||
} } } // namespace Poco::Data::ODBC
|
||||
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,728 @@
|
||||
//
|
||||
// Extractor.h
|
||||
//
|
||||
// Library: Data/ODBC
|
||||
// Package: ODBC
|
||||
// Module: Extractor
|
||||
//
|
||||
// Definition of the Extractor class.
|
||||
//
|
||||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#ifndef Data_ODBC_Extractor_INCLUDED
|
||||
#define Data_ODBC_Extractor_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Data/Constants.h"
|
||||
#include "Poco/Data/ODBC/ODBC.h"
|
||||
#include "Poco/Data/AbstractExtractor.h"
|
||||
#include "Poco/Data/ODBC/Preparator.h"
|
||||
#include "Poco/Data/ODBC/ODBCMetaColumn.h"
|
||||
#include "Poco/Data/ODBC/Error.h"
|
||||
#include "Poco/Data/ODBC/Utility.h"
|
||||
#include "Poco/Data/Date.h"
|
||||
#include "Poco/Data/Time.h"
|
||||
#include "Poco/DateTime.h"
|
||||
#include "Poco/Any.h"
|
||||
#include "Poco/Dynamic/Var.h"
|
||||
#include "Poco/Nullable.h"
|
||||
#include "Poco/UTFString.h"
|
||||
#include "Poco/Exception.h"
|
||||
#include <map>
|
||||
#ifdef POCO_OS_FAMILY_WINDOWS
|
||||
#include <windows.h>
|
||||
#endif
|
||||
#include <sqltypes.h>
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Data {
|
||||
namespace ODBC {
|
||||
|
||||
|
||||
class ODBC_API Extractor: public Poco::Data::AbstractExtractor
|
||||
/// Extracts and converts data values from the result row returned by ODBC.
|
||||
/// If NULL is received, the incoming val value is not changed and false is returned
|
||||
{
|
||||
public:
|
||||
typedef Preparator::Ptr PreparatorPtr;
|
||||
|
||||
Extractor(const StatementHandle& rStmt,
|
||||
Preparator::Ptr pPreparator);
|
||||
/// Creates the Extractor.
|
||||
|
||||
~Extractor();
|
||||
/// Destroys the Extractor.
|
||||
|
||||
bool extract(std::size_t pos, Poco::Int8& val);
|
||||
/// Extracts an Int8.
|
||||
|
||||
bool extract(std::size_t pos, std::vector<Poco::Int8>& val);
|
||||
/// Extracts an Int8 vector.
|
||||
|
||||
bool extract(std::size_t pos, std::deque<Poco::Int8>& val);
|
||||
/// Extracts an Int8 deque.
|
||||
|
||||
bool extract(std::size_t pos, std::list<Poco::Int8>& val);
|
||||
/// Extracts an Int8 list.
|
||||
|
||||
bool extract(std::size_t pos, Poco::UInt8& val);
|
||||
/// Extracts an UInt8.
|
||||
|
||||
bool extract(std::size_t pos, std::vector<Poco::UInt8>& val);
|
||||
/// Extracts an UInt8 vector.
|
||||
|
||||
bool extract(std::size_t pos, std::deque<Poco::UInt8>& val);
|
||||
/// Extracts an UInt8 deque.
|
||||
|
||||
bool extract(std::size_t pos, std::list<Poco::UInt8>& val);
|
||||
/// Extracts an UInt8 list.
|
||||
|
||||
bool extract(std::size_t pos, Poco::Int16& val);
|
||||
/// Extracts an Int16.
|
||||
|
||||
bool extract(std::size_t pos, std::vector<Poco::Int16>& val);
|
||||
/// Extracts an Int16 vector.
|
||||
|
||||
bool extract(std::size_t pos, std::deque<Poco::Int16>& val);
|
||||
/// Extracts an Int16 deque.
|
||||
|
||||
bool extract(std::size_t pos, std::list<Poco::Int16>& val);
|
||||
/// Extracts an Int16 list.
|
||||
|
||||
bool extract(std::size_t pos, Poco::UInt16& val);
|
||||
/// Extracts an UInt16.
|
||||
|
||||
bool extract(std::size_t pos, std::vector<Poco::UInt16>& val);
|
||||
/// Extracts an UInt16 vector.
|
||||
|
||||
bool extract(std::size_t pos, std::deque<Poco::UInt16>& val);
|
||||
/// Extracts an UInt16 deque.
|
||||
|
||||
bool extract(std::size_t pos, std::list<Poco::UInt16>& val);
|
||||
/// Extracts an UInt16 list.
|
||||
|
||||
bool extract(std::size_t pos, Poco::Int32& val);
|
||||
/// Extracts an Int32.
|
||||
|
||||
bool extract(std::size_t pos, std::vector<Poco::Int32>& val);
|
||||
/// Extracts an Int32 vector.
|
||||
|
||||
bool extract(std::size_t pos, std::deque<Poco::Int32>& val);
|
||||
/// Extracts an Int32 deque.
|
||||
|
||||
bool extract(std::size_t pos, std::list<Poco::Int32>& val);
|
||||
/// Extracts an Int32 list.
|
||||
|
||||
bool extract(std::size_t pos, Poco::UInt32& val);
|
||||
/// Extracts an UInt32.
|
||||
|
||||
bool extract(std::size_t pos, std::vector<Poco::UInt32>& val);
|
||||
/// Extracts an UInt32 vector.
|
||||
|
||||
bool extract(std::size_t pos, std::deque<Poco::UInt32>& val);
|
||||
/// Extracts an UInt32 deque.
|
||||
|
||||
bool extract(std::size_t pos, std::list<Poco::UInt32>& val);
|
||||
/// Extracts an UInt32 list.
|
||||
|
||||
bool extract(std::size_t pos, Poco::Int64& val);
|
||||
/// Extracts an Int64.
|
||||
|
||||
bool extract(std::size_t pos, std::vector<Poco::Int64>& val);
|
||||
/// Extracts an Int64 vector.
|
||||
|
||||
bool extract(std::size_t pos, std::deque<Poco::Int64>& val);
|
||||
/// Extracts an Int64 deque.
|
||||
|
||||
bool extract(std::size_t pos, std::list<Poco::Int64>& val);
|
||||
/// Extracts an Int64 list.
|
||||
|
||||
bool extract(std::size_t pos, Poco::UInt64& val);
|
||||
/// Extracts an UInt64.
|
||||
|
||||
bool extract(std::size_t pos, std::vector<Poco::UInt64>& val);
|
||||
/// Extracts an UInt64 vector.
|
||||
|
||||
bool extract(std::size_t pos, std::deque<Poco::UInt64>& val);
|
||||
/// Extracts an UInt64 deque.
|
||||
|
||||
bool extract(std::size_t pos, std::list<Poco::UInt64>& val);
|
||||
/// Extracts an UInt64 list.
|
||||
|
||||
#ifndef POCO_INT64_IS_LONG
|
||||
bool extract(std::size_t pos, long& val);
|
||||
/// Extracts a long.
|
||||
|
||||
bool extract(std::size_t pos, unsigned long& val);
|
||||
/// Extracts an unsigned long.
|
||||
|
||||
bool extract(std::size_t pos, std::vector<long>& val);
|
||||
/// Extracts a long vector.
|
||||
|
||||
bool extract(std::size_t pos, std::deque<long>& val);
|
||||
/// Extracts a long deque.
|
||||
|
||||
bool extract(std::size_t pos, std::list<long>& val);
|
||||
/// Extracts a long list.
|
||||
#endif
|
||||
|
||||
bool extract(std::size_t pos, bool& val);
|
||||
/// Extracts a boolean.
|
||||
|
||||
bool extract(std::size_t pos, std::vector<bool>& val);
|
||||
/// Extracts a boolean vector.
|
||||
|
||||
bool extract(std::size_t pos, std::deque<bool>& val);
|
||||
/// Extracts a boolean deque.
|
||||
|
||||
bool extract(std::size_t pos, std::list<bool>& val);
|
||||
/// Extracts a boolean list.
|
||||
|
||||
bool extract(std::size_t pos, float& val);
|
||||
/// Extracts a float.
|
||||
|
||||
bool extract(std::size_t pos, std::vector<float>& val);
|
||||
/// Extracts a float vector.
|
||||
|
||||
bool extract(std::size_t pos, std::deque<float>& val);
|
||||
/// Extracts a float deque.
|
||||
|
||||
bool extract(std::size_t pos, std::list<float>& val);
|
||||
/// Extracts a float list.
|
||||
|
||||
bool extract(std::size_t pos, double& val);
|
||||
/// Extracts a double.
|
||||
|
||||
bool extract(std::size_t pos, std::vector<double>& val);
|
||||
/// Extracts a double vector.
|
||||
|
||||
bool extract(std::size_t pos, std::deque<double>& val);
|
||||
/// Extracts a double deque.
|
||||
|
||||
bool extract(std::size_t pos, std::list<double>& val);
|
||||
/// Extracts a double list.
|
||||
|
||||
bool extract(std::size_t pos, char& val);
|
||||
/// Extracts a single character.
|
||||
|
||||
bool extract(std::size_t pos, std::vector<char>& val);
|
||||
/// Extracts a single character vector.
|
||||
|
||||
bool extract(std::size_t pos, std::deque<char>& val);
|
||||
/// Extracts a single character deque.
|
||||
|
||||
bool extract(std::size_t pos, std::list<char>& val);
|
||||
/// Extracts a single character list.
|
||||
|
||||
bool extract(std::size_t pos, std::string& val);
|
||||
/// Extracts a string.
|
||||
|
||||
bool extract(std::size_t pos, std::vector<std::string>& val);
|
||||
/// Extracts a string vector.
|
||||
|
||||
bool extract(std::size_t pos, std::deque<std::string>& val);
|
||||
/// Extracts a string deque.
|
||||
|
||||
bool extract(std::size_t pos, std::list<std::string>& val);
|
||||
/// Extracts a string list.
|
||||
/// Extracts a single character list.
|
||||
|
||||
bool extract(std::size_t pos, UTF16String& val);
|
||||
/// Extracts a string.
|
||||
|
||||
bool extract(std::size_t pos, std::vector<UTF16String>& val);
|
||||
/// Extracts a string vector.
|
||||
|
||||
bool extract(std::size_t pos, std::deque<UTF16String>& val);
|
||||
/// Extracts a string deque.
|
||||
|
||||
bool extract(std::size_t pos, std::list<UTF16String>& val);
|
||||
/// Extracts a string list.
|
||||
|
||||
bool extract(std::size_t pos, Poco::Data::BLOB& val);
|
||||
/// Extracts a BLOB.
|
||||
|
||||
bool extract(std::size_t pos, Poco::Data::CLOB& val);
|
||||
/// Extracts a CLOB.
|
||||
|
||||
bool extract(std::size_t pos, std::vector<Poco::Data::BLOB>& val);
|
||||
/// Extracts a BLOB vector.
|
||||
|
||||
bool extract(std::size_t pos, std::deque<Poco::Data::BLOB>& val);
|
||||
/// Extracts a BLOB deque.
|
||||
|
||||
bool extract(std::size_t pos, std::list<Poco::Data::BLOB>& val);
|
||||
/// Extracts a BLOB list.
|
||||
|
||||
bool extract(std::size_t pos, std::vector<Poco::Data::CLOB>& val);
|
||||
/// Extracts a CLOB vector.
|
||||
|
||||
bool extract(std::size_t pos, std::deque<Poco::Data::CLOB>& val);
|
||||
/// Extracts a CLOB deque.
|
||||
|
||||
bool extract(std::size_t pos, std::list<Poco::Data::CLOB>& val);
|
||||
/// Extracts a CLOB list.
|
||||
|
||||
bool extract(std::size_t pos, Poco::Data::Date& val);
|
||||
/// Extracts a Date.
|
||||
|
||||
bool extract(std::size_t pos, std::vector<Poco::Data::Date>& val);
|
||||
/// Extracts a Date vector.
|
||||
|
||||
bool extract(std::size_t pos, std::deque<Poco::Data::Date>& val);
|
||||
/// Extracts a Date deque.
|
||||
|
||||
bool extract(std::size_t pos, std::list<Poco::Data::Date>& val);
|
||||
/// Extracts a Date list.
|
||||
|
||||
bool extract(std::size_t pos, Poco::Data::Time& val);
|
||||
/// Extracts a Time.
|
||||
|
||||
bool extract(std::size_t pos, std::vector<Poco::Data::Time>& val);
|
||||
/// Extracts a Time vector.
|
||||
|
||||
bool extract(std::size_t pos, std::deque<Poco::Data::Time>& val);
|
||||
/// Extracts a Time deque.
|
||||
|
||||
bool extract(std::size_t pos, std::list<Poco::Data::Time>& val);
|
||||
/// Extracts a Time list.
|
||||
|
||||
bool extract(std::size_t pos, Poco::DateTime& val);
|
||||
/// Extracts a DateTime.
|
||||
|
||||
bool extract(std::size_t pos, std::vector<Poco::DateTime>& val);
|
||||
/// Extracts a DateTime vector.
|
||||
|
||||
bool extract(std::size_t pos, std::deque<Poco::DateTime>& val);
|
||||
/// Extracts a DateTime deque.
|
||||
|
||||
bool extract(std::size_t pos, std::list<Poco::DateTime>& val);
|
||||
/// Extracts a DateTime list.
|
||||
|
||||
bool extract(std::size_t pos, Poco::Any& val);
|
||||
/// Extracts an Any.
|
||||
|
||||
bool extract(std::size_t pos, std::vector<Poco::Any>& val);
|
||||
/// Extracts an Any vector.
|
||||
|
||||
bool extract(std::size_t pos, std::deque<Poco::Any>& val);
|
||||
/// Extracts an Any deque.
|
||||
|
||||
bool extract(std::size_t pos, std::list<Poco::Any>& val);
|
||||
/// Extracts an Any list.
|
||||
|
||||
bool extract(std::size_t pos, Poco::DynamicAny& val);
|
||||
/// Extracts a DynamicAny.
|
||||
|
||||
bool extract(std::size_t pos, std::vector<Poco::DynamicAny>& val);
|
||||
/// Extracts a DynamicAny vector.
|
||||
|
||||
bool extract(std::size_t pos, std::deque<Poco::DynamicAny>& val);
|
||||
/// Extracts a DynamicAny deque.
|
||||
|
||||
bool extract(std::size_t pos, std::list<Poco::DynamicAny>& val);
|
||||
/// Extracts a DynamicAny list.
|
||||
|
||||
void setDataExtraction(Preparator::DataExtraction ext);
|
||||
/// Set data extraction mode.
|
||||
|
||||
Preparator::DataExtraction getDataExtraction() const;
|
||||
/// Returns data extraction mode.
|
||||
|
||||
bool isNull(std::size_t col, std::size_t row = POCO_DATA_INVALID_ROW);
|
||||
/// Returns true if the value at [col,row] is null.
|
||||
|
||||
void reset();
|
||||
/// Resets the internally cached length indicators.
|
||||
|
||||
private:
|
||||
static const int CHUNK_SIZE = 1024;
|
||||
/// Amount of data retrieved in one SQLGetData() request when doing manual extract.
|
||||
|
||||
static const std::string FLD_SIZE_EXCEEDED_FMT;
|
||||
/// String format for the exception message when the field size is exceeded.
|
||||
|
||||
void checkDataSize(std::size_t size);
|
||||
/// This check is only performed for bound data
|
||||
/// retrieval from variable length columns.
|
||||
/// The reason for this check is to ensure we can
|
||||
/// accept the value ODBC driver is supplying
|
||||
/// (i.e. the bound buffer is large enough to receive
|
||||
/// the returned value)
|
||||
|
||||
void resizeLengths(std::size_t pos);
|
||||
/// Resizes the vector holding extracted data lengths to the
|
||||
/// appropriate size.
|
||||
|
||||
template<typename T>
|
||||
bool extractBoundImpl(std::size_t pos, T& val)
|
||||
{
|
||||
if (isNull(pos)) return false;
|
||||
poco_assert_dbg (typeid(T) == _pPreparator->at(pos).type());
|
||||
val = *AnyCast<T>(&_pPreparator->at(pos));
|
||||
return true;
|
||||
}
|
||||
|
||||
bool extractBoundImpl(std::size_t pos, Poco::Data::BLOB& val);
|
||||
bool extractBoundImpl(std::size_t pos, Poco::Data::CLOB& val);
|
||||
|
||||
template <typename C>
|
||||
bool extractBoundImplContainer(std::size_t pos, C& val)
|
||||
{
|
||||
typedef typename C::value_type Type;
|
||||
poco_assert_dbg (typeid(std::vector<Type>) == _pPreparator->at(pos).type());
|
||||
std::vector<Type>& v = RefAnyCast<std::vector<Type> >(_pPreparator->at(pos));
|
||||
val.assign(v.begin(), v.end());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool extractBoundImplContainer(std::size_t pos, std::vector<std::string>& values);
|
||||
bool extractBoundImplContainer(std::size_t pos, std::deque<std::string>& values);
|
||||
bool extractBoundImplContainer(std::size_t pos, std::list<std::string>& values);
|
||||
bool extractBoundImplContainer(std::size_t pos, std::vector<Poco::UTF16String>& values);
|
||||
bool extractBoundImplContainer(std::size_t pos, std::deque<Poco::UTF16String>& values);
|
||||
bool extractBoundImplContainer(std::size_t pos, std::list<Poco::UTF16String>& values);
|
||||
bool extractBoundImplContainer(std::size_t pos, std::vector<Poco::Data::CLOB>& values);
|
||||
bool extractBoundImplContainer(std::size_t pos, std::deque<Poco::Data::CLOB>& values);
|
||||
bool extractBoundImplContainer(std::size_t pos, std::list<Poco::Data::CLOB>& values);
|
||||
bool extractBoundImplContainer(std::size_t pos, std::vector<Poco::Data::BLOB>& values);
|
||||
bool extractBoundImplContainer(std::size_t pos, std::deque<Poco::Data::BLOB>& values);
|
||||
bool extractBoundImplContainer(std::size_t pos, std::list<Poco::Data::BLOB>& values);
|
||||
|
||||
template <typename C>
|
||||
bool extractBoundImplContainerString(std::size_t pos, C& values)
|
||||
{
|
||||
typedef typename C::value_type StringType;
|
||||
typedef typename C::iterator ItType;
|
||||
typedef typename StringType::value_type CharType;
|
||||
|
||||
CharType** pc = AnyCast<CharType*>(&(_pPreparator->at(pos)));
|
||||
poco_assert_dbg (pc);
|
||||
poco_assert_dbg (_pPreparator->bulkSize() == values.size());
|
||||
std::size_t colWidth = columnSize(pos);
|
||||
ItType it = values.begin();
|
||||
ItType end = values.end();
|
||||
for (int row = 0; it != end; ++it, ++row)
|
||||
{
|
||||
it->assign(*pc + row * colWidth / sizeof(CharType), _pPreparator->actualDataSize(pos, row));
|
||||
// clean up superfluous null chars returned by some drivers
|
||||
typename StringType::size_type trimLen = 0;
|
||||
typename StringType::reverse_iterator sIt = it->rbegin();
|
||||
typename StringType::reverse_iterator sEnd = it->rend();
|
||||
for (; sIt != sEnd; ++sIt)
|
||||
{
|
||||
if (*sIt == '\0') ++trimLen;
|
||||
else break;
|
||||
}
|
||||
if (trimLen) it->assign(it->begin(), it->begin() + it->length() - trimLen);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
template <typename C>
|
||||
bool extractBoundImplContainerLOB(std::size_t pos, C& values)
|
||||
{
|
||||
typedef typename C::value_type LOBType;
|
||||
typedef typename LOBType::ValueType CharType;
|
||||
typedef typename C::iterator ItType;
|
||||
|
||||
CharType** pc = AnyCast<CharType*>(&(_pPreparator->at(pos)));
|
||||
poco_assert_dbg (pc);
|
||||
poco_assert_dbg (_pPreparator->bulkSize() == values.size());
|
||||
std::size_t colWidth = _pPreparator->maxDataSize(pos);
|
||||
ItType it = values.begin();
|
||||
ItType end = values.end();
|
||||
for (int row = 0; it != end; ++it, ++row)
|
||||
it->assignRaw(*pc + row * colWidth, _pPreparator->actualDataSize(pos, row));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
bool extractBoundImplLOB(std::size_t pos, Poco::Data::LOB<T>& val)
|
||||
{
|
||||
if (isNull(pos)) return false;
|
||||
|
||||
std::size_t dataSize = _pPreparator->actualDataSize(pos);
|
||||
checkDataSize(dataSize);
|
||||
T* sp = AnyCast<T*>(_pPreparator->at(pos));
|
||||
val.assignRaw(sp, dataSize);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
bool extractManualImpl(std::size_t pos, T& val, SQLSMALLINT cType)
|
||||
{
|
||||
SQLRETURN rc = 0;
|
||||
T value = (T) 0;
|
||||
|
||||
resizeLengths(pos);
|
||||
|
||||
rc = SQLGetData(_rStmt,
|
||||
(SQLUSMALLINT) pos + 1,
|
||||
cType, //C data type
|
||||
&value, //returned value
|
||||
0, //buffer length (ignored)
|
||||
&_lengths[pos]); //length indicator
|
||||
|
||||
if (Utility::isError(rc))
|
||||
throw StatementException(_rStmt, "SQLGetData()");
|
||||
|
||||
if (isNullLengthIndicator(_lengths[pos]))
|
||||
return false;
|
||||
else
|
||||
{
|
||||
//for fixed-length data, buffer must be large enough
|
||||
//otherwise, driver may write past the end
|
||||
poco_assert_dbg (_lengths[pos] <= sizeof(T));
|
||||
val = value;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
template <typename T, typename NT>
|
||||
bool extAny(std::size_t pos, T& val)
|
||||
{
|
||||
NT i;
|
||||
if (extract(pos, i))
|
||||
{
|
||||
val = i;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
val = Nullable<NT>();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
bool extractImpl(std::size_t pos, T& val)
|
||||
/// Utility function for extraction of Any and DynamicAny.
|
||||
{
|
||||
ODBCMetaColumn column(_rStmt, pos);
|
||||
|
||||
switch (column.type())
|
||||
{
|
||||
case MetaColumn::FDT_INT8:
|
||||
{ return extAny<T, Poco::Int8>(pos, val); }
|
||||
|
||||
case MetaColumn::FDT_UINT8:
|
||||
{ return extAny<T, Poco::UInt8>(pos, val); }
|
||||
|
||||
case MetaColumn::FDT_INT16:
|
||||
{ return extAny<T, Poco::Int16>(pos, val); }
|
||||
|
||||
case MetaColumn::FDT_UINT16:
|
||||
{ return extAny<T, Poco::UInt16>(pos, val); }
|
||||
|
||||
case MetaColumn::FDT_INT32:
|
||||
{ return extAny<T, Poco::Int32>(pos, val); }
|
||||
|
||||
case MetaColumn::FDT_UINT32:
|
||||
{ return extAny<T, Poco::UInt32>(pos, val); }
|
||||
|
||||
case MetaColumn::FDT_INT64:
|
||||
{ return extAny<T, Poco::Int64>(pos, val); }
|
||||
|
||||
case MetaColumn::FDT_UINT64:
|
||||
{ return extAny<T, Poco::UInt64>(pos, val); }
|
||||
|
||||
case MetaColumn::FDT_BOOL:
|
||||
{ return extAny<T, bool>(pos, val); }
|
||||
|
||||
case MetaColumn::FDT_FLOAT:
|
||||
{ return extAny<T, float>(pos, val); }
|
||||
|
||||
case MetaColumn::FDT_DOUBLE:
|
||||
{ return extAny<T, double>(pos, val); }
|
||||
|
||||
case MetaColumn::FDT_STRING:
|
||||
{ return extAny<T, std::string>(pos, val); }
|
||||
|
||||
case MetaColumn::FDT_WSTRING:
|
||||
{ return extAny<T, Poco::UTF16String>(pos, val); }
|
||||
|
||||
case MetaColumn::FDT_BLOB:
|
||||
{ return extAny<T, Poco::Data::BLOB>(pos, val); }
|
||||
|
||||
case MetaColumn::FDT_CLOB:
|
||||
{ return extAny<T, Poco::Data::CLOB>(pos, val); }
|
||||
|
||||
case MetaColumn::FDT_DATE:
|
||||
{ return extAny<T, Poco::Data::Date>(pos, val); }
|
||||
|
||||
case MetaColumn::FDT_TIME:
|
||||
{ return extAny<T, Poco::Data::Time>(pos, val); }
|
||||
|
||||
case MetaColumn::FDT_TIMESTAMP:
|
||||
{ return extAny<T, Poco::DateTime>(pos, val); }
|
||||
|
||||
default:
|
||||
throw DataFormatException("Unsupported data type.");
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool isNullLengthIndicator(SQLLEN val) const;
|
||||
/// The reason for this utility wrapper are platforms where
|
||||
/// SQLLEN macro (a.k.a. SQLINTEGER) yields 64-bit value,
|
||||
/// while SQL_NULL_DATA (#define'd as -1 literal) remains 32-bit.
|
||||
|
||||
SQLINTEGER columnSize(std::size_t pos) const;
|
||||
|
||||
const StatementHandle& _rStmt;
|
||||
PreparatorPtr _pPreparator;
|
||||
Preparator::DataExtraction _dataExtraction;
|
||||
std::vector<SQLLEN> _lengths;
|
||||
};
|
||||
|
||||
|
||||
///
|
||||
/// inlines
|
||||
///
|
||||
|
||||
inline bool Extractor::extractBoundImpl(std::size_t pos, Poco::Data::BLOB& val)
|
||||
{
|
||||
return extractBoundImplLOB<BLOB::ValueType>(pos, val);
|
||||
}
|
||||
|
||||
|
||||
inline bool Extractor::extractBoundImpl(std::size_t pos, Poco::Data::CLOB& val)
|
||||
{
|
||||
return extractBoundImplLOB<CLOB::ValueType>(pos, val);
|
||||
}
|
||||
|
||||
|
||||
inline bool Extractor::extractBoundImplContainer(std::size_t pos, std::vector<std::string>& values)
|
||||
{
|
||||
return extractBoundImplContainerString(pos, values);
|
||||
}
|
||||
|
||||
|
||||
inline bool Extractor::extractBoundImplContainer(std::size_t pos, std::deque<std::string>& values)
|
||||
{
|
||||
return extractBoundImplContainerString(pos, values);
|
||||
}
|
||||
|
||||
|
||||
inline bool Extractor::extractBoundImplContainer(std::size_t pos, std::list<std::string>& values)
|
||||
{
|
||||
return extractBoundImplContainerString(pos, values);
|
||||
}
|
||||
|
||||
|
||||
inline bool Extractor::extractBoundImplContainer(std::size_t pos, std::vector<Poco::UTF16String>& values)
|
||||
{
|
||||
return extractBoundImplContainerString(pos, values);
|
||||
}
|
||||
|
||||
|
||||
inline bool Extractor::extractBoundImplContainer(std::size_t pos, std::deque<Poco::UTF16String>& values)
|
||||
{
|
||||
return extractBoundImplContainerString(pos, values);
|
||||
}
|
||||
|
||||
|
||||
inline bool Extractor::extractBoundImplContainer(std::size_t pos, std::list<Poco::UTF16String>& values)
|
||||
{
|
||||
return extractBoundImplContainerString(pos, values);
|
||||
}
|
||||
|
||||
|
||||
inline bool Extractor::extractBoundImplContainer(std::size_t pos,
|
||||
std::vector<Poco::Data::CLOB>& values)
|
||||
{
|
||||
return extractBoundImplContainerLOB(pos, values);
|
||||
}
|
||||
|
||||
|
||||
inline bool Extractor::extractBoundImplContainer(std::size_t pos,
|
||||
std::deque<Poco::Data::CLOB>& values)
|
||||
{
|
||||
return extractBoundImplContainerLOB(pos, values);
|
||||
}
|
||||
|
||||
|
||||
inline bool Extractor::extractBoundImplContainer(std::size_t pos,
|
||||
std::list<Poco::Data::CLOB>& values)
|
||||
{
|
||||
return extractBoundImplContainerLOB(pos, values);
|
||||
}
|
||||
|
||||
|
||||
inline bool Extractor::extractBoundImplContainer(std::size_t pos,
|
||||
std::vector<Poco::Data::BLOB>& values)
|
||||
{
|
||||
return extractBoundImplContainerLOB(pos, values);
|
||||
}
|
||||
|
||||
|
||||
inline bool Extractor::extractBoundImplContainer(std::size_t pos,
|
||||
std::deque<Poco::Data::BLOB>& values)
|
||||
{
|
||||
return extractBoundImplContainerLOB(pos, values);
|
||||
}
|
||||
|
||||
|
||||
inline bool Extractor::extractBoundImplContainer(std::size_t pos,
|
||||
std::list<Poco::Data::BLOB>& values)
|
||||
{
|
||||
return extractBoundImplContainerLOB(pos, values);
|
||||
}
|
||||
|
||||
|
||||
inline void Extractor::setDataExtraction(Preparator::DataExtraction ext)
|
||||
{
|
||||
_pPreparator->setDataExtraction(_dataExtraction = ext);
|
||||
}
|
||||
|
||||
|
||||
inline Preparator::DataExtraction Extractor::getDataExtraction() const
|
||||
{
|
||||
return _dataExtraction;
|
||||
}
|
||||
|
||||
|
||||
inline void Extractor::reset()
|
||||
{
|
||||
_lengths.clear();
|
||||
}
|
||||
|
||||
|
||||
inline void Extractor::resizeLengths(std::size_t pos)
|
||||
{
|
||||
if (pos >= _lengths.size())
|
||||
_lengths.resize(pos + 1, (SQLLEN) 0);
|
||||
}
|
||||
|
||||
|
||||
inline bool Extractor::isNullLengthIndicator(SQLLEN val) const
|
||||
{
|
||||
return SQL_NULL_DATA == (int) val;
|
||||
}
|
||||
|
||||
|
||||
inline SQLINTEGER Extractor::columnSize(std::size_t pos) const
|
||||
{
|
||||
std::size_t size = ODBCMetaColumn(_rStmt, pos).length();
|
||||
std::size_t maxSize = _pPreparator->maxDataSize(pos);
|
||||
if (size > maxSize) size = maxSize;
|
||||
return (SQLINTEGER) size;
|
||||
}
|
||||
|
||||
|
||||
} } } // namespace Poco::Data::ODBC
|
||||
|
||||
|
||||
#endif // Data_ODBC_Extractor_INCLUDED
|
||||
@@ -0,0 +1,116 @@
|
||||
//
|
||||
// Handle.h
|
||||
//
|
||||
// Library: Data/ODBC
|
||||
// Package: ODBC
|
||||
// Module: Handle
|
||||
//
|
||||
// Definition of Handle.
|
||||
//
|
||||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#ifndef Data_ODBC_Handle_INCLUDED
|
||||
#define Data_ODBC_Handle_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Data/ODBC/ODBC.h"
|
||||
#include "Poco/Data/ODBC/EnvironmentHandle.h"
|
||||
#include "Poco/Data/ODBC/ConnectionHandle.h"
|
||||
#include "Poco/Data/ODBC/ODBCException.h"
|
||||
#include "Poco/Data/ODBC/Utility.h"
|
||||
#ifdef POCO_OS_FAMILY_WINDOWS
|
||||
#include <windows.h>
|
||||
#endif
|
||||
#include <sqltypes.h>
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Data {
|
||||
namespace ODBC {
|
||||
|
||||
|
||||
template <typename H, SQLSMALLINT handleType>
|
||||
class Handle
|
||||
/// ODBC handle class template
|
||||
{
|
||||
public:
|
||||
Handle(const ConnectionHandle& rConnection):
|
||||
_rConnection(rConnection),
|
||||
_handle(0)
|
||||
/// Creates the Handle.
|
||||
{
|
||||
if (Utility::isError(SQLAllocHandle(handleType,
|
||||
_rConnection,
|
||||
&_handle)))
|
||||
{
|
||||
throw ODBCException("Could not allocate statement handle.");
|
||||
}
|
||||
}
|
||||
|
||||
~Handle()
|
||||
/// Destroys the Handle.
|
||||
{
|
||||
try
|
||||
{
|
||||
#if defined(_DEBUG)
|
||||
SQLRETURN rc =
|
||||
#endif
|
||||
SQLFreeHandle(handleType, _handle);
|
||||
// N.B. Destructors should not throw, but neither do we want to
|
||||
// leak resources. So, we throw here in debug mode if things go bad.
|
||||
poco_assert_dbg (!Utility::isError(rc));
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
poco_unexpected();
|
||||
}
|
||||
}
|
||||
|
||||
operator const H& () const
|
||||
/// Const conversion operator into reference to native type.
|
||||
{
|
||||
return handle();
|
||||
}
|
||||
|
||||
const H& handle() const
|
||||
/// Returns const reference to native type.
|
||||
{
|
||||
return _handle;
|
||||
}
|
||||
|
||||
private:
|
||||
Handle(const Handle&);
|
||||
const Handle& operator=(const Handle&);
|
||||
|
||||
operator H& ()
|
||||
/// Conversion operator into reference to native type.
|
||||
{
|
||||
return handle();
|
||||
}
|
||||
|
||||
H& handle()
|
||||
/// Returns reference to native type.
|
||||
{
|
||||
return _handle;
|
||||
}
|
||||
|
||||
const ConnectionHandle& _rConnection;
|
||||
H _handle;
|
||||
|
||||
friend class ODBCStatementImpl;
|
||||
};
|
||||
|
||||
|
||||
typedef Handle<SQLHSTMT, SQL_HANDLE_STMT> StatementHandle;
|
||||
typedef Handle<SQLHDESC, SQL_HANDLE_DESC> DescriptorHandle;
|
||||
|
||||
|
||||
} } } // namespace Poco::Data::ODBC
|
||||
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,69 @@
|
||||
//
|
||||
// ODBC.h
|
||||
//
|
||||
// Library: Data/ODBC
|
||||
// Package: ODBC
|
||||
// Module: ODBC
|
||||
//
|
||||
// Basic definitions for the Poco ODBC library.
|
||||
// This file must be the first file included by every other ODBC
|
||||
// header file.
|
||||
//
|
||||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#ifndef Data_ODBC_ODBC_INCLUDED
|
||||
#define Data_ODBC_ODBC_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Foundation.h"
|
||||
#ifdef POCO_OS_FAMILY_WINDOWS
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
|
||||
//
|
||||
// The following block is the standard way of creating macros which make exporting
|
||||
// from a DLL simpler. All files within this DLL are compiled with the ODBC_EXPORTS
|
||||
// symbol defined on the command line. this symbol should not be defined on any project
|
||||
// that uses this DLL. This way any other project whose source files include this file see
|
||||
// ODBC_API functions as being imported from a DLL, wheras this DLL sees symbols
|
||||
// defined with this macro as being exported.
|
||||
//
|
||||
#if defined(_WIN32) && defined(POCO_DLL)
|
||||
#if defined(ODBC_EXPORTS)
|
||||
#define ODBC_API __declspec(dllexport)
|
||||
#else
|
||||
#define ODBC_API __declspec(dllimport)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#if !defined(ODBC_API)
|
||||
#if !defined(POCO_NO_GCC_API_ATTRIBUTE) && defined (__GNUC__) && (__GNUC__ >= 4)
|
||||
#define ODBC_API __attribute__ ((visibility ("default")))
|
||||
#else
|
||||
#define ODBC_API
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#include "Poco/Data/ODBC/Unicode.h"
|
||||
|
||||
|
||||
//
|
||||
// Automatically link Data library.
|
||||
//
|
||||
#if defined(_MSC_VER)
|
||||
#if !defined(POCO_NO_AUTOMATIC_LIBS) && !defined(ODBC_EXPORTS)
|
||||
#pragma comment(lib, "PocoDataODBC" POCO_LIB_SUFFIX)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#endif // ODBC_ODBC_INCLUDED
|
||||
@@ -0,0 +1,150 @@
|
||||
//
|
||||
// ODBCException.h
|
||||
//
|
||||
// Library: Data/ODBC
|
||||
// Package: ODBC
|
||||
// Module: ODBCException
|
||||
//
|
||||
// Definition of ODBCException.
|
||||
//
|
||||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#ifndef Data_ODBC_ODBCException_INCLUDED
|
||||
#define Data_ODBC_ODBCException_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Data/ODBC/ODBC.h"
|
||||
#include "Poco/Data/ODBC/Utility.h"
|
||||
#include "Poco/Data/ODBC/Diagnostics.h"
|
||||
#include "Poco/Data/ODBC/Error.h"
|
||||
#include "Poco/Data/DataException.h"
|
||||
#include "Poco/Format.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Data {
|
||||
namespace ODBC {
|
||||
|
||||
|
||||
POCO_DECLARE_EXCEPTION(ODBC_API, ODBCException, Poco::Data::DataException)
|
||||
POCO_DECLARE_EXCEPTION(ODBC_API, InsufficientStorageException, ODBCException)
|
||||
POCO_DECLARE_EXCEPTION(ODBC_API, UnknownDataLengthException, ODBCException)
|
||||
POCO_DECLARE_EXCEPTION(ODBC_API, DataTruncatedException, ODBCException)
|
||||
|
||||
|
||||
template <class H, SQLSMALLINT handleType>
|
||||
class HandleException: public ODBCException
|
||||
{
|
||||
public:
|
||||
HandleException(const H& handle): _error(handle)
|
||||
/// Creates HandleException
|
||||
{
|
||||
message(_error.toString());
|
||||
}
|
||||
|
||||
HandleException(const H& handle, const std::string& msg):
|
||||
ODBCException(msg),
|
||||
_error(handle)
|
||||
/// Creates HandleException
|
||||
{
|
||||
extendedMessage(_error.toString());
|
||||
}
|
||||
|
||||
HandleException(const H& handle, const std::string& msg, const std::string& arg):
|
||||
ODBCException(msg, arg),
|
||||
_error(handle)
|
||||
/// Creates HandleException
|
||||
{
|
||||
}
|
||||
|
||||
HandleException(const H& handle, const std::string& msg, const Poco::Exception& exc):
|
||||
ODBCException(msg, exc),
|
||||
_error(handle)
|
||||
/// Creates HandleException
|
||||
{
|
||||
}
|
||||
|
||||
HandleException(const HandleException& exc):
|
||||
ODBCException(exc),
|
||||
_error(exc._error)
|
||||
/// Creates HandleException
|
||||
{
|
||||
}
|
||||
|
||||
~HandleException() noexcept
|
||||
/// Destroys HandleException
|
||||
{
|
||||
}
|
||||
|
||||
HandleException& operator = (const HandleException& exc)
|
||||
/// Assignment operator
|
||||
{
|
||||
if (&exc != this) _error = exc._error;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
const char* name() const noexcept
|
||||
/// Returns the name of the exception
|
||||
{
|
||||
return "ODBC handle exception";
|
||||
}
|
||||
|
||||
const char* className() const noexcept
|
||||
/// Returns the HandleException class name.
|
||||
{
|
||||
return typeid(*this).name();
|
||||
}
|
||||
|
||||
Poco::Exception* clone() const
|
||||
/// Clones the HandleException
|
||||
{
|
||||
return new HandleException(*this);
|
||||
}
|
||||
|
||||
void rethrow() const
|
||||
/// Re-throws the HandleException.
|
||||
{
|
||||
throw *this;
|
||||
}
|
||||
|
||||
const Diagnostics<H, handleType>& diagnostics() const
|
||||
/// Returns error diagnostics.
|
||||
{
|
||||
return _error.diagnostics();
|
||||
}
|
||||
|
||||
std::string toString() const
|
||||
/// Returns the formatted error diagnostics for the handle.
|
||||
{
|
||||
return Poco::format("ODBC Error: %s\n===================\n%s\n",
|
||||
std::string(what()),
|
||||
_error.toString());
|
||||
}
|
||||
|
||||
static std::string errorString(const H& handle)
|
||||
/// Returns the error diagnostics string for the handle.
|
||||
{
|
||||
return Error<H, handleType>(handle).toString();
|
||||
}
|
||||
|
||||
private:
|
||||
Error<H, handleType> _error;
|
||||
};
|
||||
|
||||
|
||||
typedef HandleException<SQLHENV, SQL_HANDLE_ENV> EnvironmentException;
|
||||
typedef HandleException<SQLHDBC, SQL_HANDLE_DBC> ConnectionException;
|
||||
typedef HandleException<SQLHSTMT, SQL_HANDLE_STMT> StatementException;
|
||||
typedef HandleException<SQLHDESC, SQL_HANDLE_DESC> DescriptorException;
|
||||
|
||||
|
||||
} } } // namespace Poco::Data::ODBC
|
||||
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,92 @@
|
||||
//
|
||||
// ODBCMetaColumn.h
|
||||
//
|
||||
// Library: Data/ODBC
|
||||
// Package: ODBC
|
||||
// Module: ODBCMetaColumn
|
||||
//
|
||||
// Definition of ODBCMetaColumn.
|
||||
//
|
||||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#ifndef Data_ODBC_ODBCColumn_INCLUDED
|
||||
#define Data_ODBC_ODBCColumn_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Data/ODBC/ODBC.h"
|
||||
#include "Poco/Data/ODBC/Error.h"
|
||||
#include "Poco/Data/ODBC/Handle.h"
|
||||
#include "Poco/Data/ODBC/ODBCException.h"
|
||||
#include "Poco/Data/MetaColumn.h"
|
||||
#ifdef POCO_OS_FAMILY_WINDOWS
|
||||
#include <windows.h>
|
||||
#endif
|
||||
#include <sqlext.h>
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Data {
|
||||
namespace ODBC {
|
||||
|
||||
|
||||
class ODBC_API ODBCMetaColumn: public MetaColumn
|
||||
{
|
||||
public:
|
||||
explicit ODBCMetaColumn(const StatementHandle& rStmt, std::size_t position);
|
||||
/// Creates the ODBCMetaColumn.
|
||||
|
||||
~ODBCMetaColumn();
|
||||
/// Destroys the ODBCMetaColumn.
|
||||
|
||||
std::size_t dataLength() const;
|
||||
/// A numeric value that is either the maximum or actual character length of a character
|
||||
/// string or binary data type. It is the maximum character length for a fixed-length data type,
|
||||
/// or the actual character length for a variable-length data type. Its value always excludes the
|
||||
/// null-termination byte that ends the character string.
|
||||
/// This information is returned from the SQL_DESC_LENGTH record field of the IRD.
|
||||
|
||||
bool isUnsigned() const;
|
||||
/// Returns true if column is unsigned or a non-numeric data type.
|
||||
|
||||
private:
|
||||
ODBCMetaColumn();
|
||||
|
||||
static const int NAME_BUFFER_LENGTH = 2048;
|
||||
|
||||
struct ColumnDescription
|
||||
{
|
||||
SQLCHAR name[NAME_BUFFER_LENGTH];
|
||||
SQLSMALLINT nameBufferLength;
|
||||
SQLSMALLINT dataType;
|
||||
SQLULEN size;
|
||||
SQLSMALLINT decimalDigits;
|
||||
SQLSMALLINT isNullable;
|
||||
};
|
||||
|
||||
void init();
|
||||
void getDescription();
|
||||
|
||||
SQLLEN _dataLength;
|
||||
const StatementHandle& _rStmt;
|
||||
ColumnDescription _columnDesc;
|
||||
};
|
||||
|
||||
|
||||
///
|
||||
/// inlines
|
||||
///
|
||||
inline std::size_t ODBCMetaColumn::dataLength() const
|
||||
{
|
||||
return _dataLength;
|
||||
}
|
||||
|
||||
|
||||
} } } // namespace Poco::Data::ODBC
|
||||
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,206 @@
|
||||
//
|
||||
// ODBCStatementImpl.h
|
||||
//
|
||||
// Library: Data/ODBC
|
||||
// Package: ODBC
|
||||
// Module: ODBCStatementImpl
|
||||
//
|
||||
// Definition of the ODBCStatementImpl class.
|
||||
//
|
||||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#ifndef Data_ODBC_ODBCStatementImpl_INCLUDED
|
||||
#define Data_ODBC_ODBCStatementImpl_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Data/ODBC/ODBC.h"
|
||||
#include "Poco/Data/ODBC/SessionImpl.h"
|
||||
#include "Poco/Data/ODBC/Binder.h"
|
||||
#include "Poco/Data/ODBC/Extractor.h"
|
||||
#include "Poco/Data/ODBC/Preparator.h"
|
||||
#include "Poco/Data/ODBC/ODBCMetaColumn.h"
|
||||
#include "Poco/Data/StatementImpl.h"
|
||||
#include "Poco/Data/Column.h"
|
||||
#include "Poco/SharedPtr.h"
|
||||
#include "Poco/Format.h"
|
||||
#include <sstream>
|
||||
#ifdef POCO_OS_FAMILY_WINDOWS
|
||||
#include <windows.h>
|
||||
#endif
|
||||
#include <sqltypes.h>
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Data {
|
||||
namespace ODBC {
|
||||
|
||||
|
||||
class ODBC_API ODBCStatementImpl: public Poco::Data::StatementImpl
|
||||
/// Implements statement functionality needed for ODBC
|
||||
{
|
||||
public:
|
||||
ODBCStatementImpl(SessionImpl& rSession);
|
||||
/// Creates the ODBCStatementImpl.
|
||||
|
||||
~ODBCStatementImpl();
|
||||
/// Destroys the ODBCStatementImpl.
|
||||
|
||||
protected:
|
||||
std::size_t columnsReturned() const;
|
||||
/// Returns number of columns returned by query.
|
||||
|
||||
int affectedRowCount() const;
|
||||
/// Returns the number of affected rows.
|
||||
/// Used to find out the number of rows affected by insert or update.
|
||||
|
||||
const MetaColumn& metaColumn(std::size_t pos) const;
|
||||
/// Returns column meta data.
|
||||
|
||||
bool hasNext();
|
||||
/// Returns true if a call to next() will return data.
|
||||
|
||||
std::size_t next();
|
||||
/// Retrieves the next row or set of rows from the resultset.
|
||||
/// Returns the number of rows retrieved.
|
||||
/// Will throw, if the resultset is empty.
|
||||
|
||||
bool canBind() const;
|
||||
/// Returns true if a valid statement is set and we can bind.
|
||||
|
||||
bool canCompile() const;
|
||||
/// Returns true if another compile is possible.
|
||||
|
||||
void compileImpl();
|
||||
/// Compiles the statement, doesn't bind yet.
|
||||
/// Does nothing if the statement has already been compiled.
|
||||
|
||||
void bindImpl();
|
||||
/// Binds all parameters and executes the statement.
|
||||
|
||||
AbstractExtraction::ExtractorPtr extractor();
|
||||
/// Returns the concrete extractor used by the statement.
|
||||
|
||||
AbstractBinding::BinderPtr binder();
|
||||
/// Returns the concrete binder used by the statement.
|
||||
|
||||
std::string nativeSQL();
|
||||
/// Returns the SQL string as modified by the driver.
|
||||
|
||||
private:
|
||||
typedef Poco::Data::AbstractBindingVec Bindings;
|
||||
typedef Poco::SharedPtr<Binder> BinderPtr;
|
||||
typedef Poco::Data::AbstractExtractionVec Extractions;
|
||||
typedef Poco::SharedPtr<Preparator> PreparatorPtr;
|
||||
typedef std::vector<PreparatorPtr> PreparatorVec;
|
||||
typedef Poco::SharedPtr<Extractor> ExtractorPtr;
|
||||
typedef std::vector<ExtractorPtr> ExtractorVec;
|
||||
typedef std::vector<ODBCMetaColumn*> ColumnPtrVec;
|
||||
typedef std::vector<ColumnPtrVec> ColumnPtrVecVec;
|
||||
|
||||
static const std::string INVALID_CURSOR_STATE;
|
||||
|
||||
void clear();
|
||||
/// Closes the cursor and resets indicator variables.
|
||||
|
||||
void doBind();
|
||||
/// Binds parameters.
|
||||
|
||||
void makeInternalExtractors();
|
||||
/// Creates internal extractors if none were supplied from the user.
|
||||
|
||||
bool isStoredProcedure() const;
|
||||
/// Returns true if SQL is a stored procedure call.
|
||||
|
||||
void doPrepare();
|
||||
/// Prepares placeholders for data returned by statement.
|
||||
/// It is called during statement compilation for SQL statements
|
||||
/// returning data. For stored procedures returning datasets,
|
||||
/// it is called upon the first check for data availability
|
||||
/// (see hasNext() function).
|
||||
|
||||
bool hasData() const;
|
||||
/// Returns true if statement returns data.
|
||||
|
||||
void makeStep();
|
||||
/// Fetches the next row of data.
|
||||
|
||||
bool nextRowReady() const;
|
||||
/// Returns true if there is a row fetched but not yet extracted.
|
||||
|
||||
void putData();
|
||||
/// Called whenever SQLExecute returns SQL_NEED_DATA. This is expected
|
||||
/// behavior for PB_AT_EXEC binding mode.
|
||||
|
||||
void getData();
|
||||
|
||||
void addPreparator();
|
||||
void fillColumns();
|
||||
void checkError(SQLRETURN rc, const std::string& msg="");
|
||||
|
||||
const SQLHDBC& _rConnection;
|
||||
const StatementHandle _stmt;
|
||||
PreparatorVec _preparations;
|
||||
BinderPtr _pBinder;
|
||||
ExtractorVec _extractors;
|
||||
bool _stepCalled;
|
||||
int _nextResponse;
|
||||
ColumnPtrVecVec _columnPtrs;
|
||||
bool _prepared;
|
||||
mutable std::size_t _affectedRowCount;
|
||||
bool _canCompile;
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// inlines
|
||||
//
|
||||
inline AbstractExtraction::ExtractorPtr ODBCStatementImpl::extractor()
|
||||
{
|
||||
poco_assert_dbg (currentDataSet() < _extractors.size());
|
||||
poco_assert_dbg (_extractors[currentDataSet()]);
|
||||
return _extractors[currentDataSet()];
|
||||
}
|
||||
|
||||
|
||||
inline AbstractBinding::BinderPtr ODBCStatementImpl::binder()
|
||||
{
|
||||
poco_assert_dbg (!_pBinder.isNull());
|
||||
return _pBinder;
|
||||
}
|
||||
|
||||
|
||||
inline std::size_t ODBCStatementImpl::columnsReturned() const
|
||||
{
|
||||
poco_assert_dbg (currentDataSet() < _preparations.size());
|
||||
poco_assert_dbg (_preparations[currentDataSet()]);
|
||||
return static_cast<std::size_t>(_preparations[currentDataSet()]->columns());
|
||||
}
|
||||
|
||||
|
||||
inline bool ODBCStatementImpl::hasData() const
|
||||
{
|
||||
return (columnsReturned() > 0);
|
||||
}
|
||||
|
||||
|
||||
inline bool ODBCStatementImpl::nextRowReady() const
|
||||
{
|
||||
return (!Utility::isError(_nextResponse));
|
||||
}
|
||||
|
||||
|
||||
inline bool ODBCStatementImpl::canCompile() const
|
||||
{
|
||||
return _canCompile;
|
||||
}
|
||||
|
||||
|
||||
} } } // namespace Poco::Data::ODBC
|
||||
|
||||
|
||||
#endif // Data_ODBC_ODBCStatementImpl_INCLUDED
|
||||
@@ -0,0 +1,111 @@
|
||||
//
|
||||
// Parameter.h
|
||||
//
|
||||
// Library: Data/ODBC
|
||||
// Package: ODBC
|
||||
// Module: Parameter
|
||||
//
|
||||
// Definition of Parameter.
|
||||
//
|
||||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#ifndef Data_ODBC_Parameter_INCLUDED
|
||||
#define Data_ODBC_Parameter_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Data/ODBC/ODBC.h"
|
||||
#include "Poco/Data/ODBC/Handle.h"
|
||||
#ifdef POCO_OS_FAMILY_WINDOWS
|
||||
#include <windows.h>
|
||||
#endif
|
||||
#include <sqlext.h>
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Data {
|
||||
namespace ODBC {
|
||||
|
||||
|
||||
class ODBC_API Parameter
|
||||
{
|
||||
public:
|
||||
explicit Parameter(const StatementHandle& rStmt, std::size_t colNum);
|
||||
/// Creates the Parameter.
|
||||
|
||||
~Parameter();
|
||||
/// Destroys the Parameter.
|
||||
|
||||
std::size_t number() const;
|
||||
/// Returns the column number.
|
||||
|
||||
std::size_t dataType() const;
|
||||
/// Returns the SQL data type.
|
||||
|
||||
std::size_t columnSize() const;
|
||||
/// Returns the the size of the column or expression of the corresponding
|
||||
/// parameter marker as defined by the data source.
|
||||
|
||||
std::size_t decimalDigits() const;
|
||||
/// Returns the number of decimal digits of the column or expression
|
||||
/// of the corresponding parameter as defined by the data source.
|
||||
|
||||
bool isNullable() const;
|
||||
/// Returns true if column allows null values, false otherwise.
|
||||
|
||||
private:
|
||||
Parameter();
|
||||
|
||||
void init();
|
||||
|
||||
SQLSMALLINT _dataType;
|
||||
SQLULEN _columnSize;
|
||||
SQLSMALLINT _decimalDigits;
|
||||
SQLSMALLINT _isNullable;
|
||||
|
||||
const StatementHandle& _rStmt;
|
||||
std::size_t _number;
|
||||
};
|
||||
|
||||
|
||||
///
|
||||
/// inlines
|
||||
///
|
||||
inline std::size_t Parameter::number() const
|
||||
{
|
||||
return _number;
|
||||
}
|
||||
|
||||
|
||||
inline std::size_t Parameter::dataType() const
|
||||
{
|
||||
return _dataType;
|
||||
}
|
||||
|
||||
|
||||
inline std::size_t Parameter::columnSize() const
|
||||
{
|
||||
return _columnSize;
|
||||
}
|
||||
|
||||
|
||||
inline std::size_t Parameter::decimalDigits() const
|
||||
{
|
||||
return _decimalDigits;
|
||||
}
|
||||
|
||||
|
||||
inline bool Parameter::isNullable() const
|
||||
{
|
||||
return SQL_NULLABLE == _isNullable;
|
||||
}
|
||||
|
||||
|
||||
} } } // namespace Poco::Data::ODBC
|
||||
|
||||
|
||||
#endif
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,297 @@
|
||||
//
|
||||
// SessionImpl.h
|
||||
//
|
||||
// Library: Data/ODBC
|
||||
// Package: ODBC
|
||||
// Module: SessionImpl
|
||||
//
|
||||
// Definition of the SessionImpl class.
|
||||
//
|
||||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#ifndef Data_ODBC_SessionImpl_INCLUDED
|
||||
#define Data_ODBC_SessionImpl_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Data/ODBC/ODBC.h"
|
||||
#include "Poco/Data/ODBC/Connector.h"
|
||||
#include "Poco/Data/ODBC/TypeInfo.h"
|
||||
#include "Poco/Data/ODBC/Binder.h"
|
||||
#include "Poco/Data/ODBC/Handle.h"
|
||||
#include "Poco/Data/ODBC/ODBCException.h"
|
||||
#include "Poco/Data/AbstractSessionImpl.h"
|
||||
#include "Poco/SharedPtr.h"
|
||||
#include "Poco/Mutex.h"
|
||||
#ifdef POCO_OS_FAMILY_WINDOWS
|
||||
#include <windows.h>
|
||||
#endif
|
||||
#include <sqltypes.h>
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Data {
|
||||
namespace ODBC {
|
||||
|
||||
|
||||
class ODBC_API SessionImpl: public Poco::Data::AbstractSessionImpl<SessionImpl>
|
||||
/// Implements SessionImpl interface
|
||||
{
|
||||
public:
|
||||
static const std::size_t ODBC_MAX_FIELD_SIZE = 1024u;
|
||||
|
||||
enum TransactionCapability
|
||||
{
|
||||
ODBC_TXN_CAPABILITY_UNKNOWN = -1,
|
||||
ODBC_TXN_CAPABILITY_FALSE = 0,
|
||||
ODBC_TXN_CAPABILITY_TRUE = 1
|
||||
};
|
||||
|
||||
SessionImpl(const std::string& connect,
|
||||
std::size_t loginTimeout,
|
||||
std::size_t maxFieldSize = ODBC_MAX_FIELD_SIZE,
|
||||
bool autoBind = true,
|
||||
bool autoExtract = true);
|
||||
/// Creates the SessionImpl. Opens a connection to the database.
|
||||
/// Throws NotConnectedException if connection was not succesful.
|
||||
|
||||
//@ deprecated
|
||||
SessionImpl(const std::string& connect,
|
||||
Poco::Any maxFieldSize = ODBC_MAX_FIELD_SIZE,
|
||||
bool enforceCapability=false,
|
||||
bool autoBind = true,
|
||||
bool autoExtract = true);
|
||||
/// Creates the SessionImpl. Opens a connection to the database.
|
||||
|
||||
~SessionImpl();
|
||||
/// Destroys the SessionImpl.
|
||||
|
||||
Poco::SharedPtr<Poco::Data::StatementImpl> createStatementImpl();
|
||||
/// Returns an ODBC StatementImpl
|
||||
|
||||
void open(const std::string& connect = "");
|
||||
/// Opens a connection to the Database
|
||||
|
||||
void close();
|
||||
/// Closes the connection
|
||||
|
||||
bool isConnected() const;
|
||||
/// Returns true if session is connected
|
||||
|
||||
void setConnectionTimeout(std::size_t timeout);
|
||||
/// Sets the session connection timeout value.
|
||||
|
||||
std::size_t getConnectionTimeout() const;
|
||||
/// Returns the session connection timeout value.
|
||||
|
||||
void begin();
|
||||
/// Starts a transaction
|
||||
|
||||
void commit();
|
||||
/// Commits and ends a transaction
|
||||
|
||||
void rollback();
|
||||
/// Aborts a transaction
|
||||
|
||||
void reset();
|
||||
/// Do nothing
|
||||
|
||||
bool isTransaction() const;
|
||||
/// Returns true iff a transaction is in progress.
|
||||
|
||||
const std::string& connectorName() const;
|
||||
/// Returns the name of the connector.
|
||||
|
||||
bool canTransact() const;
|
||||
/// Returns true if connection is transaction-capable.
|
||||
|
||||
void setTransactionIsolation(Poco::UInt32 ti);
|
||||
/// Sets the transaction isolation level.
|
||||
|
||||
Poco::UInt32 getTransactionIsolation() const;
|
||||
/// Returns the transaction isolation level.
|
||||
|
||||
bool hasTransactionIsolation(Poco::UInt32) const;
|
||||
/// Returns true iff the transaction isolation level corresponding
|
||||
/// to the supplied bitmask is supported.
|
||||
|
||||
bool isTransactionIsolation(Poco::UInt32) const;
|
||||
/// Returns true iff the transaction isolation level corresponds
|
||||
/// to the supplied bitmask.
|
||||
|
||||
void autoCommit(const std::string&, bool val);
|
||||
/// Sets autocommit property for the session.
|
||||
|
||||
bool isAutoCommit(const std::string& name="") const;
|
||||
/// Returns autocommit property value.
|
||||
|
||||
void autoBind(const std::string&, bool val);
|
||||
/// Sets automatic binding for the session.
|
||||
|
||||
bool isAutoBind(const std::string& name="") const;
|
||||
/// Returns true if binding is automatic for this session.
|
||||
|
||||
void autoExtract(const std::string&, bool val);
|
||||
/// Sets automatic extraction for the session.
|
||||
|
||||
bool isAutoExtract(const std::string& name="") const;
|
||||
/// Returns true if extraction is automatic for this session.
|
||||
|
||||
void setMaxFieldSize(const std::string& rName, const Poco::Any& rValue);
|
||||
/// Sets the max field size (the default used when column size is unknown).
|
||||
|
||||
Poco::Any getMaxFieldSize(const std::string& rName="") const;
|
||||
/// Returns the max field size (the default used when column size is unknown).
|
||||
|
||||
int maxStatementLength() const;
|
||||
/// Returns maximum length of SQL statement allowed by driver.
|
||||
|
||||
void setQueryTimeout(const std::string&, const Poco::Any& value);
|
||||
/// Sets the timeout (in seconds) for queries.
|
||||
/// Value must be of type int.
|
||||
|
||||
Poco::Any getQueryTimeout(const std::string&) const;
|
||||
/// Returns the timeout (in seconds) for queries,
|
||||
/// or -1 if no timeout has been set.
|
||||
|
||||
int queryTimeout() const;
|
||||
/// Returns the timeout (in seconds) for queries,
|
||||
/// or -1 if no timeout has been set.
|
||||
|
||||
const ConnectionHandle& dbc() const;
|
||||
/// Returns the connection handle.
|
||||
|
||||
Poco::Any dataTypeInfo(const std::string& rName="") const;
|
||||
/// Returns the data types information.
|
||||
|
||||
private:
|
||||
void setDataTypeInfo(const std::string& rName, const Poco::Any& rValue);
|
||||
/// No-op. Throws InvalidAccessException.
|
||||
|
||||
static const int FUNCTIONS = SQL_API_ODBC3_ALL_FUNCTIONS_SIZE;
|
||||
|
||||
void checkError(SQLRETURN rc, const std::string& msg="") const;
|
||||
|
||||
Poco::UInt32 getDefaultTransactionIsolation() const;
|
||||
|
||||
static Poco::UInt32 transactionIsolation(SQLULEN isolation);
|
||||
|
||||
void setTransactionIsolationImpl(Poco::UInt32 ti) const;
|
||||
/// Sets the transaction isolation level.
|
||||
/// Called internally from getTransactionIsolation()
|
||||
|
||||
std::string _connector;
|
||||
mutable ConnectionHandle _db;
|
||||
Poco::Any _maxFieldSize;
|
||||
bool _autoBind;
|
||||
bool _autoExtract;
|
||||
TypeInfo _dataTypes;
|
||||
mutable char _canTransact;
|
||||
bool _inTransaction;
|
||||
int _queryTimeout;
|
||||
Poco::FastMutex _mutex;
|
||||
};
|
||||
|
||||
|
||||
///
|
||||
/// inlines
|
||||
///
|
||||
inline void SessionImpl::checkError(SQLRETURN rc, const std::string& msg) const
|
||||
{
|
||||
if (Utility::isError(rc))
|
||||
throw ConnectionException(_db, msg);
|
||||
}
|
||||
|
||||
|
||||
inline const ConnectionHandle& SessionImpl::dbc() const
|
||||
{
|
||||
return _db;
|
||||
}
|
||||
|
||||
|
||||
inline void SessionImpl::setMaxFieldSize(const std::string& rName, const Poco::Any& rValue)
|
||||
{
|
||||
_maxFieldSize = rValue;
|
||||
}
|
||||
|
||||
|
||||
inline Poco::Any SessionImpl::getMaxFieldSize(const std::string& rName) const
|
||||
{
|
||||
return _maxFieldSize;
|
||||
}
|
||||
|
||||
|
||||
inline void SessionImpl::setDataTypeInfo(const std::string& rName, const Poco::Any& rValue)
|
||||
{
|
||||
throw InvalidAccessException();
|
||||
}
|
||||
|
||||
|
||||
inline Poco::Any SessionImpl::dataTypeInfo(const std::string& rName) const
|
||||
{
|
||||
return &_dataTypes;
|
||||
}
|
||||
|
||||
|
||||
inline void SessionImpl::autoBind(const std::string&, bool val)
|
||||
{
|
||||
_autoBind = val;
|
||||
}
|
||||
|
||||
|
||||
inline bool SessionImpl::isAutoBind(const std::string& name) const
|
||||
{
|
||||
return _autoBind;
|
||||
}
|
||||
|
||||
|
||||
inline void SessionImpl::autoExtract(const std::string&, bool val)
|
||||
{
|
||||
_autoExtract = val;
|
||||
}
|
||||
|
||||
|
||||
inline bool SessionImpl::isAutoExtract(const std::string& name) const
|
||||
{
|
||||
return _autoExtract;
|
||||
}
|
||||
|
||||
|
||||
inline const std::string& SessionImpl::connectorName() const
|
||||
{
|
||||
return _connector;
|
||||
}
|
||||
|
||||
|
||||
inline bool SessionImpl::isTransactionIsolation(Poco::UInt32 ti) const
|
||||
{
|
||||
return 0 != (ti & getTransactionIsolation());
|
||||
}
|
||||
|
||||
|
||||
inline void SessionImpl::setQueryTimeout(const std::string&, const Poco::Any& value)
|
||||
{
|
||||
_queryTimeout = Poco::AnyCast<int>(value);
|
||||
}
|
||||
|
||||
|
||||
inline Poco::Any SessionImpl::getQueryTimeout(const std::string&) const
|
||||
{
|
||||
return _queryTimeout;
|
||||
}
|
||||
|
||||
|
||||
inline int SessionImpl::queryTimeout() const
|
||||
{
|
||||
return _queryTimeout;
|
||||
}
|
||||
|
||||
|
||||
} } } // namespace Poco::Data::ODBC
|
||||
|
||||
|
||||
#endif // Data_ODBC_SessionImpl_INCLUDED
|
||||
@@ -0,0 +1,117 @@
|
||||
//
|
||||
// TypeInfo.h
|
||||
//
|
||||
// Library: Data/ODBC
|
||||
// Package: ODBC
|
||||
// Module: TypeInfo
|
||||
//
|
||||
// Definition of TypeInfo.
|
||||
//
|
||||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#ifndef Data_ODBC_DataTypes_INCLUDED
|
||||
#define Data_ODBC_DataTypes_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Data/ODBC/ODBC.h"
|
||||
#include "Poco/NamedTuple.h"
|
||||
#include "Poco/DynamicAny.h"
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#ifdef POCO_OS_FAMILY_WINDOWS
|
||||
#include <windows.h>
|
||||
#endif
|
||||
#include <sqlext.h>
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Data {
|
||||
namespace ODBC {
|
||||
|
||||
|
||||
class ODBC_API TypeInfo
|
||||
/// Datatypes mapping utility class.
|
||||
///
|
||||
/// This class provides mapping between C and SQL datatypes as well
|
||||
/// as datatypes supported by the underlying database. In order for database
|
||||
/// types to be available, a valid conection handle must be supplied at either
|
||||
/// object construction time, or at a later point in time, through call to
|
||||
/// fillTypeInfo member function.
|
||||
///
|
||||
/// Class also provides a convenient debugging function that prints
|
||||
/// tabulated data to an output stream.
|
||||
{
|
||||
public:
|
||||
typedef std::map<int, int> DataTypeMap;
|
||||
typedef DataTypeMap::value_type ValueType;
|
||||
typedef Poco::NamedTuple<std::string,
|
||||
SQLSMALLINT,
|
||||
SQLINTEGER,
|
||||
std::string,
|
||||
std::string,
|
||||
std::string,
|
||||
SQLSMALLINT,
|
||||
SQLSMALLINT,
|
||||
SQLSMALLINT,
|
||||
SQLSMALLINT,
|
||||
SQLSMALLINT,
|
||||
SQLSMALLINT,
|
||||
std::string,
|
||||
SQLSMALLINT,
|
||||
SQLSMALLINT,
|
||||
SQLSMALLINT,
|
||||
SQLSMALLINT,
|
||||
SQLINTEGER,
|
||||
SQLSMALLINT> TypeInfoTup;
|
||||
typedef std::vector<TypeInfoTup> TypeInfoVec;
|
||||
|
||||
explicit TypeInfo(SQLHDBC* pHDBC=0);
|
||||
/// Creates the TypeInfo.
|
||||
|
||||
~TypeInfo();
|
||||
/// Destroys the TypeInfo.
|
||||
|
||||
int cDataType(int sqlDataType) const;
|
||||
/// Returns C data type corresponding to supplied SQL data type.
|
||||
|
||||
int sqlDataType(int cDataType) const;
|
||||
/// Returns SQL data type corresponding to supplied C data type.
|
||||
|
||||
void fillTypeInfo(SQLHDBC pHDBC);
|
||||
/// Fills the data type info structure for the database.
|
||||
|
||||
DynamicAny getInfo(SQLSMALLINT type, const std::string& param) const;
|
||||
/// Returns information about specified data type as specified by parameter 'type'.
|
||||
/// The requested information is specified by parameter 'param'.
|
||||
/// Will fail with a Poco::NotFoundException thrown if the param is not found
|
||||
|
||||
bool tryGetInfo(SQLSMALLINT type, const std::string& param, DynamicAny& result) const;
|
||||
/// Returns information about specified data type as specified by parameter 'type' in param result.
|
||||
/// The requested information is specified by parameter 'param'.
|
||||
/// Will return false if the param is not found. The value of result will be not changed in this case.
|
||||
|
||||
|
||||
void print(std::ostream& ostr);
|
||||
/// Prints all the types (as reported by the underlying database)
|
||||
/// to the supplied output stream.
|
||||
|
||||
private:
|
||||
void fillCTypes();
|
||||
void fillSQLTypes();
|
||||
|
||||
DataTypeMap _cDataTypes;
|
||||
DataTypeMap _sqlDataTypes;
|
||||
TypeInfoVec _typeInfo;
|
||||
SQLHDBC* _pHDBC;
|
||||
};
|
||||
|
||||
|
||||
} } } // namespace Poco::Data::ODBC
|
||||
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,985 @@
|
||||
//
|
||||
// Unicode.h
|
||||
//
|
||||
// Library: Data/ODBC
|
||||
// Package: ODBC
|
||||
// Module: Unicode
|
||||
//
|
||||
// Definition of Unicode.
|
||||
//
|
||||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#ifndef Data_ODBC_Unicode_INCLUDED
|
||||
#define Data_ODBC_Unicode_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/UnicodeConverter.h"
|
||||
#include "Poco/Buffer.h"
|
||||
#include "Poco/Exception.h"
|
||||
#include <cstring>
|
||||
#ifdef POCO_OS_FAMILY_WINDOWS
|
||||
#include <windows.h>
|
||||
#endif
|
||||
#ifndef SQL_NOUNICODEMAP
|
||||
#define SQL_NOUNICODEMAP
|
||||
#endif
|
||||
#include <sqlext.h>
|
||||
#include <sqltypes.h>
|
||||
#include <sqlucode.h>
|
||||
|
||||
|
||||
#if defined(POCO_OS_FAMILY_WINDOWS)
|
||||
#define POCO_ODBC_UNICODE
|
||||
#define POCO_ODBC_UNICODE_WINDOWS
|
||||
#elif defined(POCO_OS_FAMILY_UNIX) && defined(UNICODE)
|
||||
#define POCO_ODBC_UNICODE
|
||||
#ifdef POCO_UNIXODBC
|
||||
#define POCO_ODBC_UNICODE_UNIXODBC
|
||||
#elif defined(POCO_IODBC)
|
||||
#error "iODBC Unicode not supported"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Data {
|
||||
namespace ODBC {
|
||||
|
||||
|
||||
#if defined(POCO_PTR_IS_64_BIT) || defined(POCO_OS_FAMILY_UNIX) // mkrivos - POCO_OS_FAMILY_UNIX doesn't compile with SQLPOINTER & SQLColAttribute()
|
||||
typedef SQLLEN* NumAttrPtrType;
|
||||
#else
|
||||
typedef SQLPOINTER NumAttrPtrType;
|
||||
#endif
|
||||
|
||||
|
||||
SQLRETURN ODBC_API SQLColAttribute(SQLHSTMT hstmt,
|
||||
SQLUSMALLINT iCol,
|
||||
SQLUSMALLINT iField,
|
||||
SQLPOINTER pCharAttr,
|
||||
SQLSMALLINT cbCharAttrMax,
|
||||
SQLSMALLINT* pcbCharAttr,
|
||||
NumAttrPtrType pNumAttr);
|
||||
|
||||
|
||||
SQLRETURN ODBC_API SQLColAttributes(SQLHSTMT hstmt,
|
||||
SQLUSMALLINT icol,
|
||||
SQLUSMALLINT fDescType,
|
||||
SQLPOINTER rgbDesc,
|
||||
SQLSMALLINT cbDescMax,
|
||||
SQLSMALLINT* pcbDesc,
|
||||
SQLLEN* pfDesc);
|
||||
|
||||
SQLRETURN ODBC_API SQLConnect(SQLHDBC hdbc,
|
||||
SQLCHAR* szDSN,
|
||||
SQLSMALLINT cbDSN,
|
||||
SQLCHAR* szUID,
|
||||
SQLSMALLINT cbUID,
|
||||
SQLCHAR* szAuthStr,
|
||||
SQLSMALLINT cbAuthStr);
|
||||
|
||||
SQLRETURN ODBC_API SQLDescribeCol(SQLHSTMT hstmt,
|
||||
SQLUSMALLINT icol,
|
||||
SQLCHAR* szColName,
|
||||
SQLSMALLINT cbColNameMax,
|
||||
SQLSMALLINT* pcbColName,
|
||||
SQLSMALLINT* pfSqlType,
|
||||
SQLULEN* pcbColDef,
|
||||
SQLSMALLINT* pibScale,
|
||||
SQLSMALLINT* pfNullable);
|
||||
|
||||
SQLRETURN ODBC_API SQLError(SQLHENV henv,
|
||||
SQLHDBC hdbc,
|
||||
SQLHSTMT hstmt,
|
||||
SQLCHAR* szSqlState,
|
||||
SQLINTEGER* pfNativeError,
|
||||
SQLCHAR* szErrorMsg,
|
||||
SQLSMALLINT cbErrorMsgMax,
|
||||
SQLSMALLINT* pcbErrorMsg);
|
||||
|
||||
SQLRETURN ODBC_API SQLExecDirect(SQLHSTMT hstmt,
|
||||
SQLCHAR* szSqlStr,
|
||||
SQLINTEGER cbSqlStr);
|
||||
|
||||
SQLRETURN ODBC_API SQLGetConnectAttr(SQLHDBC hdbc,
|
||||
SQLINTEGER fAttribute,
|
||||
SQLPOINTER rgbValue,
|
||||
SQLINTEGER cbValueMax,
|
||||
SQLINTEGER* pcbValue);
|
||||
|
||||
SQLRETURN ODBC_API SQLGetCursorName(SQLHSTMT hstmt,
|
||||
SQLCHAR* szCursor,
|
||||
SQLSMALLINT cbCursorMax,
|
||||
SQLSMALLINT* pcbCursor);
|
||||
|
||||
SQLRETURN ODBC_API SQLSetDescField(SQLHDESC DescriptorHandle,
|
||||
SQLSMALLINT RecNumber,
|
||||
SQLSMALLINT FieldIdentifier,
|
||||
SQLPOINTER Value,
|
||||
SQLINTEGER BufferLength);
|
||||
|
||||
SQLRETURN ODBC_API SQLGetDescField(SQLHDESC hdesc,
|
||||
SQLSMALLINT iRecord,
|
||||
SQLSMALLINT iField,
|
||||
SQLPOINTER rgbValue,
|
||||
SQLINTEGER cbValueMax,
|
||||
SQLINTEGER* pcbValue);
|
||||
|
||||
SQLRETURN ODBC_API SQLGetDescRec(SQLHDESC hdesc,
|
||||
SQLSMALLINT iRecord,
|
||||
SQLCHAR* szName,
|
||||
SQLSMALLINT cbNameMax,
|
||||
SQLSMALLINT* pcbName,
|
||||
SQLSMALLINT* pfType,
|
||||
SQLSMALLINT* pfSubType,
|
||||
SQLLEN* pLength,
|
||||
SQLSMALLINT* pPrecision,
|
||||
SQLSMALLINT* pScale,
|
||||
SQLSMALLINT* pNullable);
|
||||
|
||||
SQLRETURN ODBC_API SQLGetDiagField(SQLSMALLINT fHandleType,
|
||||
SQLHANDLE handle,
|
||||
SQLSMALLINT iRecord,
|
||||
SQLSMALLINT fDiagField,
|
||||
SQLPOINTER rgbDiagInfo,
|
||||
SQLSMALLINT cbDiagInfoMax,
|
||||
SQLSMALLINT* pcbDiagInfo);
|
||||
|
||||
SQLRETURN ODBC_API SQLGetDiagRec(SQLSMALLINT fHandleType,
|
||||
SQLHANDLE handle,
|
||||
SQLSMALLINT iRecord,
|
||||
SQLCHAR* szSqlState,
|
||||
SQLINTEGER* pfNativeError,
|
||||
SQLCHAR* szErrorMsg,
|
||||
SQLSMALLINT cbErrorMsgMax,
|
||||
SQLSMALLINT* pcbErrorMsg);
|
||||
|
||||
SQLRETURN ODBC_API SQLPrepare(SQLHSTMT hstmt,
|
||||
SQLCHAR* szSqlStr,
|
||||
SQLINTEGER cbSqlStr);
|
||||
|
||||
SQLRETURN ODBC_API SQLSetConnectAttr(SQLHDBC hdbc,
|
||||
SQLINTEGER fAttribute,
|
||||
SQLPOINTER rgbValue,
|
||||
SQLINTEGER cbValue);
|
||||
|
||||
SQLRETURN ODBC_API SQLSetCursorName(SQLHSTMT hstmt,
|
||||
SQLCHAR* szCursor,
|
||||
SQLSMALLINT cbCursor);
|
||||
|
||||
SQLRETURN ODBC_API SQLSetStmtAttr(SQLHSTMT hstmt,
|
||||
SQLINTEGER fAttribute,
|
||||
SQLPOINTER rgbValue,
|
||||
SQLINTEGER cbValueMax);
|
||||
|
||||
SQLRETURN ODBC_API SQLGetStmtAttr(SQLHSTMT hstmt,
|
||||
SQLINTEGER fAttribute,
|
||||
SQLPOINTER rgbValue,
|
||||
SQLINTEGER cbValueMax,
|
||||
SQLINTEGER* pcbValue);
|
||||
|
||||
SQLRETURN ODBC_API SQLColumns(SQLHSTMT hstmt,
|
||||
SQLCHAR* szCatalogName,
|
||||
SQLSMALLINT cbCatalogName,
|
||||
SQLCHAR* szSchemaName,
|
||||
SQLSMALLINT cbSchemaName,
|
||||
SQLCHAR* szTableName,
|
||||
SQLSMALLINT cbTableName,
|
||||
SQLCHAR* szColumnName,
|
||||
SQLSMALLINT cbColumnName);
|
||||
|
||||
SQLRETURN ODBC_API SQLGetConnectOption(SQLHDBC hdbc,
|
||||
SQLUSMALLINT fOption,
|
||||
SQLPOINTER pvParam);
|
||||
|
||||
SQLRETURN ODBC_API SQLGetInfo(SQLHDBC hdbc,
|
||||
SQLUSMALLINT fInfoType,
|
||||
SQLPOINTER rgbInfoValue,
|
||||
SQLSMALLINT cbInfoValueMax,
|
||||
SQLSMALLINT* pcbInfoValue);
|
||||
|
||||
SQLRETURN ODBC_API SQLGetTypeInfo(SQLHSTMT StatementHandle,
|
||||
SQLSMALLINT DataType);
|
||||
|
||||
SQLRETURN ODBC_API SQLSetConnectOption(SQLHDBC hdbc,
|
||||
SQLUSMALLINT fOption,
|
||||
SQLULEN vParam);
|
||||
|
||||
SQLRETURN ODBC_API SQLSpecialColumns(SQLHSTMT hstmt,
|
||||
SQLUSMALLINT fColType,
|
||||
SQLCHAR* szCatalogName,
|
||||
SQLSMALLINT cbCatalogName,
|
||||
SQLCHAR* szSchemaName,
|
||||
SQLSMALLINT cbSchemaName,
|
||||
SQLCHAR* szTableName,
|
||||
SQLSMALLINT cbTableName,
|
||||
SQLUSMALLINT fScope,
|
||||
SQLUSMALLINT fNullable);
|
||||
|
||||
SQLRETURN ODBC_API SQLStatistics(SQLHSTMT hstmt,
|
||||
SQLCHAR* szCatalogName,
|
||||
SQLSMALLINT cbCatalogName,
|
||||
SQLCHAR* szSchemaName,
|
||||
SQLSMALLINT cbSchemaName,
|
||||
SQLCHAR* szTableName,
|
||||
SQLSMALLINT cbTableName,
|
||||
SQLUSMALLINT fUnique,
|
||||
SQLUSMALLINT fAccuracy);
|
||||
|
||||
SQLRETURN ODBC_API SQLTables(SQLHSTMT hstmt,
|
||||
SQLCHAR* szCatalogName,
|
||||
SQLSMALLINT cbCatalogName,
|
||||
SQLCHAR* szSchemaName,
|
||||
SQLSMALLINT cbSchemaName,
|
||||
SQLCHAR* szTableName,
|
||||
SQLSMALLINT cbTableName,
|
||||
SQLCHAR* szTableType,
|
||||
SQLSMALLINT cbTableType);
|
||||
|
||||
SQLRETURN ODBC_API SQLDataSources(SQLHENV henv,
|
||||
SQLUSMALLINT fDirection,
|
||||
SQLCHAR* szDSN,
|
||||
SQLSMALLINT cbDSNMax,
|
||||
SQLSMALLINT* pcbDSN,
|
||||
SQLCHAR* szDescription,
|
||||
SQLSMALLINT cbDescriptionMax,
|
||||
SQLSMALLINT* pcbDescription);
|
||||
|
||||
SQLRETURN ODBC_API SQLDriverConnect(SQLHDBC hdbc,
|
||||
SQLHWND hwnd,
|
||||
SQLCHAR* szConnStrIn,
|
||||
SQLSMALLINT cbConnStrIn,
|
||||
SQLCHAR* szConnStrOut,
|
||||
SQLSMALLINT cbConnStrOutMax,
|
||||
SQLSMALLINT* pcbConnStrOut,
|
||||
SQLUSMALLINT fDriverCompletion);
|
||||
|
||||
SQLRETURN ODBC_API SQLBrowseConnect(SQLHDBC hdbc,
|
||||
SQLCHAR* szConnStrIn,
|
||||
SQLSMALLINT cbConnStrIn,
|
||||
SQLCHAR* szConnStrOut,
|
||||
SQLSMALLINT cbConnStrOutMax,
|
||||
SQLSMALLINT* pcbConnStrOut);
|
||||
|
||||
SQLRETURN ODBC_API SQLColumnPrivileges(SQLHSTMT hstmt,
|
||||
SQLCHAR* szCatalogName,
|
||||
SQLSMALLINT cbCatalogName,
|
||||
SQLCHAR* szSchemaName,
|
||||
SQLSMALLINT cbSchemaName,
|
||||
SQLCHAR* szTableName,
|
||||
SQLSMALLINT cbTableName,
|
||||
SQLCHAR* szColumnName,
|
||||
SQLSMALLINT cbColumnName);
|
||||
|
||||
SQLRETURN ODBC_API SQLForeignKeys(SQLHSTMT hstmt,
|
||||
SQLCHAR* szPkCatalogName,
|
||||
SQLSMALLINT cbPkCatalogName,
|
||||
SQLCHAR* szPkSchemaName,
|
||||
SQLSMALLINT cbPkSchemaName,
|
||||
SQLCHAR* szPkTableName,
|
||||
SQLSMALLINT cbPkTableName,
|
||||
SQLCHAR* szFkCatalogName,
|
||||
SQLSMALLINT cbFkCatalogName,
|
||||
SQLCHAR* szFkSchemaName,
|
||||
SQLSMALLINT cbFkSchemaName,
|
||||
SQLCHAR* szFkTableName,
|
||||
SQLSMALLINT cbFkTableName);
|
||||
|
||||
SQLRETURN ODBC_API SQLNativeSql(SQLHDBC hdbc,
|
||||
SQLCHAR* szSqlStrIn,
|
||||
SQLINTEGER cbSqlStrIn,
|
||||
SQLCHAR* szSqlStr,
|
||||
SQLINTEGER cbSqlStrMax,
|
||||
SQLINTEGER* pcbSqlStr);
|
||||
|
||||
SQLRETURN ODBC_API SQLPrimaryKeys(SQLHSTMT hstmt,
|
||||
SQLCHAR* szCatalogName,
|
||||
SQLSMALLINT cbCatalogName,
|
||||
SQLCHAR* szSchemaName,
|
||||
SQLSMALLINT cbSchemaName,
|
||||
SQLCHAR* szTableName,
|
||||
SQLSMALLINT cbTableName);
|
||||
|
||||
SQLRETURN ODBC_API SQLProcedureColumns(SQLHSTMT hstmt,
|
||||
SQLCHAR* szCatalogName,
|
||||
SQLSMALLINT cbCatalogName,
|
||||
SQLCHAR* szSchemaName,
|
||||
SQLSMALLINT cbSchemaName,
|
||||
SQLCHAR* szProcName,
|
||||
SQLSMALLINT cbProcName,
|
||||
SQLCHAR* szColumnName,
|
||||
SQLSMALLINT cbColumnName);
|
||||
|
||||
SQLRETURN ODBC_API SQLProcedures(SQLHSTMT hstmt,
|
||||
SQLCHAR* szCatalogName,
|
||||
SQLSMALLINT cbCatalogName,
|
||||
SQLCHAR* szSchemaName,
|
||||
SQLSMALLINT cbSchemaName,
|
||||
SQLCHAR* szProcName,
|
||||
SQLSMALLINT cbProcName);
|
||||
|
||||
SQLRETURN ODBC_API SQLTablePrivileges(SQLHSTMT hstmt,
|
||||
SQLCHAR* szCatalogName,
|
||||
SQLSMALLINT cbCatalogName,
|
||||
SQLCHAR* szSchemaName,
|
||||
SQLSMALLINT cbSchemaName,
|
||||
SQLCHAR* szTableName,
|
||||
SQLSMALLINT cbTableName);
|
||||
|
||||
SQLRETURN ODBC_API SQLDrivers(SQLHENV henv,
|
||||
SQLUSMALLINT fDirection,
|
||||
SQLCHAR* szDriverDesc,
|
||||
SQLSMALLINT cbDriverDescMax,
|
||||
SQLSMALLINT* pcbDriverDesc,
|
||||
SQLCHAR* szDriverAttributes,
|
||||
SQLSMALLINT cbDrvrAttrMax,
|
||||
SQLSMALLINT* pcbDrvrAttr);
|
||||
|
||||
|
||||
///
|
||||
/// inlines
|
||||
///
|
||||
|
||||
inline bool isString(SQLPOINTER pValue, SQLINTEGER length)
|
||||
{
|
||||
return (SQL_NTS == length || length > 0) && pValue;
|
||||
}
|
||||
|
||||
|
||||
inline SQLINTEGER stringLength(SQLPOINTER pValue, SQLINTEGER length)
|
||||
{
|
||||
if (SQL_NTS != length) return length;
|
||||
|
||||
return (SQLINTEGER) std::strlen((const char*) pValue);
|
||||
}
|
||||
|
||||
|
||||
#if !defined(POCO_ODBC_UNICODE)
|
||||
|
||||
|
||||
///
|
||||
/// inlines
|
||||
///
|
||||
|
||||
inline SQLRETURN SQLColAttribute(SQLHSTMT hstmt,
|
||||
SQLUSMALLINT iCol,
|
||||
SQLUSMALLINT iField,
|
||||
SQLPOINTER pCharAttr,
|
||||
SQLSMALLINT cbCharAttrMax,
|
||||
SQLSMALLINT* pcbCharAttr,
|
||||
NumAttrPtrType pNumAttr)
|
||||
{
|
||||
return ::SQLColAttributeA(hstmt,
|
||||
iCol,
|
||||
iField,
|
||||
pCharAttr,
|
||||
cbCharAttrMax,
|
||||
pcbCharAttr,
|
||||
pNumAttr);
|
||||
}
|
||||
|
||||
|
||||
inline SQLRETURN SQLColAttributes(SQLHSTMT hstmt,
|
||||
SQLUSMALLINT icol,
|
||||
SQLUSMALLINT fDescType,
|
||||
SQLPOINTER rgbDesc,
|
||||
SQLSMALLINT cbDescMax,
|
||||
SQLSMALLINT* pcbDesc,
|
||||
SQLLEN* pfDesc)
|
||||
{
|
||||
return ::SQLColAttributesA(hstmt,
|
||||
icol,
|
||||
fDescType,
|
||||
rgbDesc,
|
||||
cbDescMax,
|
||||
pcbDesc,
|
||||
pfDesc);
|
||||
}
|
||||
|
||||
|
||||
inline SQLRETURN SQLConnect(SQLHDBC hdbc,
|
||||
SQLCHAR* szDSN,
|
||||
SQLSMALLINT cbDSN,
|
||||
SQLCHAR* szUID,
|
||||
SQLSMALLINT cbUID,
|
||||
SQLCHAR* szAuthStr,
|
||||
SQLSMALLINT cbAuthStr)
|
||||
{
|
||||
return ::SQLConnectA(hdbc,
|
||||
szDSN,
|
||||
cbDSN,
|
||||
szUID,
|
||||
cbUID,
|
||||
szAuthStr,
|
||||
cbAuthStr);
|
||||
}
|
||||
|
||||
|
||||
inline SQLRETURN SQLDescribeCol(SQLHSTMT hstmt,
|
||||
SQLUSMALLINT icol,
|
||||
SQLCHAR* szColName,
|
||||
SQLSMALLINT cbColNameMax,
|
||||
SQLSMALLINT* pcbColName,
|
||||
SQLSMALLINT* pfSqlType,
|
||||
SQLULEN* pcbColDef,
|
||||
SQLSMALLINT* pibScale,
|
||||
SQLSMALLINT* pfNullable)
|
||||
{
|
||||
return ::SQLDescribeColA(hstmt,
|
||||
icol,
|
||||
szColName,
|
||||
cbColNameMax,
|
||||
pcbColName,
|
||||
pfSqlType,
|
||||
pcbColDef,
|
||||
pibScale,
|
||||
pfNullable);
|
||||
}
|
||||
|
||||
|
||||
inline SQLRETURN SQLError(SQLHENV henv,
|
||||
SQLHDBC hdbc,
|
||||
SQLHSTMT hstmt,
|
||||
SQLCHAR* szSqlState,
|
||||
SQLINTEGER* pfNativeError,
|
||||
SQLCHAR* szErrorMsg,
|
||||
SQLSMALLINT cbErrorMsgMax,
|
||||
SQLSMALLINT* pcbErrorMsg)
|
||||
{
|
||||
throw Poco::NotImplementedException("SQLError is obsolete. "
|
||||
"Use SQLGetDiagRec instead.");
|
||||
}
|
||||
|
||||
|
||||
inline SQLRETURN SQLExecDirect(SQLHSTMT hstmt,
|
||||
SQLCHAR* szSqlStr,
|
||||
SQLINTEGER cbSqlStr)
|
||||
{
|
||||
return ::SQLExecDirectA(hstmt, szSqlStr, cbSqlStr);
|
||||
}
|
||||
|
||||
|
||||
inline SQLRETURN SQLGetConnectAttr(SQLHDBC hdbc,
|
||||
SQLINTEGER fAttribute,
|
||||
SQLPOINTER rgbValue,
|
||||
SQLINTEGER cbValueMax,
|
||||
SQLINTEGER* pcbValue)
|
||||
{
|
||||
return ::SQLGetConnectAttrA(hdbc,
|
||||
fAttribute,
|
||||
rgbValue,
|
||||
cbValueMax,
|
||||
pcbValue);
|
||||
}
|
||||
|
||||
|
||||
inline SQLRETURN SQLGetCursorName(SQLHSTMT hstmt,
|
||||
SQLCHAR* szCursor,
|
||||
SQLSMALLINT cbCursorMax,
|
||||
SQLSMALLINT* pcbCursor)
|
||||
{
|
||||
throw Poco::NotImplementedException("Not implemented");
|
||||
}
|
||||
|
||||
|
||||
inline SQLRETURN SQLSetDescField(SQLHDESC DescriptorHandle,
|
||||
SQLSMALLINT RecNumber,
|
||||
SQLSMALLINT FieldIdentifier,
|
||||
SQLPOINTER Value,
|
||||
SQLINTEGER BufferLength)
|
||||
{
|
||||
return ::SQLSetDescField(DescriptorHandle,
|
||||
RecNumber,
|
||||
FieldIdentifier,
|
||||
Value,
|
||||
BufferLength);
|
||||
}
|
||||
|
||||
|
||||
inline SQLRETURN SQLGetDescField(SQLHDESC hdesc,
|
||||
SQLSMALLINT iRecord,
|
||||
SQLSMALLINT iField,
|
||||
SQLPOINTER rgbValue,
|
||||
SQLINTEGER cbValueMax,
|
||||
SQLINTEGER* pcbValue)
|
||||
{
|
||||
return ::SQLGetDescFieldA(hdesc,
|
||||
iRecord,
|
||||
iField,
|
||||
rgbValue,
|
||||
cbValueMax,
|
||||
pcbValue);
|
||||
}
|
||||
|
||||
|
||||
inline SQLRETURN SQLGetDescRec(SQLHDESC hdesc,
|
||||
SQLSMALLINT iRecord,
|
||||
SQLCHAR* szName,
|
||||
SQLSMALLINT cbNameMax,
|
||||
SQLSMALLINT* pcbName,
|
||||
SQLSMALLINT* pfType,
|
||||
SQLSMALLINT* pfSubType,
|
||||
SQLLEN* pLength,
|
||||
SQLSMALLINT* pPrecision,
|
||||
SQLSMALLINT* pScale,
|
||||
SQLSMALLINT* pNullable)
|
||||
{
|
||||
return ::SQLGetDescRecA(hdesc,
|
||||
iRecord,
|
||||
szName,
|
||||
cbNameMax,
|
||||
pcbName,
|
||||
pfType,
|
||||
pfSubType,
|
||||
pLength,
|
||||
pPrecision,
|
||||
pScale,
|
||||
pNullable);
|
||||
}
|
||||
|
||||
|
||||
inline SQLRETURN SQLGetDiagField(SQLSMALLINT fHandleType,
|
||||
SQLHANDLE handle,
|
||||
SQLSMALLINT iRecord,
|
||||
SQLSMALLINT fDiagField,
|
||||
SQLPOINTER rgbDiagInfo,
|
||||
SQLSMALLINT cbDiagInfoMax,
|
||||
SQLSMALLINT* pcbDiagInfo)
|
||||
{
|
||||
return ::SQLGetDiagFieldA(fHandleType,
|
||||
handle,
|
||||
iRecord,
|
||||
fDiagField,
|
||||
rgbDiagInfo,
|
||||
cbDiagInfoMax,
|
||||
pcbDiagInfo);
|
||||
}
|
||||
|
||||
|
||||
inline SQLRETURN SQLGetDiagRec(SQLSMALLINT fHandleType,
|
||||
SQLHANDLE handle,
|
||||
SQLSMALLINT iRecord,
|
||||
SQLCHAR* szSqlState,
|
||||
SQLINTEGER* pfNativeError,
|
||||
SQLCHAR* szErrorMsg,
|
||||
SQLSMALLINT cbErrorMsgMax,
|
||||
SQLSMALLINT* pcbErrorMsg)
|
||||
{
|
||||
return ::SQLGetDiagRecA(fHandleType,
|
||||
handle,
|
||||
iRecord,
|
||||
szSqlState,
|
||||
pfNativeError,
|
||||
szErrorMsg,
|
||||
cbErrorMsgMax,
|
||||
pcbErrorMsg);
|
||||
}
|
||||
|
||||
|
||||
inline SQLRETURN SQLPrepare(SQLHSTMT hstmt,
|
||||
SQLCHAR* szSqlStr,
|
||||
SQLINTEGER cbSqlStr)
|
||||
{
|
||||
return ::SQLPrepareA(hstmt, szSqlStr, cbSqlStr);
|
||||
}
|
||||
|
||||
|
||||
inline SQLRETURN SQLSetConnectAttr(SQLHDBC hdbc,
|
||||
SQLINTEGER fAttribute,
|
||||
SQLPOINTER rgbValue,
|
||||
SQLINTEGER cbValue)
|
||||
{
|
||||
return ::SQLSetConnectAttrA(hdbc, fAttribute, rgbValue, cbValue);
|
||||
}
|
||||
|
||||
|
||||
inline SQLRETURN SQLSetCursorName(SQLHSTMT hstmt,
|
||||
SQLCHAR* szCursor,
|
||||
SQLSMALLINT cbCursor)
|
||||
{
|
||||
throw Poco::NotImplementedException("Not implemented");
|
||||
}
|
||||
|
||||
|
||||
inline SQLRETURN SQLSetStmtAttr(SQLHSTMT hstmt,
|
||||
SQLINTEGER fAttribute,
|
||||
SQLPOINTER rgbValue,
|
||||
SQLINTEGER cbValueMax)
|
||||
{
|
||||
return ::SQLSetStmtAttr(hstmt, fAttribute, rgbValue, cbValueMax);
|
||||
}
|
||||
|
||||
|
||||
inline SQLRETURN SQLGetStmtAttr(SQLHSTMT hstmt,
|
||||
SQLINTEGER fAttribute,
|
||||
SQLPOINTER rgbValue,
|
||||
SQLINTEGER cbValueMax,
|
||||
SQLINTEGER* pcbValue)
|
||||
{
|
||||
return ::SQLGetStmtAttrA(hstmt,
|
||||
fAttribute,
|
||||
rgbValue,
|
||||
cbValueMax,
|
||||
pcbValue);
|
||||
}
|
||||
|
||||
|
||||
inline SQLRETURN SQLColumns(SQLHSTMT hstmt,
|
||||
SQLCHAR* szCatalogName,
|
||||
SQLSMALLINT cbCatalogName,
|
||||
SQLCHAR* szSchemaName,
|
||||
SQLSMALLINT cbSchemaName,
|
||||
SQLCHAR* szTableName,
|
||||
SQLSMALLINT cbTableName,
|
||||
SQLCHAR* szColumnName,
|
||||
SQLSMALLINT cbColumnName)
|
||||
{
|
||||
return ::SQLColumnsA(hstmt,
|
||||
szCatalogName,
|
||||
cbCatalogName,
|
||||
szSchemaName,
|
||||
cbSchemaName,
|
||||
szTableName,
|
||||
cbTableName,
|
||||
szColumnName,
|
||||
cbColumnName);
|
||||
}
|
||||
|
||||
|
||||
inline SQLRETURN SQLGetConnectOption(SQLHDBC hdbc,
|
||||
SQLUSMALLINT fOption,
|
||||
SQLPOINTER pvParam)
|
||||
{
|
||||
return ::SQLGetConnectOptionA(hdbc, fOption, pvParam);
|
||||
}
|
||||
|
||||
|
||||
inline SQLRETURN SQLGetInfo(SQLHDBC hdbc,
|
||||
SQLUSMALLINT fInfoType,
|
||||
SQLPOINTER rgbInfoValue,
|
||||
SQLSMALLINT cbInfoValueMax,
|
||||
SQLSMALLINT* pcbInfoValue)
|
||||
{
|
||||
return ::SQLGetInfoA(hdbc,
|
||||
fInfoType,
|
||||
rgbInfoValue,
|
||||
cbInfoValueMax,
|
||||
pcbInfoValue);
|
||||
}
|
||||
|
||||
|
||||
inline SQLRETURN SQLGetTypeInfo(SQLHSTMT StatementHandle,
|
||||
SQLSMALLINT DataType)
|
||||
{
|
||||
return ::SQLGetTypeInfoA(StatementHandle, DataType);
|
||||
}
|
||||
|
||||
|
||||
inline SQLRETURN SQLSetConnectOption(SQLHDBC hdbc,
|
||||
SQLUSMALLINT fOption,
|
||||
SQLULEN vParam)
|
||||
{
|
||||
return ::SQLSetConnectOptionA(hdbc, fOption, vParam);
|
||||
}
|
||||
|
||||
|
||||
inline SQLRETURN SQLSpecialColumns(SQLHSTMT hstmt,
|
||||
SQLUSMALLINT fColType,
|
||||
SQLCHAR* szCatalogName,
|
||||
SQLSMALLINT cbCatalogName,
|
||||
SQLCHAR* szSchemaName,
|
||||
SQLSMALLINT cbSchemaName,
|
||||
SQLCHAR* szTableName,
|
||||
SQLSMALLINT cbTableName,
|
||||
SQLUSMALLINT fScope,
|
||||
SQLUSMALLINT fNullable)
|
||||
{
|
||||
return ::SQLSpecialColumnsA(hstmt,
|
||||
fColType,
|
||||
szCatalogName,
|
||||
cbCatalogName,
|
||||
szSchemaName,
|
||||
cbSchemaName,
|
||||
szTableName,
|
||||
cbTableName,
|
||||
fScope,
|
||||
fNullable);
|
||||
}
|
||||
|
||||
|
||||
inline SQLRETURN SQLStatistics(SQLHSTMT hstmt,
|
||||
SQLCHAR* szCatalogName,
|
||||
SQLSMALLINT cbCatalogName,
|
||||
SQLCHAR* szSchemaName,
|
||||
SQLSMALLINT cbSchemaName,
|
||||
SQLCHAR* szTableName,
|
||||
SQLSMALLINT cbTableName,
|
||||
SQLUSMALLINT fUnique,
|
||||
SQLUSMALLINT fAccuracy)
|
||||
{
|
||||
return ::SQLStatisticsA(hstmt,
|
||||
szCatalogName,
|
||||
cbCatalogName,
|
||||
szSchemaName,
|
||||
cbSchemaName,
|
||||
szTableName,
|
||||
cbTableName,
|
||||
fUnique,
|
||||
fAccuracy);
|
||||
}
|
||||
|
||||
|
||||
inline SQLRETURN SQLTables(SQLHSTMT hstmt,
|
||||
SQLCHAR* szCatalogName,
|
||||
SQLSMALLINT cbCatalogName,
|
||||
SQLCHAR* szSchemaName,
|
||||
SQLSMALLINT cbSchemaName,
|
||||
SQLCHAR* szTableName,
|
||||
SQLSMALLINT cbTableName,
|
||||
SQLCHAR* szTableType,
|
||||
SQLSMALLINT cbTableType)
|
||||
{
|
||||
return ::SQLTablesA(hstmt,
|
||||
szCatalogName,
|
||||
cbCatalogName,
|
||||
szSchemaName,
|
||||
cbSchemaName,
|
||||
szTableName,
|
||||
cbTableName,
|
||||
szTableType,
|
||||
cbTableType);
|
||||
}
|
||||
|
||||
|
||||
inline SQLRETURN SQLDataSources(SQLHENV henv,
|
||||
SQLUSMALLINT fDirection,
|
||||
SQLCHAR* szDSN,
|
||||
SQLSMALLINT cbDSNMax,
|
||||
SQLSMALLINT* pcbDSN,
|
||||
SQLCHAR* szDescription,
|
||||
SQLSMALLINT cbDescriptionMax,
|
||||
SQLSMALLINT* pcbDescription)
|
||||
{
|
||||
return ::SQLDataSourcesA(henv,
|
||||
fDirection,
|
||||
szDSN,
|
||||
cbDSNMax,
|
||||
pcbDSN,
|
||||
szDescription,
|
||||
cbDescriptionMax,
|
||||
pcbDescription);
|
||||
}
|
||||
|
||||
|
||||
inline SQLRETURN SQLDriverConnect(SQLHDBC hdbc,
|
||||
SQLHWND hwnd,
|
||||
SQLCHAR* szConnStrIn,
|
||||
SQLSMALLINT cbConnStrIn,
|
||||
SQLCHAR* szConnStrOut,
|
||||
SQLSMALLINT cbConnStrOutMax,
|
||||
SQLSMALLINT* pcbConnStrOut,
|
||||
SQLUSMALLINT fDriverCompletion)
|
||||
{
|
||||
return ::SQLDriverConnectA(hdbc,
|
||||
hwnd,
|
||||
szConnStrIn,
|
||||
cbConnStrIn,
|
||||
szConnStrOut,
|
||||
cbConnStrOutMax,
|
||||
pcbConnStrOut,
|
||||
fDriverCompletion);
|
||||
}
|
||||
|
||||
|
||||
inline SQLRETURN SQLBrowseConnect(SQLHDBC hdbc,
|
||||
SQLCHAR* szConnStrIn,
|
||||
SQLSMALLINT cbConnStrIn,
|
||||
SQLCHAR* szConnStrOut,
|
||||
SQLSMALLINT cbConnStrOutMax,
|
||||
SQLSMALLINT* pcbConnStrOut)
|
||||
{
|
||||
return ::SQLBrowseConnectA(hdbc,
|
||||
szConnStrIn,
|
||||
cbConnStrIn,
|
||||
szConnStrOut,
|
||||
cbConnStrOutMax,
|
||||
pcbConnStrOut);
|
||||
}
|
||||
|
||||
|
||||
inline SQLRETURN SQLColumnPrivileges(SQLHSTMT hstmt,
|
||||
SQLCHAR* szCatalogName,
|
||||
SQLSMALLINT cbCatalogName,
|
||||
SQLCHAR* szSchemaName,
|
||||
SQLSMALLINT cbSchemaName,
|
||||
SQLCHAR* szTableName,
|
||||
SQLSMALLINT cbTableName,
|
||||
SQLCHAR* szColumnName,
|
||||
SQLSMALLINT cbColumnName)
|
||||
{
|
||||
return ::SQLColumnPrivilegesA(hstmt,
|
||||
szCatalogName,
|
||||
cbCatalogName,
|
||||
szSchemaName,
|
||||
cbSchemaName,
|
||||
szTableName,
|
||||
cbTableName,
|
||||
szColumnName,
|
||||
cbColumnName);
|
||||
}
|
||||
|
||||
|
||||
inline SQLRETURN SQLForeignKeys(SQLHSTMT hstmt,
|
||||
SQLCHAR* szPkCatalogName,
|
||||
SQLSMALLINT cbPkCatalogName,
|
||||
SQLCHAR* szPkSchemaName,
|
||||
SQLSMALLINT cbPkSchemaName,
|
||||
SQLCHAR* szPkTableName,
|
||||
SQLSMALLINT cbPkTableName,
|
||||
SQLCHAR* szFkCatalogName,
|
||||
SQLSMALLINT cbFkCatalogName,
|
||||
SQLCHAR* szFkSchemaName,
|
||||
SQLSMALLINT cbFkSchemaName,
|
||||
SQLCHAR* szFkTableName,
|
||||
SQLSMALLINT cbFkTableName)
|
||||
{
|
||||
return ::SQLForeignKeysA(hstmt,
|
||||
szPkCatalogName,
|
||||
cbPkCatalogName,
|
||||
szPkSchemaName,
|
||||
cbPkSchemaName,
|
||||
szPkTableName,
|
||||
cbPkTableName,
|
||||
szFkCatalogName,
|
||||
cbFkCatalogName,
|
||||
szFkSchemaName,
|
||||
cbFkSchemaName,
|
||||
szFkTableName,
|
||||
cbFkTableName);
|
||||
}
|
||||
|
||||
|
||||
inline SQLRETURN SQLNativeSql(SQLHDBC hdbc,
|
||||
SQLCHAR* szSqlStrIn,
|
||||
SQLINTEGER cbSqlStrIn,
|
||||
SQLCHAR* szSqlStr,
|
||||
SQLINTEGER cbSqlStrMax,
|
||||
SQLINTEGER* pcbSqlStr)
|
||||
{
|
||||
return ::SQLNativeSqlA(hdbc,
|
||||
szSqlStrIn,
|
||||
cbSqlStrIn,
|
||||
szSqlStr,
|
||||
cbSqlStrMax,
|
||||
pcbSqlStr);
|
||||
}
|
||||
|
||||
|
||||
inline SQLRETURN SQLPrimaryKeys(SQLHSTMT hstmt,
|
||||
SQLCHAR* szCatalogName,
|
||||
SQLSMALLINT cbCatalogName,
|
||||
SQLCHAR* szSchemaName,
|
||||
SQLSMALLINT cbSchemaName,
|
||||
SQLCHAR* szTableName,
|
||||
SQLSMALLINT cbTableName)
|
||||
{
|
||||
return ::SQLPrimaryKeysA(hstmt,
|
||||
szCatalogName,
|
||||
cbCatalogName,
|
||||
szSchemaName,
|
||||
cbSchemaName,
|
||||
szTableName,
|
||||
cbTableName);
|
||||
}
|
||||
|
||||
|
||||
inline SQLRETURN SQLProcedureColumns(SQLHSTMT hstmt,
|
||||
SQLCHAR* szCatalogName,
|
||||
SQLSMALLINT cbCatalogName,
|
||||
SQLCHAR* szSchemaName,
|
||||
SQLSMALLINT cbSchemaName,
|
||||
SQLCHAR* szProcName,
|
||||
SQLSMALLINT cbProcName,
|
||||
SQLCHAR* szColumnName,
|
||||
SQLSMALLINT cbColumnName)
|
||||
{
|
||||
return ::SQLProcedureColumnsA(hstmt,
|
||||
szCatalogName,
|
||||
cbCatalogName,
|
||||
szSchemaName,
|
||||
cbSchemaName,
|
||||
szProcName,
|
||||
cbProcName,
|
||||
szColumnName,
|
||||
cbColumnName);
|
||||
}
|
||||
|
||||
|
||||
inline SQLRETURN SQLProcedures(SQLHSTMT hstmt,
|
||||
SQLCHAR* szCatalogName,
|
||||
SQLSMALLINT cbCatalogName,
|
||||
SQLCHAR* szSchemaName,
|
||||
SQLSMALLINT cbSchemaName,
|
||||
SQLCHAR* szProcName,
|
||||
SQLSMALLINT cbProcName)
|
||||
{
|
||||
return ::SQLProceduresA(hstmt,
|
||||
szCatalogName,
|
||||
cbCatalogName,
|
||||
szSchemaName,
|
||||
cbSchemaName,
|
||||
szProcName,
|
||||
cbProcName);
|
||||
}
|
||||
|
||||
|
||||
inline SQLRETURN SQLTablePrivileges(SQLHSTMT hstmt,
|
||||
SQLCHAR* szCatalogName,
|
||||
SQLSMALLINT cbCatalogName,
|
||||
SQLCHAR* szSchemaName,
|
||||
SQLSMALLINT cbSchemaName,
|
||||
SQLCHAR* szTableName,
|
||||
SQLSMALLINT cbTableName)
|
||||
{
|
||||
return ::SQLTablePrivilegesA(hstmt,
|
||||
szCatalogName,
|
||||
cbCatalogName,
|
||||
szSchemaName,
|
||||
cbSchemaName,
|
||||
szTableName,
|
||||
cbTableName);
|
||||
}
|
||||
|
||||
|
||||
inline SQLRETURN SQLDrivers(SQLHENV henv,
|
||||
SQLUSMALLINT fDirection,
|
||||
SQLCHAR* szDriverDesc,
|
||||
SQLSMALLINT cbDriverDescMax,
|
||||
SQLSMALLINT* pcbDriverDesc,
|
||||
SQLCHAR* szDriverAttributes,
|
||||
SQLSMALLINT cbDrvrAttrMax,
|
||||
SQLSMALLINT* pcbDrvrAttr)
|
||||
{
|
||||
return ::SQLDriversA(henv,
|
||||
fDirection,
|
||||
szDriverDesc,
|
||||
cbDriverDescMax,
|
||||
pcbDriverDesc,
|
||||
szDriverAttributes,
|
||||
cbDrvrAttrMax,
|
||||
pcbDrvrAttr);
|
||||
}
|
||||
|
||||
|
||||
#endif // POCO_ODBC_UNICODE
|
||||
|
||||
|
||||
} } } // namespace Poco::Data::ODBC
|
||||
|
||||
|
||||
#endif // ODBC_Unicode_INCLUDED
|
||||
@@ -0,0 +1,51 @@
|
||||
//
|
||||
// Unicode.h
|
||||
//
|
||||
// Library: Data/ODBC
|
||||
// Package: ODBC
|
||||
// Module: Unicode
|
||||
//
|
||||
// Definition of Unicode_UNIX.
|
||||
//
|
||||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#ifndef Data_ODBC_Unicode_UNIX_INCLUDED
|
||||
#define Data_ODBC_Unicode_UNIX_INCLUDED
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Data {
|
||||
namespace ODBC {
|
||||
|
||||
|
||||
void makeUTF16(SQLCHAR* pSQLChar, SQLINTEGER length, std::string& target);
|
||||
/// Utility function for conversion from UTF-8 to UTF-16
|
||||
|
||||
|
||||
inline void makeUTF16(SQLCHAR* pSQLChar, SQLSMALLINT length, std::string& target)
|
||||
/// Utility function for conversion from UTF-8 to UTF-16.
|
||||
{
|
||||
makeUTF16(pSQLChar, (SQLINTEGER) length, target);
|
||||
}
|
||||
|
||||
|
||||
void makeUTF8(Poco::Buffer<SQLWCHAR>& buffer, SQLINTEGER length, SQLPOINTER pTarget, SQLINTEGER targetLength);
|
||||
/// Utility function for conversion from UTF-16 to UTF-8.
|
||||
|
||||
|
||||
inline void makeUTF8(Poco::Buffer<SQLWCHAR>& buffer, int length, SQLPOINTER pTarget, SQLSMALLINT targetLength)
|
||||
/// Utility function for conversion from UTF-16 to UTF-8.
|
||||
{
|
||||
makeUTF8(buffer, length, pTarget, (SQLINTEGER) targetLength);
|
||||
}
|
||||
|
||||
|
||||
} } } // namespace Poco::Data::ODBC
|
||||
|
||||
|
||||
#endif // Data_ODBC_Unicode_UNIX_INCLUDED
|
||||
@@ -0,0 +1,57 @@
|
||||
//
|
||||
// Unicode.h
|
||||
//
|
||||
// Library: Data/ODBC
|
||||
// Package: ODBC
|
||||
// Module: Unicode
|
||||
//
|
||||
// Definition of Unicode_WIN32.
|
||||
//
|
||||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#ifndef Data_ODBC_Unicode_WIN32_INCLUDED
|
||||
#define Data_ODBC_Unicode_WIN32_INCLUDED
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Data {
|
||||
namespace ODBC {
|
||||
|
||||
|
||||
inline void makeUTF16(SQLCHAR* pSQLChar, SQLINTEGER length, std::wstring& target)
|
||||
/// Utility function for conversion from UTF-8 to UTF-16
|
||||
{
|
||||
int len = length;
|
||||
if (SQL_NTS == len)
|
||||
len = (int) std::strlen((const char *) pSQLChar);
|
||||
|
||||
UnicodeConverter::toUTF16((const char *) pSQLChar, len, target);
|
||||
}
|
||||
|
||||
|
||||
inline void makeUTF8(Poco::Buffer<wchar_t>& buffer, SQLINTEGER length, SQLPOINTER pTarget, SQLINTEGER targetLength)
|
||||
/// Utility function for conversion from UTF-16 to UTF-8. Length is in bytes.
|
||||
{
|
||||
if (buffer.sizeBytes() < length)
|
||||
throw InvalidArgumentException("Specified length exceeds available length.");
|
||||
else if ((length % 2) != 0)
|
||||
throw InvalidArgumentException("Length must be an even number.");
|
||||
|
||||
length /= sizeof(wchar_t);
|
||||
std::string result;
|
||||
UnicodeConverter::toUTF8(buffer.begin(), length, result);
|
||||
|
||||
std::memset(pTarget, 0, targetLength);
|
||||
std::strncpy((char*) pTarget, result.c_str(), result.size() < targetLength ? result.size() : targetLength);
|
||||
}
|
||||
|
||||
|
||||
} } } // namespace Poco::Data::ODBC
|
||||
|
||||
|
||||
#endif // Data_ODBC_Unicode_WIN32_INCLUDED
|
||||
@@ -0,0 +1,207 @@
|
||||
//
|
||||
// Utility.h
|
||||
//
|
||||
// Library: Data/ODBC
|
||||
// Package: ODBC
|
||||
// Module: Utility
|
||||
//
|
||||
// Definition of Utility.
|
||||
//
|
||||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#ifndef Data_ODBC_Utility_INCLUDED
|
||||
#define Data_ODBC_Utility_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Data/ODBC/ODBC.h"
|
||||
#include "Poco/Data/ODBC/TypeInfo.h"
|
||||
#include "Poco/Data/Date.h"
|
||||
#include "Poco/Data/Time.h"
|
||||
#include "Poco/DateTime.h"
|
||||
#include <sstream>
|
||||
#include <map>
|
||||
#include <sqltypes.h>
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Data {
|
||||
namespace ODBC {
|
||||
|
||||
|
||||
class ODBC_API Utility
|
||||
/// Various utility functions
|
||||
{
|
||||
public:
|
||||
typedef std::map<std::string, std::string> DSNMap;
|
||||
typedef DSNMap DriverMap;
|
||||
|
||||
static bool isError(SQLRETURN rc);
|
||||
/// Returns true if return code is error
|
||||
|
||||
static DriverMap& drivers(DriverMap& driverMap);
|
||||
/// Returns driver-attributes map of available ODBC drivers.
|
||||
|
||||
static DSNMap& dataSources(DSNMap& dsnMap);
|
||||
/// Returns DSN-description map of available ODBC data sources.
|
||||
|
||||
template<typename MapType, typename KeyArgType, typename ValueArgType>
|
||||
static typename MapType::iterator mapInsert(MapType& m, const KeyArgType& k, const ValueArgType& v)
|
||||
/// Utility map "insert or replace" function (from S. Meyers: Effective STL, Item 24)
|
||||
{
|
||||
typename MapType::iterator lb = m.lower_bound(k);
|
||||
if (lb != m.end() && !(m.key_comp()(k, lb->first)))
|
||||
{
|
||||
lb->second = v;
|
||||
return lb;
|
||||
}
|
||||
else
|
||||
{
|
||||
typedef typename MapType::value_type MVT;
|
||||
return m.insert(lb, MVT(k,v));
|
||||
}
|
||||
}
|
||||
|
||||
static int cDataType(int sqlDataType);
|
||||
/// Returns C data type corresponding to supplied SQL data type.
|
||||
|
||||
static int sqlDataType(int cDataType);
|
||||
/// Returns SQL data type corresponding to supplied C data type.
|
||||
|
||||
static void dateSync(Date& dt, const SQL_DATE_STRUCT& ts);
|
||||
/// Transfers data from ODBC SQL_DATE_STRUCT to Poco::DateTime.
|
||||
|
||||
template <typename T, typename F>
|
||||
static void dateSync(T& d, const F& ds)
|
||||
/// Transfers data from ODBC SQL_DATE_STRUCT container to Poco::DateTime container.
|
||||
{
|
||||
std::size_t size = ds.size();
|
||||
if (d.size() != size) d.resize(size);
|
||||
typename T::iterator dIt = d.begin();
|
||||
typename F::const_iterator it = ds.begin();
|
||||
typename F::const_iterator end = ds.end();
|
||||
for (; it != end; ++it, ++dIt) dateSync(*dIt, *it);
|
||||
}
|
||||
|
||||
static void timeSync(Time& dt, const SQL_TIME_STRUCT& ts);
|
||||
/// Transfers data from ODBC SQL_TIME_STRUCT to Poco::DateTime.
|
||||
|
||||
template <typename T, typename F>
|
||||
static void timeSync(T& t, const F& ts)
|
||||
/// Transfers data from ODBC SQL_TIME_STRUCT container to Poco::DateTime container.
|
||||
{
|
||||
std::size_t size = ts.size();
|
||||
if (t.size() != size) t.resize(size);
|
||||
typename T::iterator dIt = t.begin();
|
||||
typename F::const_iterator it = ts.begin();
|
||||
typename F::const_iterator end = ts.end();
|
||||
for (; it != end; ++it, ++dIt) timeSync(*dIt, *it);
|
||||
}
|
||||
|
||||
static void dateTimeSync(Poco::DateTime& dt, const SQL_TIMESTAMP_STRUCT& ts);
|
||||
/// Transfers data from ODBC SQL_TIMESTAMP_STRUCT to Poco::DateTime.
|
||||
|
||||
template <typename T, typename F>
|
||||
static void dateTimeSync(T& dt, const F& ts)
|
||||
/// Transfers data from ODBC SQL_TIMESTAMP_STRUCT container to Poco::DateTime container.
|
||||
{
|
||||
std::size_t size = ts.size();
|
||||
if (dt.size() != size) dt.resize(size);
|
||||
typename T::iterator dIt = dt.begin();
|
||||
typename F::const_iterator it = ts.begin();
|
||||
typename F::const_iterator end = ts.end();
|
||||
for (; it != end; ++it, ++dIt) dateTimeSync(*dIt, *it);
|
||||
}
|
||||
|
||||
static void dateSync(SQL_DATE_STRUCT& ts, const Date& dt);
|
||||
/// Transfers data from Poco::Data::Date to ODBC SQL_DATE_STRUCT.
|
||||
|
||||
template <typename C>
|
||||
static void dateSync(std::vector<SQL_DATE_STRUCT>& ds, const C& d)
|
||||
/// Transfers data from Poco::Data::Date vector to ODBC SQL_DATE_STRUCT container.
|
||||
{
|
||||
std::size_t size = d.size();
|
||||
if (ds.size() != size) ds.resize(size);
|
||||
std::vector<SQL_DATE_STRUCT>::iterator dIt = ds.begin();
|
||||
typename C::const_iterator it = d.begin();
|
||||
typename C::const_iterator end = d.end();
|
||||
for (; it != end; ++it, ++dIt) dateSync(*dIt, *it);
|
||||
}
|
||||
|
||||
static void timeSync(SQL_TIME_STRUCT& ts, const Time& dt);
|
||||
/// Transfers data from Poco::Data::Time to ODBC SQL_TIME_STRUCT.
|
||||
|
||||
template <typename C>
|
||||
static void timeSync(std::vector<SQL_TIME_STRUCT>& ts, const C& t)
|
||||
/// Transfers data from Poco::Data::Time container to ODBC SQL_TIME_STRUCT vector.
|
||||
{
|
||||
std::size_t size = t.size();
|
||||
if (ts.size() != size) ts.resize(size);
|
||||
std::vector<SQL_TIME_STRUCT>::iterator tIt = ts.begin();
|
||||
typename C::const_iterator it = t.begin();
|
||||
typename C::const_iterator end = t.end();
|
||||
for (; it != end; ++it, ++tIt) timeSync(*tIt, *it);
|
||||
}
|
||||
|
||||
static void dateTimeSync(SQL_TIMESTAMP_STRUCT& ts, const Poco::DateTime& dt);
|
||||
/// Transfers data from Poco::DateTime to ODBC SQL_TIMESTAMP_STRUCT.
|
||||
|
||||
template <typename C>
|
||||
static void dateTimeSync(std::vector<SQL_TIMESTAMP_STRUCT>& ts, const C& dt)
|
||||
/// Transfers data from Poco::DateTime to ODBC SQL_TIMESTAMP_STRUCT.
|
||||
{
|
||||
std::size_t size = dt.size();
|
||||
if (ts.size() != size) ts.resize(size);
|
||||
std::vector<SQL_TIMESTAMP_STRUCT>::iterator tIt = ts.begin();
|
||||
typename C::const_iterator it = dt.begin();
|
||||
typename C::const_iterator end = dt.end();
|
||||
for (; it != end; ++it, ++tIt) dateTimeSync(*tIt, *it);
|
||||
}
|
||||
|
||||
private:
|
||||
static const TypeInfo _dataTypes;
|
||||
/// C <==> SQL data type mapping
|
||||
};
|
||||
|
||||
|
||||
///
|
||||
/// inlines
|
||||
///
|
||||
inline bool Utility::isError(SQLRETURN rc)
|
||||
{
|
||||
return (0 != (rc & (~1)));
|
||||
}
|
||||
|
||||
|
||||
inline int Utility::cDataType(int sqlDataType)
|
||||
{
|
||||
return _dataTypes.cDataType(sqlDataType);
|
||||
}
|
||||
|
||||
|
||||
inline int Utility::sqlDataType(int cDataType)
|
||||
{
|
||||
return _dataTypes.sqlDataType(cDataType);
|
||||
}
|
||||
|
||||
|
||||
inline void Utility::dateSync(Date& d, const SQL_DATE_STRUCT& ts)
|
||||
{
|
||||
d.assign(ts.year, ts.month, ts.day);
|
||||
}
|
||||
|
||||
|
||||
inline void Utility::timeSync(Time& t, const SQL_TIME_STRUCT& ts)
|
||||
{
|
||||
t.assign(ts.hour, ts.minute, ts.second);
|
||||
}
|
||||
|
||||
|
||||
} } } // namespace Poco::Data::ODBC
|
||||
|
||||
|
||||
#endif
|
||||
Vendored
+541
@@ -0,0 +1,541 @@
|
||||
//
|
||||
// Binder.cpp
|
||||
//
|
||||
// Library: Data/ODBC
|
||||
// Package: ODBC
|
||||
// Module: Binder
|
||||
//
|
||||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#include "Poco/Data/ODBC/Binder.h"
|
||||
#include "Poco/Data/ODBC/Utility.h"
|
||||
#include "Poco/Data/ODBC/Connector.h"
|
||||
#include "Poco/Data/LOB.h"
|
||||
#include "Poco/Data/ODBC/ODBCException.h"
|
||||
#include "Poco/DateTime.h"
|
||||
#include "Poco/Exception.h"
|
||||
#include <sql.h>
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Data {
|
||||
namespace ODBC {
|
||||
|
||||
|
||||
Binder::Binder(const StatementHandle& rStmt,
|
||||
std::size_t maxFieldSize,
|
||||
Binder::ParameterBinding dataBinding,
|
||||
const TypeInfo* pDataTypes):
|
||||
_rStmt(rStmt),
|
||||
_paramBinding(dataBinding),
|
||||
_pTypeInfo(pDataTypes),
|
||||
_paramSetSize(0),
|
||||
_maxFieldSize(maxFieldSize)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Binder::~Binder()
|
||||
{
|
||||
freeMemory();
|
||||
}
|
||||
|
||||
|
||||
void Binder::freeMemory()
|
||||
{
|
||||
LengthPtrVec::iterator itLen = _lengthIndicator.begin();
|
||||
LengthPtrVec::iterator itLenEnd = _lengthIndicator.end();
|
||||
for(; itLen != itLenEnd; ++itLen) delete *itLen;
|
||||
|
||||
LengthVecVec::iterator itVecLen = _vecLengthIndicator.begin();
|
||||
LengthVecVec::iterator itVecLenEnd = _vecLengthIndicator.end();
|
||||
for (; itVecLen != itVecLenEnd; ++itVecLen) delete *itVecLen;
|
||||
|
||||
TimeMap::iterator itT = _times.begin();
|
||||
TimeMap::iterator itTEnd = _times.end();
|
||||
for(; itT != itTEnd; ++itT) delete itT->first;
|
||||
|
||||
DateMap::iterator itD = _dates.begin();
|
||||
DateMap::iterator itDEnd = _dates.end();
|
||||
for(; itD != itDEnd; ++itD) delete itD->first;
|
||||
|
||||
TimestampMap::iterator itTS = _timestamps.begin();
|
||||
TimestampMap::iterator itTSEnd = _timestamps.end();
|
||||
for(; itTS != itTSEnd; ++itTS) delete itTS->first;
|
||||
|
||||
StringMap::iterator itStr = _strings.begin();
|
||||
StringMap::iterator itStrEnd = _strings.end();
|
||||
for(; itStr != itStrEnd; ++itStr) std::free(itStr->first);
|
||||
|
||||
CharPtrVec::iterator itChr = _charPtrs.begin();
|
||||
CharPtrVec::iterator endChr = _charPtrs.end();
|
||||
for (; itChr != endChr; ++itChr) std::free(*itChr);
|
||||
|
||||
UTF16CharPtrVec::iterator itUTF16Chr = _utf16CharPtrs.begin();
|
||||
UTF16CharPtrVec::iterator endUTF16Chr = _utf16CharPtrs.end();
|
||||
for (; itUTF16Chr != endUTF16Chr; ++itUTF16Chr) std::free(*itUTF16Chr);
|
||||
|
||||
BoolPtrVec::iterator itBool = _boolPtrs.begin();
|
||||
BoolPtrVec::iterator endBool = _boolPtrs.end();
|
||||
for (; itBool != endBool; ++itBool) delete [] *itBool;
|
||||
|
||||
DateVecVec::iterator itDateVec = _dateVecVec.begin();
|
||||
DateVecVec::iterator itDateVecEnd = _dateVecVec.end();
|
||||
for (; itDateVec != itDateVecEnd; ++itDateVec) delete *itDateVec;
|
||||
|
||||
TimeVecVec::iterator itTimeVec = _timeVecVec.begin();
|
||||
TimeVecVec::iterator itTimeVecEnd = _timeVecVec.end();
|
||||
for (; itTimeVec != itTimeVecEnd; ++itTimeVec) delete *itTimeVec;
|
||||
|
||||
DateTimeVecVec::iterator itDateTimeVec = _dateTimeVecVec.begin();
|
||||
DateTimeVecVec::iterator itDateTimeVecEnd = _dateTimeVecVec.end();
|
||||
for (; itDateTimeVec != itDateTimeVecEnd; ++itDateTimeVec) delete *itDateTimeVec;
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const std::string& val, Direction dir)
|
||||
{
|
||||
SQLPOINTER pVal = 0;
|
||||
SQLINTEGER size = (SQLINTEGER) val.size();
|
||||
SQLINTEGER colSize = 0;
|
||||
SQLSMALLINT decDigits = 0;
|
||||
getColSizeAndPrecision(pos, SQL_C_CHAR, colSize, decDigits, val.size());
|
||||
|
||||
if (isOutBound(dir))
|
||||
{
|
||||
getColumnOrParameterSize(pos, size);
|
||||
char* pChar = (char*) std::calloc(size, sizeof(char));
|
||||
pVal = (SQLPOINTER) pChar;
|
||||
_outParams.insert(ParamMap::value_type(pVal, size));
|
||||
_strings.insert(StringMap::value_type(pChar, const_cast<std::string*>(&val)));
|
||||
}
|
||||
else if (isInBound(dir))
|
||||
{
|
||||
pVal = (SQLPOINTER) val.c_str();
|
||||
_inParams.insert(ParamMap::value_type(pVal, size));
|
||||
}
|
||||
else
|
||||
throw InvalidArgumentException("Parameter must be [in] OR [out] bound.");
|
||||
|
||||
SQLLEN* pLenIn = new SQLLEN(SQL_NTS);
|
||||
|
||||
if (PB_AT_EXEC == _paramBinding)
|
||||
*pLenIn = SQL_LEN_DATA_AT_EXEC(size);
|
||||
|
||||
_lengthIndicator.push_back(pLenIn);
|
||||
|
||||
if (Utility::isError(SQLBindParameter(_rStmt,
|
||||
(SQLUSMALLINT) pos + 1,
|
||||
toODBCDirection(dir),
|
||||
SQL_C_CHAR,
|
||||
Connector::stringBoundToLongVarChar() ? SQL_LONGVARCHAR : SQL_VARCHAR,
|
||||
(SQLUINTEGER) colSize,
|
||||
0,
|
||||
pVal,
|
||||
(SQLINTEGER) size,
|
||||
_lengthIndicator.back())))
|
||||
{
|
||||
throw StatementException(_rStmt, "SQLBindParameter(std::string)");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const UTF16String& val, Direction dir)
|
||||
{
|
||||
typedef UTF16String::value_type CharT;
|
||||
|
||||
SQLPOINTER pVal = 0;
|
||||
SQLINTEGER size = (SQLINTEGER)(val.size() * sizeof(CharT));
|
||||
SQLINTEGER colSize = 0;
|
||||
SQLSMALLINT decDigits = 0;
|
||||
getColSizeAndPrecision(pos, SQL_C_WCHAR, colSize, decDigits);
|
||||
|
||||
if (isOutBound(dir))
|
||||
{
|
||||
getColumnOrParameterSize(pos, size);
|
||||
CharT* pChar = (CharT*)std::calloc(size, 1);
|
||||
pVal = (SQLPOINTER)pChar;
|
||||
_outParams.insert(ParamMap::value_type(pVal, size));
|
||||
_utf16Strings.insert(UTF16StringMap::value_type(pChar, const_cast<UTF16String*>(&val)));
|
||||
}
|
||||
else if (isInBound(dir))
|
||||
{
|
||||
pVal = (SQLPOINTER)val.c_str();
|
||||
_inParams.insert(ParamMap::value_type(pVal, size));
|
||||
}
|
||||
else
|
||||
throw InvalidArgumentException("Parameter must be [in] OR [out] bound.");
|
||||
|
||||
SQLLEN* pLenIn = new SQLLEN(SQL_NTS);
|
||||
|
||||
if (PB_AT_EXEC == _paramBinding)
|
||||
{
|
||||
*pLenIn = SQL_LEN_DATA_AT_EXEC(size);
|
||||
}
|
||||
|
||||
_lengthIndicator.push_back(pLenIn);
|
||||
|
||||
if (Utility::isError(SQLBindParameter(_rStmt,
|
||||
(SQLUSMALLINT)pos + 1,
|
||||
toODBCDirection(dir),
|
||||
SQL_C_WCHAR,
|
||||
SQL_WLONGVARCHAR,
|
||||
(SQLUINTEGER)colSize,
|
||||
0,
|
||||
pVal,
|
||||
(SQLINTEGER)size,
|
||||
_lengthIndicator.back())))
|
||||
{
|
||||
throw StatementException(_rStmt, "SQLBindParameter(std::string)");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const Date& val, Direction dir)
|
||||
{
|
||||
SQLINTEGER size = (SQLINTEGER) sizeof(SQL_DATE_STRUCT);
|
||||
SQLLEN* pLenIn = new SQLLEN;
|
||||
*pLenIn = size;
|
||||
|
||||
_lengthIndicator.push_back(pLenIn);
|
||||
|
||||
SQL_DATE_STRUCT* pDS = new SQL_DATE_STRUCT;
|
||||
Utility::dateSync(*pDS, val);
|
||||
|
||||
_dates.insert(DateMap::value_type(pDS, const_cast<Date*>(&val)));
|
||||
|
||||
SQLINTEGER colSize = 0;
|
||||
SQLSMALLINT decDigits = 0;
|
||||
getColSizeAndPrecision(pos, SQL_TYPE_DATE, colSize, decDigits);
|
||||
|
||||
if (Utility::isError(SQLBindParameter(_rStmt,
|
||||
(SQLUSMALLINT) pos + 1,
|
||||
toODBCDirection(dir),
|
||||
SQL_C_TYPE_DATE,
|
||||
SQL_TYPE_DATE,
|
||||
colSize,
|
||||
decDigits,
|
||||
(SQLPOINTER) pDS,
|
||||
0,
|
||||
_lengthIndicator.back())))
|
||||
{
|
||||
throw StatementException(_rStmt, "SQLBindParameter(Date)");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const Time& val, Direction dir)
|
||||
{
|
||||
SQLINTEGER size = (SQLINTEGER) sizeof(SQL_TIME_STRUCT);
|
||||
SQLLEN* pLenIn = new SQLLEN;
|
||||
*pLenIn = size;
|
||||
|
||||
_lengthIndicator.push_back(pLenIn);
|
||||
|
||||
SQL_TIME_STRUCT* pTS = new SQL_TIME_STRUCT;
|
||||
Utility::timeSync(*pTS, val);
|
||||
|
||||
_times.insert(TimeMap::value_type(pTS, const_cast<Time*>(&val)));
|
||||
|
||||
SQLINTEGER colSize = 0;
|
||||
SQLSMALLINT decDigits = 0;
|
||||
getColSizeAndPrecision(pos, SQL_TYPE_TIME, colSize, decDigits);
|
||||
|
||||
if (Utility::isError(SQLBindParameter(_rStmt,
|
||||
(SQLUSMALLINT) pos + 1,
|
||||
toODBCDirection(dir),
|
||||
SQL_C_TYPE_TIME,
|
||||
SQL_TYPE_TIME,
|
||||
colSize,
|
||||
decDigits,
|
||||
(SQLPOINTER) pTS,
|
||||
0,
|
||||
_lengthIndicator.back())))
|
||||
{
|
||||
throw StatementException(_rStmt, "SQLBindParameter(Time)");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const Poco::DateTime& val, Direction dir)
|
||||
{
|
||||
SQLINTEGER size = (SQLINTEGER) sizeof(SQL_TIMESTAMP_STRUCT);
|
||||
SQLLEN* pLenIn = new SQLLEN;
|
||||
*pLenIn = size;
|
||||
|
||||
_lengthIndicator.push_back(pLenIn);
|
||||
|
||||
SQL_TIMESTAMP_STRUCT* pTS = new SQL_TIMESTAMP_STRUCT;
|
||||
Utility::dateTimeSync(*pTS, val);
|
||||
|
||||
_timestamps.insert(TimestampMap::value_type(pTS, const_cast<DateTime*>(&val)));
|
||||
|
||||
SQLINTEGER colSize = 0;
|
||||
SQLSMALLINT decDigits = 0;
|
||||
getColSizeAndPrecision(pos, SQL_TYPE_TIMESTAMP, colSize, decDigits);
|
||||
|
||||
if (Utility::isError(SQLBindParameter(_rStmt,
|
||||
(SQLUSMALLINT) pos + 1,
|
||||
toODBCDirection(dir),
|
||||
SQL_C_TYPE_TIMESTAMP,
|
||||
SQL_TYPE_TIMESTAMP,
|
||||
colSize,
|
||||
decDigits,
|
||||
(SQLPOINTER) pTS,
|
||||
0,
|
||||
_lengthIndicator.back())))
|
||||
{
|
||||
throw StatementException(_rStmt, "SQLBindParameter(DateTime)");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const NullData& val, Direction dir)
|
||||
{
|
||||
if (isOutBound(dir) || !isInBound(dir))
|
||||
throw NotImplementedException("NULL parameter type can only be inbound.");
|
||||
|
||||
_inParams.insert(ParamMap::value_type(SQLPOINTER(0), SQLINTEGER(0)));
|
||||
|
||||
SQLLEN* pLenIn = new SQLLEN;
|
||||
*pLenIn = SQL_NULL_DATA;
|
||||
|
||||
_lengthIndicator.push_back(pLenIn);
|
||||
|
||||
SQLINTEGER colSize = 0;
|
||||
SQLSMALLINT decDigits = 0;
|
||||
getColSizeAndPrecision(pos, SQL_C_STINYINT, colSize, decDigits);
|
||||
|
||||
if (Utility::isError(SQLBindParameter(_rStmt,
|
||||
(SQLUSMALLINT) pos + 1,
|
||||
SQL_PARAM_INPUT,
|
||||
SQL_C_STINYINT,
|
||||
Utility::sqlDataType(SQL_C_STINYINT),
|
||||
colSize,
|
||||
decDigits,
|
||||
0,
|
||||
0,
|
||||
_lengthIndicator.back())))
|
||||
{
|
||||
throw StatementException(_rStmt, "SQLBindParameter()");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
std::size_t Binder::parameterSize(SQLPOINTER pAddr) const
|
||||
{
|
||||
ParamMap::const_iterator it = _inParams.find(pAddr);
|
||||
if (it != _inParams.end()) return it->second;
|
||||
|
||||
it = _outParams.find(pAddr);
|
||||
if (it != _outParams.end()) return it->second;
|
||||
|
||||
throw NotFoundException("Requested data size not found.");
|
||||
}
|
||||
|
||||
|
||||
void Binder::bind(std::size_t pos, const char* const &pVal, Direction dir)
|
||||
{
|
||||
throw NotImplementedException("char* binding not implemented, Use std::string instead.");
|
||||
}
|
||||
|
||||
|
||||
SQLSMALLINT Binder::toODBCDirection(Direction dir) const
|
||||
{
|
||||
bool in = isInBound(dir);
|
||||
bool out = isOutBound(dir);
|
||||
SQLSMALLINT ioType = SQL_PARAM_TYPE_UNKNOWN;
|
||||
if (in && out) ioType = SQL_PARAM_INPUT_OUTPUT;
|
||||
else if(in) ioType = SQL_PARAM_INPUT;
|
||||
else if(out) ioType = SQL_PARAM_OUTPUT;
|
||||
else throw Poco::IllegalStateException("Binder not bound (must be [in] OR [out]).");
|
||||
|
||||
return ioType;
|
||||
}
|
||||
|
||||
|
||||
void Binder::synchronize()
|
||||
{
|
||||
if (_dates.size())
|
||||
{
|
||||
DateMap::iterator it = _dates.begin();
|
||||
DateMap::iterator end = _dates.end();
|
||||
for(; it != end; ++it)
|
||||
Utility::dateSync(*it->second, *it->first);
|
||||
}
|
||||
|
||||
if (_times.size())
|
||||
{
|
||||
TimeMap::iterator it = _times.begin();
|
||||
TimeMap::iterator end = _times.end();
|
||||
for(; it != end; ++it)
|
||||
Utility::timeSync(*it->second, *it->first);
|
||||
}
|
||||
|
||||
if (_timestamps.size())
|
||||
{
|
||||
TimestampMap::iterator it = _timestamps.begin();
|
||||
TimestampMap::iterator end = _timestamps.end();
|
||||
for(; it != end; ++it)
|
||||
Utility::dateTimeSync(*it->second, *it->first);
|
||||
}
|
||||
|
||||
if (_strings.size())
|
||||
{
|
||||
StringMap::iterator it = _strings.begin();
|
||||
StringMap::iterator end = _strings.end();
|
||||
for(; it != end; ++it)
|
||||
it->second->assign(it->first, std::strlen(it->first));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Binder::reset()
|
||||
{
|
||||
freeMemory();
|
||||
LengthPtrVec().swap(_lengthIndicator);
|
||||
_inParams.clear();
|
||||
_outParams.clear();
|
||||
_dates.clear();
|
||||
_times.clear();
|
||||
_timestamps.clear();
|
||||
_strings.clear();
|
||||
_dateVecVec.clear();
|
||||
_timeVecVec.clear();
|
||||
_dateTimeVecVec.clear();
|
||||
_charPtrs.clear();
|
||||
_boolPtrs.clear();
|
||||
_containers.clear();
|
||||
_paramSetSize = 0;
|
||||
}
|
||||
|
||||
|
||||
void Binder::getColSizeAndPrecision(std::size_t pos,
|
||||
SQLSMALLINT cDataType,
|
||||
SQLINTEGER& colSize,
|
||||
SQLSMALLINT& decDigits,
|
||||
std::size_t actualSize)
|
||||
{
|
||||
// Not all drivers are equally willing to cooperate in this matter.
|
||||
// Hence the funky flow control.
|
||||
DynamicAny tmp;
|
||||
bool found(false);
|
||||
if (_pTypeInfo)
|
||||
{
|
||||
found = _pTypeInfo->tryGetInfo(cDataType, "COLUMN_SIZE", tmp);
|
||||
if (found) colSize = tmp;
|
||||
if (actualSize > colSize)
|
||||
{
|
||||
throw LengthExceededException(Poco::format("Error binding column %z size=%z, max size=%ld)",
|
||||
pos, actualSize, static_cast<long>(colSize)));
|
||||
}
|
||||
found = _pTypeInfo->tryGetInfo(cDataType, "MINIMUM_SCALE", tmp);
|
||||
if (found)
|
||||
{
|
||||
decDigits = tmp;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
Parameter p(_rStmt, pos);
|
||||
colSize = (SQLINTEGER) p.columnSize();
|
||||
decDigits = (SQLSMALLINT) p.decimalDigits();
|
||||
return;
|
||||
}
|
||||
catch (StatementException&)
|
||||
{
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
ODBCMetaColumn c(_rStmt, pos);
|
||||
colSize = (SQLINTEGER) c.length();
|
||||
decDigits = (SQLSMALLINT) c.precision();
|
||||
return;
|
||||
}
|
||||
catch (StatementException&)
|
||||
{
|
||||
}
|
||||
|
||||
// last check, just in case
|
||||
if ((0 != colSize) && (actualSize > colSize))
|
||||
{
|
||||
throw LengthExceededException(Poco::format("Error binding column %z size=%z, max size=%ld)",
|
||||
pos, actualSize, static_cast<long>(colSize)));
|
||||
}
|
||||
|
||||
// no success, set to zero and hope for the best
|
||||
// (most drivers do not require these most of the times anyway)
|
||||
colSize = 0;
|
||||
decDigits = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void Binder::getColumnOrParameterSize(std::size_t pos, SQLINTEGER& size)
|
||||
{
|
||||
std::size_t colSize = 0;
|
||||
std::size_t paramSize = 0;
|
||||
|
||||
try
|
||||
{
|
||||
ODBCMetaColumn col(_rStmt, pos);
|
||||
colSize = col.length();
|
||||
}
|
||||
catch (StatementException&) { }
|
||||
|
||||
try
|
||||
{
|
||||
Parameter p(_rStmt, pos);
|
||||
paramSize = p.columnSize();
|
||||
}
|
||||
catch (StatementException&)
|
||||
{
|
||||
size = DEFAULT_PARAM_SIZE;
|
||||
//On Linux, PostgreSQL driver segfaults on SQLGetDescField, so this is disabled for now
|
||||
#ifdef POCO_OS_FAMILY_WINDOWS
|
||||
SQLHDESC hIPD = 0;
|
||||
if (!Utility::isError(SQLGetStmtAttr(_rStmt, SQL_ATTR_IMP_PARAM_DESC, &hIPD, SQL_IS_POINTER, 0)))
|
||||
{
|
||||
SQLUINTEGER sz = 0;
|
||||
if (!Utility::isError(SQLGetDescField(hIPD, (SQLSMALLINT) pos + 1, SQL_DESC_LENGTH, &sz, SQL_IS_UINTEGER, 0)) &&
|
||||
sz > 0)
|
||||
{
|
||||
size = sz;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
if (colSize > 0 && paramSize > 0)
|
||||
size = colSize < paramSize ? static_cast<SQLINTEGER>(colSize) : static_cast<SQLINTEGER>(paramSize);
|
||||
else if (colSize > 0)
|
||||
size = static_cast<SQLINTEGER>(colSize);
|
||||
else if (paramSize > 0)
|
||||
size = static_cast<SQLINTEGER>(paramSize);
|
||||
|
||||
if (size > _maxFieldSize) size = static_cast<SQLINTEGER>(_maxFieldSize);
|
||||
}
|
||||
|
||||
|
||||
void Binder::setParamSetSize(std::size_t length)
|
||||
{
|
||||
if (0 == _paramSetSize)
|
||||
{
|
||||
if (Utility::isError(Poco::Data::ODBC::SQLSetStmtAttr(_rStmt, SQL_ATTR_PARAM_BIND_TYPE, SQL_PARAM_BIND_BY_COLUMN, SQL_IS_UINTEGER)) ||
|
||||
Utility::isError(Poco::Data::ODBC::SQLSetStmtAttr(_rStmt, SQL_ATTR_PARAMSET_SIZE, (SQLPOINTER) length, SQL_IS_UINTEGER)))
|
||||
throw StatementException(_rStmt, "SQLSetStmtAttr()");
|
||||
|
||||
_paramSetSize = static_cast<SQLINTEGER>(length);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} } } // namespace Poco::Data::ODBC
|
||||
+57
@@ -0,0 +1,57 @@
|
||||
//
|
||||
// ConnectionHandle.cpp
|
||||
//
|
||||
// Library: Data/ODBC
|
||||
// Package: ODBC
|
||||
// Module: ConnectionHandle
|
||||
//
|
||||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#include "Poco/Data/ODBC/ConnectionHandle.h"
|
||||
#include "Poco/Data/ODBC/Utility.h"
|
||||
#include "Poco/Data/ODBC/ODBCException.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Data {
|
||||
namespace ODBC {
|
||||
|
||||
|
||||
ConnectionHandle::ConnectionHandle(EnvironmentHandle* pEnvironment):
|
||||
_pEnvironment(pEnvironment ? pEnvironment : new EnvironmentHandle),
|
||||
_hdbc(SQL_NULL_HDBC),
|
||||
_ownsEnvironment(pEnvironment ? false : true)
|
||||
{
|
||||
if (Utility::isError(SQLAllocHandle(SQL_HANDLE_DBC,
|
||||
_pEnvironment->handle(),
|
||||
&_hdbc)))
|
||||
{
|
||||
throw ODBCException("Could not allocate connection handle.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ConnectionHandle::~ConnectionHandle()
|
||||
{
|
||||
try
|
||||
{
|
||||
SQLDisconnect(_hdbc);
|
||||
SQLRETURN rc = SQLFreeHandle(SQL_HANDLE_DBC, _hdbc);
|
||||
|
||||
if (_ownsEnvironment) delete _pEnvironment;
|
||||
|
||||
poco_assert (!Utility::isError(rc));
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
poco_unexpected();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} } } // namespace Poco::Data::ODBC
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
//
|
||||
// Connector.cpp
|
||||
//
|
||||
// Library: Data/ODBC
|
||||
// Package: ODBC
|
||||
// Module: Connector
|
||||
//
|
||||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#include "Poco/Data/ODBC/Connector.h"
|
||||
#include "Poco/Data/ODBC/SessionImpl.h"
|
||||
#include "Poco/Data/SessionFactory.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Data {
|
||||
namespace ODBC {
|
||||
|
||||
|
||||
const std::string Connector::KEY("ODBC");
|
||||
bool Connector::_bindStringToLongVarChar(true);
|
||||
|
||||
|
||||
Connector::Connector()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Connector::~Connector()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Poco::AutoPtr<Poco::Data::SessionImpl> Connector::createSession(const std::string& connectionString,
|
||||
std::size_t timeout)
|
||||
{
|
||||
return Poco::AutoPtr<Poco::Data::SessionImpl>(new SessionImpl(connectionString, timeout));
|
||||
}
|
||||
|
||||
|
||||
void Connector::registerConnector()
|
||||
{
|
||||
Poco::Data::SessionFactory::instance().add(new Connector());
|
||||
}
|
||||
|
||||
|
||||
void Connector::unregisterConnector()
|
||||
{
|
||||
Poco::Data::SessionFactory::instance().remove(KEY);
|
||||
}
|
||||
|
||||
|
||||
void Connector::bindStringToLongVarChar(bool flag)
|
||||
{
|
||||
_bindStringToLongVarChar = flag;
|
||||
}
|
||||
|
||||
|
||||
} } } // namespace Poco::Data::ODBC
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
//
|
||||
// EnvironmentHandle.cpp
|
||||
//
|
||||
// Library: Data/ODBC
|
||||
// Package: ODBC
|
||||
// Module: EnvironmentHandle
|
||||
//
|
||||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#include "Poco/Data/ODBC/EnvironmentHandle.h"
|
||||
#include "Poco/Data/ODBC/Utility.h"
|
||||
#include "Poco/Data/ODBC/ODBCException.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Data {
|
||||
namespace ODBC {
|
||||
|
||||
|
||||
EnvironmentHandle::EnvironmentHandle(): _henv(SQL_NULL_HENV)
|
||||
{
|
||||
if (Utility::isError(SQLAllocHandle(SQL_HANDLE_ENV,
|
||||
SQL_NULL_HANDLE,
|
||||
&_henv)) ||
|
||||
Utility::isError(SQLSetEnvAttr(_henv,
|
||||
SQL_ATTR_ODBC_VERSION,
|
||||
(SQLPOINTER) SQL_OV_ODBC3,
|
||||
0)))
|
||||
{
|
||||
throw ODBCException("Could not initialize environment.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
EnvironmentHandle::~EnvironmentHandle()
|
||||
{
|
||||
try
|
||||
{
|
||||
SQLRETURN rc = SQLFreeHandle(SQL_HANDLE_ENV, _henv);
|
||||
poco_assert (!Utility::isError(rc));
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
poco_unexpected();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} } } // namespace Poco::Data::ODBC
|
||||
+1329
File diff suppressed because it is too large
Load Diff
+30
@@ -0,0 +1,30 @@
|
||||
//
|
||||
// ODBCException.cpp
|
||||
//
|
||||
// Library: Data/ODBC
|
||||
// Package: ODBC
|
||||
// Module: ODBCException
|
||||
//
|
||||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#include "Poco/Data/ODBC/ODBCException.h"
|
||||
#include <typeinfo>
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Data {
|
||||
namespace ODBC {
|
||||
|
||||
|
||||
POCO_IMPLEMENT_EXCEPTION(ODBCException, Poco::Data::DataException, "Generic ODBC error")
|
||||
POCO_IMPLEMENT_EXCEPTION(InsufficientStorageException, ODBCException, "Insufficient storage error")
|
||||
POCO_IMPLEMENT_EXCEPTION(UnknownDataLengthException, ODBCException, "Unknown length of remaining data")
|
||||
POCO_IMPLEMENT_EXCEPTION(DataTruncatedException, ODBCException, "Variable length character or binary data truncated")
|
||||
|
||||
|
||||
} } } // namespace Poco::Data::ODBC
|
||||
+177
@@ -0,0 +1,177 @@
|
||||
//
|
||||
// ODBCMetaColumn.cpp
|
||||
//
|
||||
// Library: Data/ODBC
|
||||
// Package: ODBC
|
||||
// Module: ODBCMetaColumn
|
||||
//
|
||||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#include "Poco/Data/ODBC/ODBCMetaColumn.h"
|
||||
#include "Poco/Data/ODBC/Utility.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Data {
|
||||
namespace ODBC {
|
||||
|
||||
|
||||
ODBCMetaColumn::ODBCMetaColumn(const StatementHandle& rStmt, std::size_t position) :
|
||||
MetaColumn(position),
|
||||
_rStmt(rStmt)
|
||||
{
|
||||
init();
|
||||
}
|
||||
|
||||
|
||||
ODBCMetaColumn::~ODBCMetaColumn()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void ODBCMetaColumn::getDescription()
|
||||
{
|
||||
std::memset(_columnDesc.name, 0, NAME_BUFFER_LENGTH);
|
||||
_columnDesc.nameBufferLength = 0;
|
||||
_columnDesc.dataType = 0;
|
||||
_columnDesc.size = 0;
|
||||
_columnDesc.decimalDigits = 0;
|
||||
_columnDesc.isNullable = 0;
|
||||
|
||||
if (Utility::isError(Poco::Data::ODBC::SQLDescribeCol(_rStmt,
|
||||
(SQLUSMALLINT) position() + 1, // ODBC columns are 1-based
|
||||
_columnDesc.name,
|
||||
NAME_BUFFER_LENGTH,
|
||||
&_columnDesc.nameBufferLength,
|
||||
&_columnDesc.dataType,
|
||||
&_columnDesc.size,
|
||||
&_columnDesc.decimalDigits,
|
||||
&_columnDesc.isNullable)))
|
||||
{
|
||||
throw StatementException(_rStmt);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool ODBCMetaColumn::isUnsigned() const
|
||||
{
|
||||
SQLLEN val = 0;
|
||||
if (Utility::isError(Poco::Data::ODBC::SQLColAttribute(_rStmt,
|
||||
(SQLUSMALLINT)position() + 1, // ODBC columns are 1-based
|
||||
SQL_DESC_UNSIGNED,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
&val)))
|
||||
{
|
||||
throw StatementException(_rStmt);
|
||||
}
|
||||
return (val == SQL_TRUE);
|
||||
}
|
||||
|
||||
|
||||
void ODBCMetaColumn::init()
|
||||
{
|
||||
getDescription();
|
||||
|
||||
if (Utility::isError(Poco::Data::ODBC::SQLColAttribute(_rStmt,
|
||||
(SQLUSMALLINT) position() + 1, // ODBC columns are 1-based
|
||||
SQL_DESC_LENGTH,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
&_dataLength)))
|
||||
{
|
||||
throw StatementException(_rStmt);
|
||||
}
|
||||
|
||||
setName(std::string((char*) _columnDesc.name));
|
||||
setLength(_columnDesc.size);
|
||||
setPrecision(_columnDesc.decimalDigits);
|
||||
setNullable(SQL_NULLABLE == _columnDesc.isNullable);
|
||||
switch(_columnDesc.dataType)
|
||||
{
|
||||
case SQL_BIT:
|
||||
setType(MetaColumn::FDT_BOOL); break;
|
||||
|
||||
case SQL_CHAR:
|
||||
case SQL_VARCHAR:
|
||||
case SQL_LONGVARCHAR:
|
||||
#ifdef SQL_GUID
|
||||
case SQL_GUID:
|
||||
#endif
|
||||
setType(MetaColumn::FDT_STRING); break;
|
||||
|
||||
case SQL_WCHAR:
|
||||
case SQL_WVARCHAR:
|
||||
case SQL_WLONGVARCHAR:
|
||||
setType(MetaColumn::FDT_WSTRING); break;
|
||||
|
||||
case SQL_TINYINT:
|
||||
setType(isUnsigned() ? MetaColumn::FDT_UINT8 : MetaColumn::FDT_INT8);
|
||||
break;
|
||||
|
||||
case SQL_SMALLINT:
|
||||
setType(isUnsigned() ? MetaColumn::FDT_UINT16 : MetaColumn::FDT_INT16);
|
||||
break;
|
||||
|
||||
case SQL_INTEGER:
|
||||
setType(isUnsigned() ? MetaColumn::FDT_UINT32 : MetaColumn::FDT_INT32);
|
||||
break;
|
||||
|
||||
case SQL_BIGINT:
|
||||
setType(isUnsigned() ? MetaColumn::FDT_UINT64 : MetaColumn::FDT_INT64);
|
||||
break;
|
||||
|
||||
case SQL_DOUBLE:
|
||||
case SQL_FLOAT:
|
||||
setType(MetaColumn::FDT_DOUBLE); break;
|
||||
|
||||
case SQL_NUMERIC:
|
||||
case SQL_DECIMAL:
|
||||
// Oracle has no INTEGER type - it's essentially NUMBER with 38 whole and
|
||||
// 0 fractional digits. It also does not recognize SQL_BIGINT type,
|
||||
// so the workaround here is to hardcode it to 32 or 64 bit integer
|
||||
if (0 == _columnDesc.decimalDigits)
|
||||
{
|
||||
if (_columnDesc.size > 9)
|
||||
setType(MetaColumn::FDT_INT64);
|
||||
else
|
||||
setType(MetaColumn::FDT_INT32);
|
||||
}
|
||||
else
|
||||
{
|
||||
setType(MetaColumn::FDT_DOUBLE);
|
||||
}
|
||||
break;
|
||||
|
||||
case SQL_REAL:
|
||||
setType(MetaColumn::FDT_FLOAT); break;
|
||||
|
||||
case SQL_BINARY:
|
||||
case SQL_VARBINARY:
|
||||
case SQL_LONGVARBINARY:
|
||||
case -98:// IBM DB2 non-standard type
|
||||
setType(MetaColumn::FDT_BLOB); break;
|
||||
|
||||
case SQL_TYPE_DATE:
|
||||
setType(MetaColumn::FDT_DATE); break;
|
||||
|
||||
case SQL_TYPE_TIME:
|
||||
setType(MetaColumn::FDT_TIME); break;
|
||||
|
||||
case SQL_TYPE_TIMESTAMP:
|
||||
setType(MetaColumn::FDT_TIMESTAMP); break;
|
||||
|
||||
default:
|
||||
throw DataFormatException("Unsupported data type.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} } } // namespace Poco::Data::ODBC
|
||||
+458
@@ -0,0 +1,458 @@
|
||||
//
|
||||
// ODBCStatementImpl.cpp
|
||||
//
|
||||
// Library: Data/ODBC
|
||||
// Package: ODBC
|
||||
// Module: ODBCStatementImpl
|
||||
//
|
||||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#include "Poco/Data/ODBC/ODBCStatementImpl.h"
|
||||
#include "Poco/Data/ODBC/ConnectionHandle.h"
|
||||
#include "Poco/Data/ODBC/Utility.h"
|
||||
#include "Poco/Data/ODBC/ODBCException.h"
|
||||
#include "Poco/Data/AbstractPreparation.h"
|
||||
#include "Poco/Exception.h"
|
||||
|
||||
|
||||
#ifdef POCO_OS_FAMILY_WINDOWS
|
||||
#pragma warning(disable:4312)// 'type cast' : conversion from 'std::size_t' to 'SQLPOINTER' of greater size
|
||||
#endif
|
||||
|
||||
|
||||
using Poco::DataFormatException;
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Data {
|
||||
namespace ODBC {
|
||||
|
||||
|
||||
const std::string ODBCStatementImpl::INVALID_CURSOR_STATE = "24000";
|
||||
|
||||
|
||||
ODBCStatementImpl::ODBCStatementImpl(SessionImpl& rSession):
|
||||
Poco::Data::StatementImpl(rSession),
|
||||
_rConnection(rSession.dbc()),
|
||||
_stmt(rSession.dbc()),
|
||||
_stepCalled(false),
|
||||
_nextResponse(0),
|
||||
_prepared(false),
|
||||
_affectedRowCount(0),
|
||||
_canCompile(true)
|
||||
{
|
||||
int queryTimeout = rSession.queryTimeout();
|
||||
if (queryTimeout >= 0)
|
||||
{
|
||||
SQLULEN uqt = static_cast<SQLULEN>(queryTimeout);
|
||||
SQLSetStmtAttr(_stmt,
|
||||
SQL_ATTR_QUERY_TIMEOUT,
|
||||
(SQLPOINTER) uqt,
|
||||
0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ODBCStatementImpl::~ODBCStatementImpl()
|
||||
{
|
||||
ColumnPtrVecVec::iterator it = _columnPtrs.begin();
|
||||
ColumnPtrVecVec::iterator end = _columnPtrs.end();
|
||||
for (; it != end; ++it)
|
||||
{
|
||||
ColumnPtrVec::iterator itC = it->begin();
|
||||
ColumnPtrVec::iterator endC = it->end();
|
||||
for (; itC != endC; ++itC) delete *itC;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ODBCStatementImpl::compileImpl()
|
||||
{
|
||||
if (!_canCompile) return;
|
||||
|
||||
_stepCalled = false;
|
||||
_nextResponse = 0;
|
||||
|
||||
if (_preparations.size())
|
||||
PreparatorVec().swap(_preparations);
|
||||
|
||||
addPreparator();
|
||||
|
||||
Binder::ParameterBinding bind = session().getFeature("autoBind") ?
|
||||
Binder::PB_IMMEDIATE : Binder::PB_AT_EXEC;
|
||||
|
||||
const TypeInfo* pDT = 0;
|
||||
try
|
||||
{
|
||||
Poco::Any dti = session().getProperty("dataTypeInfo");
|
||||
pDT = AnyCast<const TypeInfo*>(dti);
|
||||
}
|
||||
catch (NotSupportedException&)
|
||||
{
|
||||
}
|
||||
|
||||
std::size_t maxFieldSize = AnyCast<std::size_t>(session().getProperty("maxFieldSize"));
|
||||
|
||||
_pBinder = new Binder(_stmt, maxFieldSize, bind, pDT);
|
||||
|
||||
makeInternalExtractors();
|
||||
doPrepare();
|
||||
|
||||
_canCompile = false;
|
||||
}
|
||||
|
||||
|
||||
void ODBCStatementImpl::makeInternalExtractors()
|
||||
{
|
||||
if (hasData() && !extractions().size())
|
||||
{
|
||||
try
|
||||
{
|
||||
fillColumns();
|
||||
}
|
||||
catch (DataFormatException&)
|
||||
{
|
||||
if (isStoredProcedure()) return;
|
||||
throw;
|
||||
}
|
||||
|
||||
makeExtractors(columnsReturned());
|
||||
fixupExtraction();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ODBCStatementImpl::addPreparator()
|
||||
{
|
||||
if (0 == _preparations.size())
|
||||
{
|
||||
std::string statement(toString());
|
||||
if (statement.empty())
|
||||
throw ODBCException("Empty statements are illegal");
|
||||
|
||||
Preparator::DataExtraction ext = session().getFeature("autoExtract") ?
|
||||
Preparator::DE_BOUND : Preparator::DE_MANUAL;
|
||||
|
||||
std::size_t maxFieldSize = AnyCast<std::size_t>(session().getProperty("maxFieldSize"));
|
||||
|
||||
_preparations.push_back(new Preparator(_stmt, statement, maxFieldSize, ext));
|
||||
}
|
||||
else
|
||||
_preparations.push_back(new Preparator(*_preparations[0]));
|
||||
|
||||
_extractors.push_back(new Extractor(_stmt, _preparations.back()));
|
||||
}
|
||||
|
||||
|
||||
void ODBCStatementImpl::doPrepare()
|
||||
{
|
||||
if (session().getFeature("autoExtract") && hasData())
|
||||
{
|
||||
std::size_t curDataSet = currentDataSet();
|
||||
poco_check_ptr (_preparations[curDataSet]);
|
||||
|
||||
Extractions& extracts = extractions();
|
||||
Extractions::iterator it = extracts.begin();
|
||||
Extractions::iterator itEnd = extracts.end();
|
||||
|
||||
if (it != itEnd && (*it)->isBulk())
|
||||
{
|
||||
std::size_t limit = getExtractionLimit();
|
||||
if (limit == Limit::LIMIT_UNLIMITED)
|
||||
throw InvalidArgumentException("Bulk operation not allowed without limit.");
|
||||
checkError(Poco::Data::ODBC::SQLSetStmtAttr(_stmt, SQL_ATTR_ROW_ARRAY_SIZE, (SQLPOINTER) limit, 0),
|
||||
"SQLSetStmtAttr(SQL_ATTR_ROW_ARRAY_SIZE)");
|
||||
}
|
||||
|
||||
AbstractPreparation::Ptr pAP = 0;
|
||||
Poco::Data::AbstractPreparator::Ptr pP = _preparations[curDataSet];
|
||||
for (std::size_t pos = 0; it != itEnd; ++it)
|
||||
{
|
||||
pAP = (*it)->createPreparation(pP, pos);
|
||||
pAP->prepare();
|
||||
pos += (*it)->numOfColumnsHandled();
|
||||
}
|
||||
|
||||
_prepared = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool ODBCStatementImpl::canBind() const
|
||||
{
|
||||
if (!bindings().empty())
|
||||
return (*bindings().begin())->canBind();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
void ODBCStatementImpl::doBind()
|
||||
{
|
||||
this->clear();
|
||||
Bindings& binds = bindings();
|
||||
if (!binds.empty())
|
||||
{
|
||||
Bindings::iterator it = binds.begin();
|
||||
Bindings::iterator itEnd = binds.end();
|
||||
|
||||
if (it != itEnd && 0 == _affectedRowCount)
|
||||
_affectedRowCount = static_cast<std::size_t>((*it)->numOfRowsHandled());
|
||||
|
||||
for (std::size_t pos = 0; it != itEnd && (*it)->canBind(); ++it)
|
||||
{
|
||||
(*it)->bind(pos);
|
||||
pos += (*it)->numOfColumnsHandled();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ODBCStatementImpl::bindImpl()
|
||||
{
|
||||
doBind();
|
||||
|
||||
SQLRETURN rc = SQLExecute(_stmt);
|
||||
|
||||
if (SQL_NEED_DATA == rc) putData();
|
||||
else checkError(rc, "SQLExecute()");
|
||||
|
||||
_pBinder->synchronize();
|
||||
}
|
||||
|
||||
|
||||
void ODBCStatementImpl::putData()
|
||||
{
|
||||
SQLPOINTER pParam = 0;
|
||||
SQLINTEGER dataSize = 0;
|
||||
SQLRETURN rc;
|
||||
|
||||
while (SQL_NEED_DATA == (rc = SQLParamData(_stmt, &pParam)))
|
||||
{
|
||||
if (pParam)
|
||||
{
|
||||
dataSize = (SQLINTEGER) _pBinder->parameterSize(pParam);
|
||||
|
||||
if (Utility::isError(SQLPutData(_stmt, pParam, dataSize)))
|
||||
throw StatementException(_stmt, "SQLPutData()");
|
||||
}
|
||||
else // if pParam is null pointer, do a dummy call
|
||||
{
|
||||
char dummy = 0;
|
||||
if (Utility::isError(SQLPutData(_stmt, &dummy, 0)))
|
||||
throw StatementException(_stmt, "SQLPutData()");
|
||||
}
|
||||
}
|
||||
|
||||
checkError(rc, "SQLParamData()");
|
||||
}
|
||||
|
||||
|
||||
void ODBCStatementImpl::clear()
|
||||
{
|
||||
SQLRETURN rc = SQLCloseCursor(_stmt);
|
||||
_stepCalled = false;
|
||||
_affectedRowCount = 0;
|
||||
|
||||
if (Utility::isError(rc))
|
||||
{
|
||||
StatementError err(_stmt);
|
||||
bool ignoreError = false;
|
||||
|
||||
const StatementDiagnostics& diagnostics = err.diagnostics();
|
||||
//ignore "Invalid cursor state" error
|
||||
//(returned by 3.x drivers when cursor is not opened)
|
||||
for (int i = 0; i < diagnostics.count(); ++i)
|
||||
{
|
||||
if ((ignoreError =
|
||||
(INVALID_CURSOR_STATE == std::string(diagnostics.sqlState(i)))))
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!ignoreError)
|
||||
throw StatementException(_stmt, "SQLCloseCursor()");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool ODBCStatementImpl::hasNext()
|
||||
{
|
||||
if (hasData())
|
||||
{
|
||||
if (!extractions().size())
|
||||
makeInternalExtractors();
|
||||
|
||||
if (!_prepared) doPrepare();
|
||||
|
||||
if (_stepCalled)
|
||||
return _stepCalled = nextRowReady();
|
||||
|
||||
makeStep();
|
||||
|
||||
if (!nextRowReady())
|
||||
{
|
||||
if (hasMoreDataSets()) activateNextDataSet();
|
||||
else return false;
|
||||
|
||||
if (SQL_NO_DATA == SQLMoreResults(_stmt))
|
||||
return false;
|
||||
|
||||
addPreparator();
|
||||
doPrepare();
|
||||
fixupExtraction();
|
||||
makeStep();
|
||||
}
|
||||
else if (Utility::isError(_nextResponse))
|
||||
checkError(_nextResponse, "SQLFetch()");
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
void ODBCStatementImpl::makeStep()
|
||||
{
|
||||
_extractors[currentDataSet()]->reset();
|
||||
_nextResponse = SQLFetch(_stmt);
|
||||
checkError(_nextResponse);
|
||||
_stepCalled = true;
|
||||
}
|
||||
|
||||
|
||||
std::size_t ODBCStatementImpl::next()
|
||||
{
|
||||
std::size_t count = 0;
|
||||
|
||||
if (nextRowReady())
|
||||
{
|
||||
Extractions& extracts = extractions();
|
||||
Extractions::iterator it = extracts.begin();
|
||||
Extractions::iterator itEnd = extracts.end();
|
||||
std::size_t prevCount = 0;
|
||||
for (std::size_t pos = 0; it != itEnd; ++it)
|
||||
{
|
||||
count = (*it)->extract(pos);
|
||||
if (prevCount && count != prevCount)
|
||||
throw IllegalStateException("Different extraction counts");
|
||||
prevCount = count;
|
||||
pos += (*it)->numOfColumnsHandled();
|
||||
}
|
||||
_stepCalled = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw StatementException(_stmt,
|
||||
std::string("Next row not available."));
|
||||
}
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
|
||||
std::string ODBCStatementImpl::nativeSQL()
|
||||
{
|
||||
std::string statement = toString();
|
||||
|
||||
SQLINTEGER length = (SQLINTEGER) statement.size() * 2;
|
||||
|
||||
char* pNative = 0;
|
||||
SQLINTEGER retlen = length;
|
||||
do
|
||||
{
|
||||
delete [] pNative;
|
||||
pNative = new char[retlen];
|
||||
std::memset(pNative, 0, retlen);
|
||||
length = retlen;
|
||||
if (Utility::isError(SQLNativeSql(_rConnection,
|
||||
(SQLCHAR*) statement.c_str(),
|
||||
(SQLINTEGER) statement.size(),
|
||||
(SQLCHAR*) pNative,
|
||||
length,
|
||||
&retlen)))
|
||||
{
|
||||
delete [] pNative;
|
||||
throw ConnectionException(_rConnection, "SQLNativeSql()");
|
||||
}
|
||||
++retlen;//accomodate for terminating '\0'
|
||||
}while (retlen > length);
|
||||
|
||||
std::string sql(pNative);
|
||||
delete [] pNative;
|
||||
return sql;
|
||||
}
|
||||
|
||||
|
||||
void ODBCStatementImpl::checkError(SQLRETURN rc, const std::string& msg)
|
||||
{
|
||||
if (SQL_NO_DATA == rc) return;
|
||||
|
||||
if (Utility::isError(rc))
|
||||
{
|
||||
std::ostringstream os;
|
||||
os << std::endl << "Requested SQL statement: " << toString() << std::endl;
|
||||
os << "Native SQL statement: " << nativeSQL() << std::endl;
|
||||
std::string str(msg); str += os.str();
|
||||
|
||||
throw StatementException(_stmt, str);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ODBCStatementImpl::fillColumns()
|
||||
{
|
||||
std::size_t colCount = columnsReturned();
|
||||
std::size_t curDataSet = currentDataSet();
|
||||
if (curDataSet >= _columnPtrs.size())
|
||||
_columnPtrs.resize(curDataSet + 1);
|
||||
|
||||
for (int i = 0; i < colCount; ++i)
|
||||
_columnPtrs[curDataSet].push_back(new ODBCMetaColumn(_stmt, i));
|
||||
}
|
||||
|
||||
|
||||
bool ODBCStatementImpl::isStoredProcedure() const
|
||||
{
|
||||
std::string str = toString();
|
||||
if (trimInPlace(str).size() < 2) return false;
|
||||
|
||||
return ('{' == str[0] && '}' == str[str.size()-1]);
|
||||
}
|
||||
|
||||
|
||||
const MetaColumn& ODBCStatementImpl::metaColumn(std::size_t pos) const
|
||||
{
|
||||
std::size_t curDataSet = currentDataSet();
|
||||
poco_assert_dbg (curDataSet < _columnPtrs.size());
|
||||
|
||||
std::size_t sz = _columnPtrs[curDataSet].size();
|
||||
|
||||
if (0 == sz || pos > sz - 1)
|
||||
throw InvalidAccessException(format("Invalid column number: %u", pos));
|
||||
|
||||
return *_columnPtrs[curDataSet][pos];
|
||||
}
|
||||
|
||||
|
||||
int ODBCStatementImpl::affectedRowCount() const
|
||||
{
|
||||
if (0 == _affectedRowCount)
|
||||
{
|
||||
SQLLEN rows = 0;
|
||||
if (!Utility::isError(SQLRowCount(_stmt, &rows)))
|
||||
_affectedRowCount = static_cast<std::size_t>(rows);
|
||||
}
|
||||
|
||||
return static_cast<int>(_affectedRowCount);
|
||||
}
|
||||
|
||||
|
||||
} } } // namespace Poco::Data::ODBC
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
//
|
||||
// Parameter.cpp
|
||||
//
|
||||
// Library: Data/ODBC
|
||||
// Package: ODBC
|
||||
// Module: Parameter
|
||||
//
|
||||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#include "Poco/Data/ODBC/Parameter.h"
|
||||
#include "Poco/Data/ODBC/Utility.h"
|
||||
#include "Poco/Data/ODBC/Error.h"
|
||||
#include "Poco/Data/ODBC/ODBCException.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Data {
|
||||
namespace ODBC {
|
||||
|
||||
|
||||
Parameter::Parameter(const StatementHandle& rStmt, std::size_t colNum) :
|
||||
_rStmt(rStmt),
|
||||
_number(colNum)
|
||||
{
|
||||
init();
|
||||
}
|
||||
|
||||
|
||||
Parameter::~Parameter()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void Parameter::init()
|
||||
{
|
||||
if (Utility::isError(SQLDescribeParam(_rStmt,
|
||||
(SQLUSMALLINT) _number + 1,
|
||||
&_dataType,
|
||||
&_columnSize,
|
||||
&_decimalDigits,
|
||||
&_isNullable)))
|
||||
{
|
||||
throw StatementException(_rStmt);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} } } // namespace Poco::Data::ODBC
|
||||
+209
@@ -0,0 +1,209 @@
|
||||
//
|
||||
// Preparator.cpp
|
||||
//
|
||||
// Library: Data/ODBC
|
||||
// Package: ODBC
|
||||
// Module: Preparator
|
||||
//
|
||||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#include "Poco/Data/ODBC/Preparator.h"
|
||||
#include "Poco/Data/ODBC/ODBCMetaColumn.h"
|
||||
#include "Poco/Exception.h"
|
||||
|
||||
|
||||
using Poco::InvalidArgumentException;
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Data {
|
||||
namespace ODBC {
|
||||
|
||||
|
||||
Preparator::Preparator(const StatementHandle& rStmt,
|
||||
const std::string& statement,
|
||||
std::size_t maxFieldSize,
|
||||
DataExtraction dataExtraction):
|
||||
_rStmt(rStmt),
|
||||
_maxFieldSize(maxFieldSize),
|
||||
_dataExtraction(dataExtraction)
|
||||
{
|
||||
SQLCHAR* pStr = (SQLCHAR*) statement.c_str();
|
||||
if (Utility::isError(Poco::Data::ODBC::SQLPrepare(_rStmt, pStr, (SQLINTEGER) statement.length())))
|
||||
throw StatementException(_rStmt);
|
||||
}
|
||||
|
||||
|
||||
Preparator::Preparator(const Preparator& other):
|
||||
_rStmt(other._rStmt),
|
||||
_maxFieldSize(other._maxFieldSize),
|
||||
_dataExtraction(other._dataExtraction)
|
||||
{
|
||||
resize();
|
||||
}
|
||||
|
||||
|
||||
Preparator::~Preparator()
|
||||
{
|
||||
try
|
||||
{
|
||||
freeMemory();
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
poco_unexpected();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Preparator::freeMemory() const
|
||||
{
|
||||
IndexMap::iterator it = _varLengthArrays.begin();
|
||||
IndexMap::iterator end = _varLengthArrays.end();
|
||||
for (; it != end; ++it)
|
||||
{
|
||||
switch (it->second)
|
||||
{
|
||||
case DT_BOOL:
|
||||
deleteCachedArray<bool>(it->first);
|
||||
break;
|
||||
|
||||
case DT_CHAR:
|
||||
deleteCachedArray<char>(it->first);
|
||||
break;
|
||||
|
||||
case DT_WCHAR:
|
||||
deleteCachedArray<UTF16String::value_type>(it->first);
|
||||
break;
|
||||
|
||||
case DT_UCHAR:
|
||||
deleteCachedArray<unsigned char>(it->first);
|
||||
break;
|
||||
|
||||
case DT_CHAR_ARRAY:
|
||||
{
|
||||
char** pc = AnyCast<char*>(&_values[it->first]);
|
||||
if (pc) std::free(*pc);
|
||||
break;
|
||||
}
|
||||
|
||||
case DT_WCHAR_ARRAY:
|
||||
{
|
||||
UTF16String::value_type** pc = AnyCast<UTF16String::value_type*>(&_values[it->first]);
|
||||
if (pc) std::free(*pc);
|
||||
break;
|
||||
}
|
||||
|
||||
case DT_UCHAR_ARRAY:
|
||||
{
|
||||
unsigned char** pc = AnyCast<unsigned char*>(&_values[it->first]);
|
||||
if (pc) std::free(*pc);
|
||||
break;
|
||||
}
|
||||
|
||||
case DT_BOOL_ARRAY:
|
||||
{
|
||||
bool** pb = AnyCast<bool*>(&_values[it->first]);
|
||||
if (pb) std::free(*pb);
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
throw InvalidArgumentException("Unknown data type.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
std::size_t Preparator::columns() const
|
||||
{
|
||||
if (_values.empty()) resize();
|
||||
return _values.size();
|
||||
}
|
||||
|
||||
|
||||
void Preparator::resize() const
|
||||
{
|
||||
SQLSMALLINT nCol = 0;
|
||||
if (!Utility::isError(SQLNumResultCols(_rStmt, &nCol)) && 0 != nCol)
|
||||
{
|
||||
_values.resize(nCol, 0);
|
||||
_lengths.resize(nCol, 0);
|
||||
_lenLengths.resize(nCol);
|
||||
if(_varLengthArrays.size())
|
||||
{
|
||||
freeMemory();
|
||||
_varLengthArrays.clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
std::size_t Preparator::maxDataSize(std::size_t pos) const
|
||||
{
|
||||
poco_assert_dbg (pos < _values.size());
|
||||
|
||||
std::size_t sz = 0;
|
||||
std::size_t maxsz = getMaxFieldSize();
|
||||
|
||||
try
|
||||
{
|
||||
ODBCMetaColumn mc(_rStmt, pos);
|
||||
sz = mc.length();
|
||||
|
||||
// accomodate for terminating zero (non-bulk only!)
|
||||
MetaColumn::ColumnDataType type = mc.type();
|
||||
if (!isBulk() && ((ODBCMetaColumn::FDT_WSTRING == type) || (ODBCMetaColumn::FDT_STRING == type))) ++sz;
|
||||
}
|
||||
catch (StatementException&) { }
|
||||
|
||||
if (!sz || sz > maxsz) sz = maxsz;
|
||||
|
||||
return sz;
|
||||
}
|
||||
|
||||
|
||||
std::size_t Preparator::actualDataSize(std::size_t col, std::size_t row) const
|
||||
{
|
||||
SQLLEN size = (POCO_DATA_INVALID_ROW == row) ? _lengths.at(col) :
|
||||
_lenLengths.at(col).at(row);
|
||||
|
||||
// workaround for drivers returning negative length
|
||||
if (size < 0 && SQL_NULL_DATA != size) size *= -1;
|
||||
|
||||
return size;
|
||||
}
|
||||
|
||||
|
||||
void Preparator::prepareBoolArray(std::size_t pos, SQLSMALLINT valueType, std::size_t length)
|
||||
{
|
||||
poco_assert_dbg (DE_BOUND == _dataExtraction);
|
||||
poco_assert_dbg (pos < _values.size());
|
||||
poco_assert_dbg (pos < _lengths.size());
|
||||
poco_assert_dbg (pos < _lenLengths.size());
|
||||
|
||||
bool* pArray = (bool*) std::calloc(length, sizeof(bool));
|
||||
|
||||
_values[pos] = Any(pArray);
|
||||
_lengths[pos] = 0;
|
||||
_lenLengths[pos].resize(length);
|
||||
_varLengthArrays.insert(IndexMap::value_type(pos, DT_BOOL_ARRAY));
|
||||
|
||||
if (Utility::isError(SQLBindCol(_rStmt,
|
||||
(SQLUSMALLINT) pos + 1,
|
||||
valueType,
|
||||
(SQLPOINTER) pArray,
|
||||
(SQLINTEGER) sizeof(bool),
|
||||
&_lenLengths[pos][0])))
|
||||
{
|
||||
throw StatementException(_rStmt, "SQLBindCol()");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} } } // namespace Poco::Data::ODBC
|
||||
+430
@@ -0,0 +1,430 @@
|
||||
//
|
||||
// SessionImpl.cpp
|
||||
//
|
||||
// Library: Data/ODBC
|
||||
// Package: ODBC
|
||||
// Module: SessionImpl
|
||||
//
|
||||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#include "Poco/Data/ODBC/SessionImpl.h"
|
||||
#include "Poco/Data/ODBC/Utility.h"
|
||||
#include "Poco/Data/ODBC/ODBCStatementImpl.h"
|
||||
#include "Poco/Data/ODBC/Error.h"
|
||||
#include "Poco/Data/ODBC/ODBCException.h"
|
||||
#include "Poco/Data/Session.h"
|
||||
#include "Poco/String.h"
|
||||
#include <sqlext.h>
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Data {
|
||||
namespace ODBC {
|
||||
|
||||
|
||||
SessionImpl::SessionImpl(const std::string& connect,
|
||||
std::size_t loginTimeout,
|
||||
std::size_t maxFieldSize,
|
||||
bool autoBind,
|
||||
bool autoExtract):
|
||||
Poco::Data::AbstractSessionImpl<SessionImpl>(connect, loginTimeout),
|
||||
_connector(Connector::KEY),
|
||||
_maxFieldSize(maxFieldSize),
|
||||
_autoBind(autoBind),
|
||||
_autoExtract(autoExtract),
|
||||
_canTransact(ODBC_TXN_CAPABILITY_UNKNOWN),
|
||||
_inTransaction(false),
|
||||
_queryTimeout(-1)
|
||||
{
|
||||
setFeature("bulk", true);
|
||||
open();
|
||||
setProperty("handle", _db.handle());
|
||||
}
|
||||
|
||||
|
||||
SessionImpl::SessionImpl(const std::string& connect,
|
||||
Poco::Any maxFieldSize,
|
||||
bool enforceCapability,
|
||||
bool autoBind,
|
||||
bool autoExtract): Poco::Data::AbstractSessionImpl<SessionImpl>(connect),
|
||||
_connector(Connector::KEY),
|
||||
_maxFieldSize(maxFieldSize),
|
||||
_autoBind(autoBind),
|
||||
_autoExtract(autoExtract),
|
||||
_canTransact(ODBC_TXN_CAPABILITY_UNKNOWN),
|
||||
_inTransaction(false),
|
||||
_queryTimeout(-1)
|
||||
{
|
||||
setFeature("bulk", true);
|
||||
open();
|
||||
setProperty("handle", _db.handle());
|
||||
}
|
||||
|
||||
|
||||
SessionImpl::~SessionImpl()
|
||||
{
|
||||
try
|
||||
{
|
||||
if (isTransaction() && !getFeature("autoCommit"))
|
||||
{
|
||||
try { rollback(); }
|
||||
catch (...) { }
|
||||
}
|
||||
|
||||
close();
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
poco_unexpected();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Poco::Data::StatementImpl::Ptr SessionImpl::createStatementImpl()
|
||||
{
|
||||
return new ODBCStatementImpl(*this);
|
||||
}
|
||||
|
||||
|
||||
void SessionImpl::open(const std::string& connect)
|
||||
{
|
||||
if (connect != connectionString())
|
||||
{
|
||||
if (isConnected())
|
||||
throw InvalidAccessException("Session already connected");
|
||||
|
||||
if (!connect.empty())
|
||||
setConnectionString(connect);
|
||||
}
|
||||
|
||||
poco_assert_dbg (!connectionString().empty());
|
||||
|
||||
SQLULEN tout = static_cast<SQLULEN>(getLoginTimeout());
|
||||
if (Utility::isError(SQLSetConnectAttr(_db, SQL_ATTR_LOGIN_TIMEOUT, (SQLPOINTER) tout, 0)))
|
||||
{
|
||||
if (Utility::isError(SQLGetConnectAttr(_db, SQL_ATTR_LOGIN_TIMEOUT, &tout, 0, 0)) ||
|
||||
getLoginTimeout() != tout)
|
||||
{
|
||||
ConnectionError e(_db);
|
||||
throw ConnectionFailedException(e.toString());
|
||||
}
|
||||
}
|
||||
|
||||
SQLCHAR connectOutput[512] = {0};
|
||||
SQLSMALLINT result;
|
||||
|
||||
if (Utility::isError(Poco::Data::ODBC::SQLDriverConnect(_db
|
||||
, NULL
|
||||
,(SQLCHAR*) connectionString().c_str()
|
||||
,(SQLSMALLINT) SQL_NTS
|
||||
, connectOutput
|
||||
, sizeof(connectOutput)
|
||||
, &result
|
||||
, SQL_DRIVER_NOPROMPT)))
|
||||
{
|
||||
ConnectionError err(_db);
|
||||
std::string errStr = err.toString();
|
||||
close();
|
||||
throw ConnectionFailedException(errStr);
|
||||
}
|
||||
|
||||
_dataTypes.fillTypeInfo(_db);
|
||||
addProperty("dataTypeInfo",
|
||||
&SessionImpl::setDataTypeInfo,
|
||||
&SessionImpl::dataTypeInfo);
|
||||
|
||||
addFeature("autoCommit",
|
||||
&SessionImpl::autoCommit,
|
||||
&SessionImpl::isAutoCommit);
|
||||
|
||||
addFeature("autoBind",
|
||||
&SessionImpl::autoBind,
|
||||
&SessionImpl::isAutoBind);
|
||||
|
||||
addFeature("autoExtract",
|
||||
&SessionImpl::autoExtract,
|
||||
&SessionImpl::isAutoExtract);
|
||||
|
||||
addProperty("maxFieldSize",
|
||||
&SessionImpl::setMaxFieldSize,
|
||||
&SessionImpl::getMaxFieldSize);
|
||||
|
||||
addProperty("queryTimeout",
|
||||
&SessionImpl::setQueryTimeout,
|
||||
&SessionImpl::getQueryTimeout);
|
||||
|
||||
Poco::Data::ODBC::SQLSetConnectAttr(_db, SQL_ATTR_QUIET_MODE, 0, 0);
|
||||
|
||||
if (!canTransact()) autoCommit("", true);
|
||||
}
|
||||
|
||||
|
||||
bool SessionImpl::isConnected() const
|
||||
{
|
||||
SQLULEN value = 0;
|
||||
|
||||
if (Utility::isError(Poco::Data::ODBC::SQLGetConnectAttr(_db,
|
||||
SQL_ATTR_CONNECTION_DEAD,
|
||||
&value,
|
||||
0,
|
||||
0))) return false;
|
||||
|
||||
return (SQL_CD_FALSE == value);
|
||||
}
|
||||
|
||||
|
||||
void SessionImpl::setConnectionTimeout(std::size_t timeout)
|
||||
{
|
||||
SQLUINTEGER value = static_cast<SQLUINTEGER>(timeout);
|
||||
|
||||
checkError(Poco::Data::ODBC::SQLSetConnectAttr(_db,
|
||||
SQL_ATTR_CONNECTION_TIMEOUT,
|
||||
&value,
|
||||
SQL_IS_UINTEGER), "Failed to set connection timeout.");
|
||||
}
|
||||
|
||||
|
||||
std::size_t SessionImpl::getConnectionTimeout() const
|
||||
{
|
||||
SQLULEN value = 0;
|
||||
|
||||
checkError(Poco::Data::ODBC::SQLGetConnectAttr(_db,
|
||||
SQL_ATTR_CONNECTION_TIMEOUT,
|
||||
&value,
|
||||
0,
|
||||
0), "Failed to get connection timeout.");
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
|
||||
bool SessionImpl::canTransact() const
|
||||
{
|
||||
if (ODBC_TXN_CAPABILITY_UNKNOWN == _canTransact)
|
||||
{
|
||||
SQLUSMALLINT ret;
|
||||
checkError(Poco::Data::ODBC::SQLGetInfo(_db, SQL_TXN_CAPABLE, &ret, 0, 0),
|
||||
"Failed to obtain transaction capability info.");
|
||||
|
||||
_canTransact = (SQL_TC_NONE != ret) ?
|
||||
ODBC_TXN_CAPABILITY_TRUE :
|
||||
ODBC_TXN_CAPABILITY_FALSE;
|
||||
}
|
||||
|
||||
return ODBC_TXN_CAPABILITY_TRUE == _canTransact;
|
||||
}
|
||||
|
||||
|
||||
void SessionImpl::setTransactionIsolation(Poco::UInt32 ti)
|
||||
{
|
||||
setTransactionIsolationImpl(ti);
|
||||
}
|
||||
|
||||
|
||||
void SessionImpl::setTransactionIsolationImpl(Poco::UInt32 ti) const
|
||||
{
|
||||
#if POCO_PTR_IS_64_BIT
|
||||
Poco::UInt64 isolation = 0;
|
||||
#else
|
||||
Poco::UInt32 isolation = 0;
|
||||
#endif
|
||||
|
||||
if (ti & Session::TRANSACTION_READ_UNCOMMITTED)
|
||||
isolation |= SQL_TXN_READ_UNCOMMITTED;
|
||||
|
||||
if (ti & Session::TRANSACTION_READ_COMMITTED)
|
||||
isolation |= SQL_TXN_READ_COMMITTED;
|
||||
|
||||
if (ti & Session::TRANSACTION_REPEATABLE_READ)
|
||||
isolation |= SQL_TXN_REPEATABLE_READ;
|
||||
|
||||
if (ti & Session::TRANSACTION_SERIALIZABLE)
|
||||
isolation |= SQL_TXN_SERIALIZABLE;
|
||||
|
||||
checkError(SQLSetConnectAttr(_db, SQL_ATTR_TXN_ISOLATION, (SQLPOINTER) isolation, 0));
|
||||
}
|
||||
|
||||
|
||||
Poco::UInt32 SessionImpl::getTransactionIsolation() const
|
||||
{
|
||||
SQLULEN isolation = 0;
|
||||
checkError(SQLGetConnectAttr(_db, SQL_ATTR_TXN_ISOLATION,
|
||||
&isolation,
|
||||
0,
|
||||
0));
|
||||
|
||||
return transactionIsolation(isolation);
|
||||
}
|
||||
|
||||
|
||||
bool SessionImpl::hasTransactionIsolation(Poco::UInt32 ti) const
|
||||
{
|
||||
if (isTransaction()) throw InvalidAccessException();
|
||||
|
||||
bool retval = true;
|
||||
Poco::UInt32 old = getTransactionIsolation();
|
||||
try { setTransactionIsolationImpl(ti); }
|
||||
catch (Poco::Exception&) { retval = false; }
|
||||
setTransactionIsolationImpl(old);
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
||||
Poco::UInt32 SessionImpl::getDefaultTransactionIsolation() const
|
||||
{
|
||||
SQLUINTEGER isolation = 0;
|
||||
checkError(SQLGetInfo(_db, SQL_DEFAULT_TXN_ISOLATION,
|
||||
&isolation,
|
||||
0,
|
||||
0));
|
||||
|
||||
return transactionIsolation(isolation);
|
||||
}
|
||||
|
||||
|
||||
Poco::UInt32 SessionImpl::transactionIsolation(SQLULEN isolation)
|
||||
{
|
||||
if (0 == isolation)
|
||||
throw InvalidArgumentException("transactionIsolation(SQLUINTEGER)");
|
||||
|
||||
Poco::UInt32 ret = 0;
|
||||
|
||||
if (isolation & SQL_TXN_READ_UNCOMMITTED)
|
||||
ret |= Session::TRANSACTION_READ_UNCOMMITTED;
|
||||
|
||||
if (isolation & SQL_TXN_READ_COMMITTED)
|
||||
ret |= Session::TRANSACTION_READ_COMMITTED;
|
||||
|
||||
if (isolation & SQL_TXN_REPEATABLE_READ)
|
||||
ret |= Session::TRANSACTION_REPEATABLE_READ;
|
||||
|
||||
if (isolation & SQL_TXN_SERIALIZABLE)
|
||||
ret |= Session::TRANSACTION_SERIALIZABLE;
|
||||
|
||||
if (0 == ret)
|
||||
throw InvalidArgumentException("transactionIsolation(SQLUINTEGER)");
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
void SessionImpl::autoCommit(const std::string&, bool val)
|
||||
{
|
||||
checkError(Poco::Data::ODBC::SQLSetConnectAttr(_db,
|
||||
SQL_ATTR_AUTOCOMMIT,
|
||||
val ? (SQLPOINTER) SQL_AUTOCOMMIT_ON :
|
||||
(SQLPOINTER) SQL_AUTOCOMMIT_OFF,
|
||||
SQL_IS_UINTEGER), "Failed to set automatic commit.");
|
||||
}
|
||||
|
||||
|
||||
bool SessionImpl::isAutoCommit(const std::string&) const
|
||||
{
|
||||
SQLULEN value = 0;
|
||||
|
||||
checkError(Poco::Data::ODBC::SQLGetConnectAttr(_db,
|
||||
SQL_ATTR_AUTOCOMMIT,
|
||||
&value,
|
||||
0,
|
||||
0));
|
||||
|
||||
return (0 != value);
|
||||
}
|
||||
|
||||
|
||||
bool SessionImpl::isTransaction() const
|
||||
{
|
||||
if (!canTransact()) return false;
|
||||
|
||||
SQLULEN value = 0;
|
||||
checkError(Poco::Data::ODBC::SQLGetConnectAttr(_db,
|
||||
SQL_ATTR_AUTOCOMMIT,
|
||||
&value,
|
||||
0,
|
||||
0));
|
||||
|
||||
if (0 == value) return _inTransaction;
|
||||
else return false;
|
||||
}
|
||||
|
||||
|
||||
void SessionImpl::begin()
|
||||
{
|
||||
if (isAutoCommit())
|
||||
throw InvalidAccessException("Session in auto commit mode.");
|
||||
|
||||
{
|
||||
Poco::FastMutex::ScopedLock l(_mutex);
|
||||
|
||||
if (_inTransaction)
|
||||
throw InvalidAccessException("Transaction in progress.");
|
||||
|
||||
_inTransaction = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void SessionImpl::commit()
|
||||
{
|
||||
if (!isAutoCommit())
|
||||
checkError(SQLEndTran(SQL_HANDLE_DBC, _db, SQL_COMMIT));
|
||||
|
||||
_inTransaction = false;
|
||||
}
|
||||
|
||||
|
||||
void SessionImpl::rollback()
|
||||
{
|
||||
if (!isAutoCommit())
|
||||
checkError(SQLEndTran(SQL_HANDLE_DBC, _db, SQL_ROLLBACK));
|
||||
|
||||
_inTransaction = false;
|
||||
}
|
||||
|
||||
|
||||
void SessionImpl::reset()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
void SessionImpl::close()
|
||||
{
|
||||
if (!isConnected()) return;
|
||||
|
||||
try
|
||||
{
|
||||
commit();
|
||||
}
|
||||
catch (ConnectionException&)
|
||||
{
|
||||
}
|
||||
|
||||
SQLDisconnect(_db);
|
||||
}
|
||||
|
||||
|
||||
int SessionImpl::maxStatementLength() const
|
||||
{
|
||||
SQLUINTEGER info;
|
||||
SQLRETURN rc = 0;
|
||||
if (Utility::isError(rc = Poco::Data::ODBC::SQLGetInfo(_db,
|
||||
SQL_MAXIMUM_STATEMENT_LENGTH,
|
||||
(SQLPOINTER) &info,
|
||||
0,
|
||||
0)))
|
||||
{
|
||||
throw ConnectionException(_db,
|
||||
"SQLGetInfo(SQL_MAXIMUM_STATEMENT_LENGTH)");
|
||||
}
|
||||
|
||||
return info;
|
||||
}
|
||||
|
||||
|
||||
} } } // namespace Poco::Data::ODBC
|
||||
+265
@@ -0,0 +1,265 @@
|
||||
//
|
||||
// TypeInfo.cpp
|
||||
//
|
||||
// Library: Data/ODBC
|
||||
// Package: ODBC
|
||||
// Module: TypeInfo
|
||||
//
|
||||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#include "Poco/Data/ODBC/TypeInfo.h"
|
||||
#include "Poco/Data/ODBC/ODBCException.h"
|
||||
#include "Poco/Format.h"
|
||||
#include "Poco/Exception.h"
|
||||
#include <iostream>
|
||||
|
||||
namespace Poco {
|
||||
namespace Data {
|
||||
namespace ODBC {
|
||||
|
||||
|
||||
TypeInfo::TypeInfo(SQLHDBC* pHDBC): _pHDBC(pHDBC)
|
||||
{
|
||||
fillCTypes();
|
||||
fillSQLTypes();
|
||||
if (_pHDBC) fillTypeInfo(*_pHDBC);
|
||||
}
|
||||
|
||||
|
||||
TypeInfo::~TypeInfo()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void TypeInfo::fillCTypes()
|
||||
{
|
||||
_cDataTypes.insert(ValueType(SQL_CHAR, SQL_C_CHAR));
|
||||
_cDataTypes.insert(ValueType(SQL_VARCHAR, SQL_C_CHAR));
|
||||
_cDataTypes.insert(ValueType(SQL_LONGVARCHAR, SQL_C_CHAR));
|
||||
_cDataTypes.insert(ValueType(SQL_DECIMAL, SQL_C_DOUBLE));
|
||||
_cDataTypes.insert(ValueType(SQL_NUMERIC, SQL_C_DOUBLE));
|
||||
_cDataTypes.insert(ValueType(SQL_BIT, SQL_C_BIT));
|
||||
_cDataTypes.insert(ValueType(SQL_TINYINT, SQL_C_STINYINT));
|
||||
_cDataTypes.insert(ValueType(SQL_SMALLINT, SQL_C_SSHORT));
|
||||
_cDataTypes.insert(ValueType(SQL_INTEGER, SQL_C_SLONG));
|
||||
_cDataTypes.insert(ValueType(SQL_BIGINT, SQL_C_SBIGINT));
|
||||
_cDataTypes.insert(ValueType(SQL_REAL, SQL_C_FLOAT));
|
||||
_cDataTypes.insert(ValueType(SQL_FLOAT, SQL_C_DOUBLE));
|
||||
_cDataTypes.insert(ValueType(SQL_DOUBLE, SQL_C_DOUBLE));
|
||||
_cDataTypes.insert(ValueType(SQL_BINARY, SQL_C_BINARY));
|
||||
_cDataTypes.insert(ValueType(SQL_VARBINARY, SQL_C_BINARY));
|
||||
_cDataTypes.insert(ValueType(SQL_LONGVARBINARY, SQL_C_BINARY));
|
||||
_cDataTypes.insert(ValueType(SQL_TYPE_DATE, SQL_C_TYPE_DATE));
|
||||
_cDataTypes.insert(ValueType(SQL_TYPE_TIME, SQL_C_TYPE_TIME));
|
||||
_cDataTypes.insert(ValueType(SQL_TYPE_TIMESTAMP, SQL_C_TYPE_TIMESTAMP));
|
||||
}
|
||||
|
||||
|
||||
void TypeInfo::fillSQLTypes()
|
||||
{
|
||||
_sqlDataTypes.insert(ValueType(SQL_C_CHAR, SQL_LONGVARCHAR));
|
||||
_sqlDataTypes.insert(ValueType(SQL_C_BIT, SQL_BIT));
|
||||
_sqlDataTypes.insert(ValueType(SQL_C_TINYINT, SQL_TINYINT));
|
||||
_sqlDataTypes.insert(ValueType(SQL_C_STINYINT, SQL_TINYINT));
|
||||
_sqlDataTypes.insert(ValueType(SQL_C_UTINYINT, SQL_TINYINT));
|
||||
_sqlDataTypes.insert(ValueType(SQL_C_SHORT, SQL_SMALLINT));
|
||||
_sqlDataTypes.insert(ValueType(SQL_C_SSHORT, SQL_SMALLINT));
|
||||
_sqlDataTypes.insert(ValueType(SQL_C_USHORT, SQL_SMALLINT));
|
||||
_sqlDataTypes.insert(ValueType(SQL_C_LONG, SQL_INTEGER));
|
||||
_sqlDataTypes.insert(ValueType(SQL_C_SLONG, SQL_INTEGER));
|
||||
_sqlDataTypes.insert(ValueType(SQL_C_ULONG, SQL_INTEGER));
|
||||
_sqlDataTypes.insert(ValueType(SQL_C_SBIGINT, SQL_BIGINT));
|
||||
_sqlDataTypes.insert(ValueType(SQL_C_UBIGINT, SQL_BIGINT));
|
||||
_sqlDataTypes.insert(ValueType(SQL_C_FLOAT, SQL_REAL));
|
||||
_sqlDataTypes.insert(ValueType(SQL_C_DOUBLE, SQL_DOUBLE));
|
||||
_sqlDataTypes.insert(ValueType(SQL_C_BINARY, SQL_LONGVARBINARY));
|
||||
_sqlDataTypes.insert(ValueType(SQL_C_TYPE_DATE, SQL_TYPE_DATE));
|
||||
_sqlDataTypes.insert(ValueType(SQL_C_TYPE_TIME, SQL_TYPE_TIME));
|
||||
_sqlDataTypes.insert(ValueType(SQL_C_TYPE_TIMESTAMP, SQL_TYPE_TIMESTAMP));
|
||||
}
|
||||
|
||||
|
||||
void TypeInfo::fillTypeInfo(SQLHDBC pHDBC)
|
||||
{
|
||||
_pHDBC = &pHDBC;
|
||||
|
||||
if (_typeInfo.empty() && _pHDBC)
|
||||
{
|
||||
const static int stringSize = 512;
|
||||
TypeInfoVec().swap(_typeInfo);
|
||||
|
||||
SQLRETURN rc;
|
||||
SQLHSTMT hstmt = SQL_NULL_HSTMT;
|
||||
|
||||
rc = SQLAllocHandle(SQL_HANDLE_STMT, *_pHDBC, &hstmt);
|
||||
if (!SQL_SUCCEEDED(rc))
|
||||
throw StatementException(hstmt, "SQLGetData()");
|
||||
|
||||
rc = SQLGetTypeInfo(hstmt, SQL_ALL_TYPES);
|
||||
if (SQL_SUCCEEDED(rc))
|
||||
{
|
||||
while (SQLFetch(hstmt) != SQL_NO_DATA_FOUND)
|
||||
{
|
||||
char typeName[stringSize] = { 0 };
|
||||
char literalPrefix[stringSize] = { 0 };
|
||||
char literalSuffix[stringSize] = { 0 };
|
||||
char createParams[stringSize] = { 0 };
|
||||
char localTypeName[stringSize] = { 0 };
|
||||
|
||||
TypeInfoTup ti("TYPE_NAME", "",
|
||||
"DATA_TYPE", 0,
|
||||
"COLUMN_SIZE", 0,
|
||||
"LITERAL_PREFIX", "",
|
||||
"LITERAL_SUFFIX", "",
|
||||
"CREATE_PARAMS", "",
|
||||
"NULLABLE", 0,
|
||||
"CASE_SENSITIVE", 0,
|
||||
"SEARCHABLE", 0,
|
||||
"UNSIGNED_ATTRIBUTE", 0,
|
||||
"FIXED_PREC_SCALE", 0,
|
||||
"AUTO_UNIQUE_VALUE", 0,
|
||||
"LOCAL_TYPE_NAME", "",
|
||||
"MINIMUM_SCALE", 0,
|
||||
"MAXIMUM_SCALE", 0,
|
||||
"SQL_DATA_TYPE", 0,
|
||||
"SQL_DATETIME_SUB", 0,
|
||||
"NUM_PREC_RADIX", 0,
|
||||
"INTERVAL_PRECISION", 0);
|
||||
|
||||
SQLLEN ind = 0;
|
||||
rc = SQLGetData(hstmt, 1, SQL_C_CHAR, typeName, sizeof(typeName), &ind);
|
||||
ti.set<0>(typeName);
|
||||
rc = SQLGetData(hstmt, 2, SQL_C_SSHORT, &ti.get<1>(), sizeof(SQLSMALLINT), &ind);
|
||||
rc = SQLGetData(hstmt, 3, SQL_C_SLONG, &ti.get<2>(), sizeof(SQLINTEGER), &ind);
|
||||
rc = SQLGetData(hstmt, 4, SQL_C_CHAR, literalPrefix, sizeof(literalPrefix), &ind);
|
||||
ti.set<3>(literalPrefix);
|
||||
rc = SQLGetData(hstmt, 5, SQL_C_CHAR, literalSuffix, sizeof(literalSuffix), &ind);
|
||||
ti.set<4>(literalSuffix);
|
||||
rc = SQLGetData(hstmt, 6, SQL_C_CHAR, createParams, sizeof(createParams), &ind);
|
||||
ti.set<5>(createParams);
|
||||
rc = SQLGetData(hstmt, 7, SQL_C_SSHORT, &ti.get<6>(), sizeof(SQLSMALLINT), &ind);
|
||||
rc = SQLGetData(hstmt, 8, SQL_C_SSHORT, &ti.get<7>(), sizeof(SQLSMALLINT), &ind);
|
||||
rc = SQLGetData(hstmt, 9, SQL_C_SSHORT, &ti.get<8>(), sizeof(SQLSMALLINT), &ind);
|
||||
rc = SQLGetData(hstmt, 10, SQL_C_SSHORT, &ti.get<9>(), sizeof(SQLSMALLINT), &ind);
|
||||
rc = SQLGetData(hstmt, 11, SQL_C_SSHORT, &ti.get<10>(), sizeof(SQLSMALLINT), &ind);
|
||||
rc = SQLGetData(hstmt, 12, SQL_C_SSHORT, &ti.get<11>(), sizeof(SQLSMALLINT), &ind);
|
||||
rc = SQLGetData(hstmt, 13, SQL_C_CHAR, localTypeName, sizeof(localTypeName), &ind);
|
||||
ti.set<12>(localTypeName);
|
||||
rc = SQLGetData(hstmt, 14, SQL_C_SSHORT, &ti.get<13>(), sizeof(SQLSMALLINT), &ind);
|
||||
rc = SQLGetData(hstmt, 15, SQL_C_SSHORT, &ti.get<14>(), sizeof(SQLSMALLINT), &ind);
|
||||
rc = SQLGetData(hstmt, 16, SQL_C_SSHORT, &ti.get<15>(), sizeof(SQLSMALLINT), &ind);
|
||||
rc = SQLGetData(hstmt, 17, SQL_C_SSHORT, &ti.get<16>(), sizeof(SQLSMALLINT), &ind);
|
||||
rc = SQLGetData(hstmt, 18, SQL_C_SLONG, &ti.get<17>(), sizeof(SQLINTEGER), &ind);
|
||||
rc = SQLGetData(hstmt, 19, SQL_C_SSHORT, &ti.get<18>(), sizeof(SQLSMALLINT), &ind);
|
||||
|
||||
_typeInfo.push_back(ti);
|
||||
}
|
||||
}
|
||||
|
||||
SQLFreeHandle(SQL_HANDLE_STMT, hstmt);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
DynamicAny TypeInfo::getInfo(SQLSMALLINT type, const std::string& param) const
|
||||
{
|
||||
TypeInfoVec::const_iterator it = _typeInfo.begin();
|
||||
TypeInfoVec::const_iterator end = _typeInfo.end();
|
||||
for (; it != end; ++it)
|
||||
{
|
||||
if (type == it->get<1>())
|
||||
return (*it)[param];
|
||||
}
|
||||
|
||||
throw NotFoundException(param);
|
||||
}
|
||||
|
||||
|
||||
bool TypeInfo::tryGetInfo(SQLSMALLINT type, const std::string& param, DynamicAny& result) const
|
||||
{
|
||||
TypeInfoVec::const_iterator it = _typeInfo.begin();
|
||||
TypeInfoVec::const_iterator end = _typeInfo.end();
|
||||
for (; it != end; ++it)
|
||||
{
|
||||
if (type == it->get<1>())
|
||||
{
|
||||
result = (*it)[param];
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
int TypeInfo::cDataType(int sqlDataType) const
|
||||
{
|
||||
DataTypeMap::const_iterator it = _cDataTypes.find(sqlDataType);
|
||||
|
||||
if (_cDataTypes.end() == it)
|
||||
throw NotFoundException(format("C data type not found for SQL data type: %d", sqlDataType));
|
||||
|
||||
return it->second;
|
||||
}
|
||||
|
||||
|
||||
int TypeInfo::sqlDataType(int cDataType) const
|
||||
{
|
||||
DataTypeMap::const_iterator it = _sqlDataTypes.find(cDataType);
|
||||
|
||||
if (_sqlDataTypes.end() == it)
|
||||
throw NotFoundException(format("SQL data type not found for C data type: %d", cDataType));
|
||||
|
||||
return it->second;
|
||||
}
|
||||
|
||||
|
||||
void TypeInfo::print(std::ostream& ostr)
|
||||
{
|
||||
if (_typeInfo.empty())
|
||||
{
|
||||
ostr << "No data found.";
|
||||
return;
|
||||
}
|
||||
|
||||
TypeInfoTup::NameVec::const_iterator nIt = (*_typeInfo[0].names()).begin();
|
||||
TypeInfoTup::NameVec::const_iterator nItEnd = (*_typeInfo[0].names()).end();
|
||||
for (; nIt != nItEnd; ++nIt)
|
||||
ostr << *nIt << "\t";
|
||||
|
||||
ostr << std::endl;
|
||||
|
||||
TypeInfoVec::const_iterator it = _typeInfo.begin();
|
||||
TypeInfoVec::const_iterator end = _typeInfo.end();
|
||||
|
||||
for (; it != end; ++it)
|
||||
{
|
||||
ostr << it->get<0>() << "\t"
|
||||
<< it->get<1>() << "\t"
|
||||
<< it->get<2>() << "\t"
|
||||
<< it->get<3>() << "\t"
|
||||
<< it->get<4>() << "\t"
|
||||
<< it->get<5>() << "\t"
|
||||
<< it->get<6>() << "\t"
|
||||
<< it->get<7>() << "\t"
|
||||
<< it->get<8>() << "\t"
|
||||
<< it->get<9>() << "\t"
|
||||
<< it->get<10>() << "\t"
|
||||
<< it->get<11>() << "\t"
|
||||
<< it->get<12>() << "\t"
|
||||
<< it->get<13>() << "\t"
|
||||
<< it->get<14>() << "\t"
|
||||
<< it->get<15>() << "\t"
|
||||
<< it->get<16>() << "\t"
|
||||
<< it->get<17>() << "\t"
|
||||
<< it->get<18>() << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} } } // namespace Poco::Data::ODBC
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
//
|
||||
// Unicode.cpp
|
||||
//
|
||||
// Library: Data/ODBC
|
||||
// Package: ODBC
|
||||
// Module: Unicode
|
||||
//
|
||||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#include "Poco/Data/ODBC/ODBC.h"
|
||||
|
||||
|
||||
#if defined(POCO_ODBC_UNICODE_WINDOWS)
|
||||
#include "Unicode_WIN32.cpp"
|
||||
#elif defined(POCO_ODBC_UNICODE_UNIXODBC)
|
||||
#include "Unicode_UNIXODBC.cpp"
|
||||
#endif
|
||||
+775
@@ -0,0 +1,775 @@
|
||||
//
|
||||
// Unicode.cpp
|
||||
//
|
||||
// Library: Data/ODBC
|
||||
// Package: ODBC
|
||||
// Module: Unicode
|
||||
//
|
||||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#include "Poco/Data/ODBC/ODBC.h"
|
||||
#include "Poco/Data/ODBC/Unicode_UNIXODBC.h"
|
||||
#include "Poco/TextConverter.h"
|
||||
#include "Poco/UTF8Encoding.h"
|
||||
#include "Poco/UTF16Encoding.h"
|
||||
#include "Poco/Buffer.h"
|
||||
#include "Poco/Exception.h"
|
||||
#include <iostream>
|
||||
|
||||
|
||||
using Poco::Buffer;
|
||||
using Poco::UTF8Encoding;
|
||||
using Poco::UTF16Encoding;
|
||||
using Poco::TextConverter;
|
||||
using Poco::InvalidArgumentException;
|
||||
using Poco::NotImplementedException;
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Data {
|
||||
namespace ODBC {
|
||||
|
||||
|
||||
void makeUTF16(SQLCHAR* pSQLChar, SQLINTEGER length, std::string& target)
|
||||
{
|
||||
int len = length;
|
||||
if (SQL_NTS == len)
|
||||
len = (int) std::strlen((const char *) pSQLChar);
|
||||
|
||||
UTF8Encoding utf8Encoding;
|
||||
UTF16Encoding utf16Encoding;
|
||||
TextConverter converter(utf8Encoding, utf16Encoding);
|
||||
|
||||
if (0 != converter.convert(pSQLChar, len, target))
|
||||
throw DataFormatException("Error converting UTF-8 to UTF-16");
|
||||
}
|
||||
|
||||
|
||||
void makeUTF8(Poco::Buffer<SQLWCHAR>& buffer, SQLINTEGER length, SQLPOINTER pTarget, SQLINTEGER targetLength)
|
||||
{
|
||||
UTF8Encoding utf8Encoding;
|
||||
UTF16Encoding utf16Encoding;
|
||||
TextConverter converter(utf16Encoding, utf8Encoding);
|
||||
|
||||
std::string result;
|
||||
if (0 != converter.convert(buffer.begin(), length, result))
|
||||
throw DataFormatException("Error converting UTF-16 to UTF-8");
|
||||
|
||||
std::memset(pTarget, 0, targetLength);
|
||||
std::strncpy((char*) pTarget, result.c_str(), result.size() < targetLength ? result.size() : targetLength);
|
||||
}
|
||||
|
||||
|
||||
SQLRETURN SQLColAttribute(SQLHSTMT hstmt,
|
||||
SQLUSMALLINT iCol,
|
||||
SQLUSMALLINT iField,
|
||||
SQLPOINTER pCharAttr,
|
||||
SQLSMALLINT cbCharAttrMax,
|
||||
SQLSMALLINT* pcbCharAttr,
|
||||
NumAttrPtrType pNumAttr)
|
||||
{
|
||||
if (isString(pCharAttr, cbCharAttrMax))
|
||||
{
|
||||
Buffer<SQLWCHAR> buffer(stringLength(pCharAttr, cbCharAttrMax));
|
||||
|
||||
SQLRETURN rc = SQLColAttributeW(hstmt,
|
||||
iCol,
|
||||
iField,
|
||||
buffer.begin(),
|
||||
(SQLSMALLINT) buffer.sizeBytes(),
|
||||
pcbCharAttr,
|
||||
pNumAttr);
|
||||
|
||||
makeUTF8(buffer, *pcbCharAttr, pCharAttr, cbCharAttrMax);
|
||||
return rc;
|
||||
}
|
||||
|
||||
return SQLColAttributeW(hstmt,
|
||||
iCol,
|
||||
iField,
|
||||
pCharAttr,
|
||||
cbCharAttrMax,
|
||||
pcbCharAttr,
|
||||
pNumAttr);
|
||||
}
|
||||
|
||||
|
||||
SQLRETURN SQLColAttributes(SQLHSTMT hstmt,
|
||||
SQLUSMALLINT icol,
|
||||
SQLUSMALLINT fDescType,
|
||||
SQLPOINTER rgbDesc,
|
||||
SQLSMALLINT cbDescMax,
|
||||
SQLSMALLINT* pcbDesc,
|
||||
SQLLEN* pfDesc)
|
||||
{
|
||||
return SQLColAttribute(hstmt,
|
||||
icol,
|
||||
fDescType,
|
||||
rgbDesc,
|
||||
cbDescMax,
|
||||
pcbDesc,
|
||||
pfDesc);
|
||||
}
|
||||
|
||||
|
||||
SQLRETURN SQLConnect(SQLHDBC hdbc,
|
||||
SQLCHAR* szDSN,
|
||||
SQLSMALLINT cbDSN,
|
||||
SQLCHAR* szUID,
|
||||
SQLSMALLINT cbUID,
|
||||
SQLCHAR* szAuthStr,
|
||||
SQLSMALLINT cbAuthStr)
|
||||
{
|
||||
std::string sqlDSN;
|
||||
makeUTF16(szDSN, cbDSN, sqlDSN);
|
||||
|
||||
std::string sqlUID;
|
||||
makeUTF16(szUID, cbUID, sqlUID);
|
||||
|
||||
std::string sqlPWD;
|
||||
makeUTF16(szAuthStr, cbAuthStr, sqlPWD);
|
||||
|
||||
return SQLConnectW(hdbc,
|
||||
(SQLWCHAR*) sqlDSN.c_str(), cbDSN,
|
||||
(SQLWCHAR*) sqlUID.c_str(), cbUID,
|
||||
(SQLWCHAR*) sqlPWD.c_str(), cbAuthStr);
|
||||
}
|
||||
|
||||
|
||||
SQLRETURN SQLDescribeCol(SQLHSTMT hstmt,
|
||||
SQLUSMALLINT icol,
|
||||
SQLCHAR* szColName,
|
||||
SQLSMALLINT cbColNameMax,
|
||||
SQLSMALLINT* pcbColName,
|
||||
SQLSMALLINT* pfSqlType,
|
||||
SQLULEN* pcbColDef,
|
||||
SQLSMALLINT* pibScale,
|
||||
SQLSMALLINT* pfNullable)
|
||||
{
|
||||
Buffer<SQLWCHAR> buffer(cbColNameMax);
|
||||
SQLRETURN rc = SQLDescribeColW(hstmt,
|
||||
icol,
|
||||
(SQLWCHAR*) buffer.begin(),
|
||||
(SQLSMALLINT) buffer.size(),
|
||||
pcbColName,
|
||||
pfSqlType,
|
||||
pcbColDef,
|
||||
pibScale,
|
||||
pfNullable);
|
||||
|
||||
makeUTF8(buffer, *pcbColName * sizeof(SQLWCHAR), szColName, cbColNameMax);
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
SQLRETURN SQLError(SQLHENV henv,
|
||||
SQLHDBC hdbc,
|
||||
SQLHSTMT hstmt,
|
||||
SQLCHAR* szSqlState,
|
||||
SQLINTEGER* pfNativeError,
|
||||
SQLCHAR* szErrorMsg,
|
||||
SQLSMALLINT cbErrorMsgMax,
|
||||
SQLSMALLINT* pcbErrorMsg)
|
||||
{
|
||||
throw NotImplementedException("SQLError is obsolete. "
|
||||
"Use SQLGetDiagRec instead.");
|
||||
}
|
||||
|
||||
|
||||
SQLRETURN SQLExecDirect(SQLHSTMT hstmt,
|
||||
SQLCHAR* szSqlStr,
|
||||
SQLINTEGER cbSqlStr)
|
||||
{
|
||||
std::string sqlStr;
|
||||
makeUTF16(szSqlStr, cbSqlStr, sqlStr);
|
||||
|
||||
return SQLExecDirectW(hstmt, (SQLWCHAR*) sqlStr.c_str(), cbSqlStr);
|
||||
}
|
||||
|
||||
|
||||
SQLRETURN SQLGetConnectAttr(SQLHDBC hdbc,
|
||||
SQLINTEGER fAttribute,
|
||||
SQLPOINTER rgbValue,
|
||||
SQLINTEGER cbValueMax,
|
||||
SQLINTEGER* pcbValue)
|
||||
{
|
||||
if (isString(rgbValue, cbValueMax))
|
||||
{
|
||||
Buffer<SQLWCHAR> buffer(stringLength(rgbValue, cbValueMax));
|
||||
|
||||
SQLRETURN rc = SQLGetConnectAttrW(hdbc,
|
||||
fAttribute,
|
||||
buffer.begin(),
|
||||
(SQLINTEGER) buffer.sizeBytes(),
|
||||
pcbValue);
|
||||
|
||||
makeUTF8(buffer, *pcbValue, rgbValue, cbValueMax);
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
return SQLGetConnectAttrW(hdbc,
|
||||
fAttribute,
|
||||
rgbValue,
|
||||
cbValueMax,
|
||||
pcbValue);
|
||||
}
|
||||
|
||||
|
||||
SQLRETURN SQLGetCursorName(SQLHSTMT hstmt,
|
||||
SQLCHAR* szCursor,
|
||||
SQLSMALLINT cbCursorMax,
|
||||
SQLSMALLINT* pcbCursor)
|
||||
{
|
||||
throw NotImplementedException("Not implemented");
|
||||
}
|
||||
|
||||
|
||||
SQLRETURN SQLSetDescField(SQLHDESC hdesc,
|
||||
SQLSMALLINT iRecord,
|
||||
SQLSMALLINT iField,
|
||||
SQLPOINTER rgbValue,
|
||||
SQLINTEGER cbValueMax)
|
||||
{
|
||||
if (isString(rgbValue, cbValueMax))
|
||||
{
|
||||
std::string str;
|
||||
makeUTF16((SQLCHAR*) rgbValue, cbValueMax, str);
|
||||
|
||||
return SQLSetDescFieldW(hdesc,
|
||||
iRecord,
|
||||
iField,
|
||||
(SQLPOINTER) str.c_str(),
|
||||
(SQLINTEGER) str.size() * sizeof(SQLWCHAR));
|
||||
}
|
||||
|
||||
return SQLSetDescFieldW(hdesc,
|
||||
iRecord,
|
||||
iField,
|
||||
rgbValue,
|
||||
cbValueMax);
|
||||
}
|
||||
|
||||
|
||||
SQLRETURN SQLGetDescField(SQLHDESC hdesc,
|
||||
SQLSMALLINT iRecord,
|
||||
SQLSMALLINT iField,
|
||||
SQLPOINTER rgbValue,
|
||||
SQLINTEGER cbValueMax,
|
||||
SQLINTEGER* pcbValue)
|
||||
{
|
||||
if (isString(rgbValue, cbValueMax))
|
||||
{
|
||||
Buffer<SQLWCHAR> buffer(stringLength(rgbValue, cbValueMax));
|
||||
|
||||
SQLRETURN rc = SQLGetDescFieldW(hdesc,
|
||||
iRecord,
|
||||
iField,
|
||||
buffer.begin(),
|
||||
(SQLINTEGER) buffer.sizeBytes(),
|
||||
pcbValue);
|
||||
|
||||
makeUTF8(buffer, *pcbValue, rgbValue, cbValueMax);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
return SQLGetDescFieldW(hdesc,
|
||||
iRecord,
|
||||
iField,
|
||||
rgbValue,
|
||||
cbValueMax,
|
||||
pcbValue);
|
||||
}
|
||||
|
||||
|
||||
SQLRETURN SQLGetDescRec(SQLHDESC hdesc,
|
||||
SQLSMALLINT iRecord,
|
||||
SQLCHAR* szName,
|
||||
SQLSMALLINT cbNameMax,
|
||||
SQLSMALLINT* pcbName,
|
||||
SQLSMALLINT* pfType,
|
||||
SQLSMALLINT* pfSubType,
|
||||
SQLLEN* pLength,
|
||||
SQLSMALLINT* pPrecision,
|
||||
SQLSMALLINT* pScale,
|
||||
SQLSMALLINT* pNullable)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
SQLRETURN SQLGetDiagField(SQLSMALLINT fHandleType,
|
||||
SQLHANDLE handle,
|
||||
SQLSMALLINT iRecord,
|
||||
SQLSMALLINT fDiagField,
|
||||
SQLPOINTER rgbDiagInfo,
|
||||
SQLSMALLINT cbDiagInfoMax,
|
||||
SQLSMALLINT* pcbDiagInfo)
|
||||
{
|
||||
if (isString(rgbDiagInfo, cbDiagInfoMax))
|
||||
{
|
||||
Buffer<SQLWCHAR> buffer(stringLength(rgbDiagInfo, cbDiagInfoMax));
|
||||
|
||||
SQLRETURN rc = SQLGetDiagFieldW(fHandleType,
|
||||
handle,
|
||||
iRecord,
|
||||
fDiagField,
|
||||
buffer.begin(),
|
||||
(SQLSMALLINT) buffer.sizeBytes(),
|
||||
pcbDiagInfo);
|
||||
|
||||
makeUTF8(buffer, *pcbDiagInfo, rgbDiagInfo, cbDiagInfoMax);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
return SQLGetDiagFieldW(fHandleType,
|
||||
handle,
|
||||
iRecord,
|
||||
fDiagField,
|
||||
rgbDiagInfo,
|
||||
cbDiagInfoMax,
|
||||
pcbDiagInfo);
|
||||
}
|
||||
|
||||
|
||||
SQLRETURN SQLGetDiagRec(SQLSMALLINT fHandleType,
|
||||
SQLHANDLE handle,
|
||||
SQLSMALLINT iRecord,
|
||||
SQLCHAR* szSqlState,
|
||||
SQLINTEGER* pfNativeError,
|
||||
SQLCHAR* szErrorMsg,
|
||||
SQLSMALLINT cbErrorMsgMax,
|
||||
SQLSMALLINT* pcbErrorMsg)
|
||||
{
|
||||
const SQLINTEGER stateLen = SQL_SQLSTATE_SIZE + 1;
|
||||
Buffer<SQLWCHAR> bufState(stateLen);
|
||||
Buffer<SQLWCHAR> bufErr(cbErrorMsgMax);
|
||||
|
||||
SQLRETURN rc = SQLGetDiagRecW(fHandleType,
|
||||
handle,
|
||||
iRecord,
|
||||
bufState.begin(),
|
||||
pfNativeError,
|
||||
bufErr.begin(),
|
||||
(SQLSMALLINT) bufErr.size(),
|
||||
pcbErrorMsg);
|
||||
|
||||
makeUTF8(bufState, stateLen * sizeof(SQLWCHAR), szSqlState, stateLen);
|
||||
makeUTF8(bufErr, *pcbErrorMsg * sizeof(SQLWCHAR), szErrorMsg, cbErrorMsgMax);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
SQLRETURN SQLPrepare(SQLHSTMT hstmt,
|
||||
SQLCHAR* szSqlStr,
|
||||
SQLINTEGER cbSqlStr)
|
||||
{
|
||||
std::string sqlStr;
|
||||
makeUTF16(szSqlStr, cbSqlStr, sqlStr);
|
||||
|
||||
return SQLPrepareW(hstmt, (SQLWCHAR*) sqlStr.c_str(), (SQLINTEGER) sqlStr.size());
|
||||
}
|
||||
|
||||
|
||||
SQLRETURN SQLSetConnectAttr(SQLHDBC hdbc,
|
||||
SQLINTEGER fAttribute,
|
||||
SQLPOINTER rgbValue,
|
||||
SQLINTEGER cbValue)
|
||||
{
|
||||
if (isString(rgbValue, cbValue))
|
||||
{
|
||||
std::string str;
|
||||
makeUTF16((SQLCHAR*) rgbValue, cbValue, str);
|
||||
|
||||
return SQLSetConnectAttrW(hdbc,
|
||||
fAttribute,
|
||||
(SQLWCHAR*) str.c_str(),
|
||||
(SQLINTEGER) str.size() * sizeof(SQLWCHAR));
|
||||
}
|
||||
|
||||
return SQLSetConnectAttrW(hdbc, fAttribute, rgbValue, cbValue);
|
||||
}
|
||||
|
||||
|
||||
SQLRETURN SQLSetCursorName(SQLHSTMT hstmt,
|
||||
SQLCHAR* szCursor,
|
||||
SQLSMALLINT cbCursor)
|
||||
{
|
||||
throw NotImplementedException("Not implemented");
|
||||
}
|
||||
|
||||
|
||||
SQLRETURN SQLSetStmtAttr(SQLHSTMT hstmt,
|
||||
SQLINTEGER fAttribute,
|
||||
SQLPOINTER rgbValue,
|
||||
SQLINTEGER cbValueMax)
|
||||
{
|
||||
if (isString(rgbValue, cbValueMax))
|
||||
{
|
||||
std::string str;
|
||||
makeUTF16((SQLCHAR*) rgbValue, cbValueMax, str);
|
||||
|
||||
return SQLSetStmtAttrW(hstmt,
|
||||
fAttribute,
|
||||
(SQLWCHAR*) str.c_str(),
|
||||
(SQLINTEGER) str.size());
|
||||
}
|
||||
|
||||
return SQLSetStmtAttrW(hstmt, fAttribute, rgbValue, cbValueMax);
|
||||
}
|
||||
|
||||
|
||||
SQLRETURN SQLGetStmtAttr(SQLHSTMT hstmt,
|
||||
SQLINTEGER fAttribute,
|
||||
SQLPOINTER rgbValue,
|
||||
SQLINTEGER cbValueMax,
|
||||
SQLINTEGER* pcbValue)
|
||||
{
|
||||
if (isString(rgbValue, cbValueMax))
|
||||
{
|
||||
Buffer<SQLWCHAR> buffer(stringLength(rgbValue, cbValueMax));
|
||||
|
||||
return SQLGetStmtAttrW(hstmt,
|
||||
fAttribute,
|
||||
(SQLPOINTER) buffer.begin(),
|
||||
(SQLINTEGER) buffer.sizeBytes(),
|
||||
pcbValue);
|
||||
}
|
||||
|
||||
return SQLGetStmtAttrW(hstmt, fAttribute, rgbValue, cbValueMax, pcbValue);
|
||||
}
|
||||
|
||||
|
||||
SQLRETURN SQLColumns(SQLHSTMT hstmt,
|
||||
SQLCHAR* szCatalogName,
|
||||
SQLSMALLINT cbCatalogName,
|
||||
SQLCHAR* szSchemaName,
|
||||
SQLSMALLINT cbSchemaName,
|
||||
SQLCHAR* szTableName,
|
||||
SQLSMALLINT cbTableName,
|
||||
SQLCHAR* szColumnName,
|
||||
SQLSMALLINT cbColumnName)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
SQLRETURN SQLGetConnectOption(SQLHDBC hdbc,
|
||||
SQLUSMALLINT fOption,
|
||||
SQLPOINTER pvParam)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
SQLRETURN SQLGetInfo(SQLHDBC hdbc,
|
||||
SQLUSMALLINT fInfoType,
|
||||
SQLPOINTER rgbInfoValue,
|
||||
SQLSMALLINT cbInfoValueMax,
|
||||
SQLSMALLINT* pcbInfoValue)
|
||||
{
|
||||
if (cbInfoValueMax)
|
||||
{
|
||||
Buffer<SQLWCHAR> buffer(cbInfoValueMax);
|
||||
|
||||
SQLRETURN rc = SQLGetInfoW(hdbc,
|
||||
fInfoType,
|
||||
(SQLPOINTER) buffer.begin(),
|
||||
(SQLSMALLINT) buffer.sizeBytes(),
|
||||
pcbInfoValue);
|
||||
|
||||
makeUTF8(buffer, *pcbInfoValue, rgbInfoValue, cbInfoValueMax);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
return SQLGetInfoW(hdbc, fInfoType, rgbInfoValue, cbInfoValueMax, pcbInfoValue);
|
||||
}
|
||||
|
||||
|
||||
SQLRETURN SQLGetTypeInfo(SQLHSTMT StatementHandle, SQLSMALLINT DataType)
|
||||
{
|
||||
return SQLGetTypeInfoW(StatementHandle, DataType);
|
||||
}
|
||||
|
||||
|
||||
SQLRETURN SQLSetConnectOption(SQLHDBC hdbc,
|
||||
SQLUSMALLINT fOption,
|
||||
SQLULEN vParam)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
SQLRETURN SQLSpecialColumns(SQLHSTMT hstmt,
|
||||
SQLUSMALLINT fColType,
|
||||
SQLCHAR* szCatalogName,
|
||||
SQLSMALLINT cbCatalogName,
|
||||
SQLCHAR* szSchemaName,
|
||||
SQLSMALLINT cbSchemaName,
|
||||
SQLCHAR* szTableName,
|
||||
SQLSMALLINT cbTableName,
|
||||
SQLUSMALLINT fScope,
|
||||
SQLUSMALLINT fNullable)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
SQLRETURN SQLStatistics(SQLHSTMT hstmt,
|
||||
SQLCHAR* szCatalogName,
|
||||
SQLSMALLINT cbCatalogName,
|
||||
SQLCHAR* szSchemaName,
|
||||
SQLSMALLINT cbSchemaName,
|
||||
SQLCHAR* szTableName,
|
||||
SQLSMALLINT cbTableName,
|
||||
SQLUSMALLINT fUnique,
|
||||
SQLUSMALLINT fAccuracy)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
SQLRETURN SQLTables(SQLHSTMT hstmt,
|
||||
SQLCHAR* szCatalogName,
|
||||
SQLSMALLINT cbCatalogName,
|
||||
SQLCHAR* szSchemaName,
|
||||
SQLSMALLINT cbSchemaName,
|
||||
SQLCHAR* szTableName,
|
||||
SQLSMALLINT cbTableName,
|
||||
SQLCHAR* szTableType,
|
||||
SQLSMALLINT cbTableType)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
SQLRETURN SQLDataSources(SQLHENV henv,
|
||||
SQLUSMALLINT fDirection,
|
||||
SQLCHAR* szDSN,
|
||||
SQLSMALLINT cbDSNMax,
|
||||
SQLSMALLINT* pcbDSN,
|
||||
SQLCHAR* szDesc,
|
||||
SQLSMALLINT cbDescMax,
|
||||
SQLSMALLINT* pcbDesc)
|
||||
{
|
||||
Buffer<SQLWCHAR> bufDSN(cbDSNMax);
|
||||
Buffer<SQLWCHAR> bufDesc(cbDescMax);
|
||||
|
||||
SQLRETURN rc = SQLDataSourcesW(henv,
|
||||
fDirection,
|
||||
bufDSN.begin(),
|
||||
(SQLSMALLINT) bufDSN.size(),
|
||||
pcbDSN,
|
||||
bufDesc.begin(),
|
||||
(SQLSMALLINT) bufDesc.size(),
|
||||
pcbDesc);
|
||||
|
||||
makeUTF8(bufDSN, *pcbDSN * sizeof(SQLWCHAR), szDSN, cbDSNMax);
|
||||
makeUTF8(bufDesc, *pcbDesc * sizeof(SQLWCHAR), szDesc, cbDescMax);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
SQLRETURN SQLDriverConnect(SQLHDBC hdbc,
|
||||
SQLHWND hwnd,
|
||||
SQLCHAR* szConnStrIn,
|
||||
SQLSMALLINT cbConnStrIn,
|
||||
SQLCHAR* szConnStrOut,
|
||||
SQLSMALLINT cbConnStrOutMax,
|
||||
SQLSMALLINT* pcbConnStrOut,
|
||||
SQLUSMALLINT fDriverCompletion)
|
||||
{
|
||||
SQLSMALLINT len = cbConnStrIn;
|
||||
if (SQL_NTS == len)
|
||||
len = (SQLSMALLINT) std::strlen((const char*) szConnStrIn) + 1;
|
||||
|
||||
std::string connStrIn;
|
||||
makeUTF16(szConnStrIn, len, connStrIn);
|
||||
|
||||
Buffer<SQLWCHAR> out(cbConnStrOutMax);
|
||||
SQLRETURN rc = SQLDriverConnectW(hdbc,
|
||||
hwnd,
|
||||
(SQLWCHAR*) connStrIn.c_str(),
|
||||
(SQLSMALLINT) connStrIn.size(),
|
||||
out.begin(),
|
||||
cbConnStrOutMax,
|
||||
pcbConnStrOut,
|
||||
fDriverCompletion);
|
||||
|
||||
makeUTF8(out, *pcbConnStrOut * sizeof(SQLWCHAR), pcbConnStrOut, cbConnStrOutMax);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
SQLRETURN SQLBrowseConnect(SQLHDBC hdbc,
|
||||
SQLCHAR* szConnStrIn,
|
||||
SQLSMALLINT cbConnStrIn,
|
||||
SQLCHAR* szConnStrOut,
|
||||
SQLSMALLINT cbConnStrOutMax,
|
||||
SQLSMALLINT* pcbConnStrOut)
|
||||
{
|
||||
std::string str;
|
||||
makeUTF16(szConnStrIn, cbConnStrIn, str);
|
||||
|
||||
Buffer<SQLWCHAR> bufConnStrOut(cbConnStrOutMax);
|
||||
|
||||
SQLRETURN rc = SQLBrowseConnectW(hdbc,
|
||||
(SQLWCHAR*) str.c_str(),
|
||||
(SQLSMALLINT) str.size(),
|
||||
bufConnStrOut.begin(),
|
||||
(SQLSMALLINT) bufConnStrOut.size(),
|
||||
pcbConnStrOut);
|
||||
|
||||
makeUTF8(bufConnStrOut, *pcbConnStrOut * sizeof(SQLWCHAR), szConnStrOut, cbConnStrOutMax);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
SQLRETURN SQLColumnPrivileges(SQLHSTMT hstmt,
|
||||
SQLCHAR* szCatalogName,
|
||||
SQLSMALLINT cbCatalogName,
|
||||
SQLCHAR* szSchemaName,
|
||||
SQLSMALLINT cbSchemaName,
|
||||
SQLCHAR* szTableName,
|
||||
SQLSMALLINT cbTableName,
|
||||
SQLCHAR* szColumnName,
|
||||
SQLSMALLINT cbColumnName)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
SQLRETURN SQLForeignKeys(SQLHSTMT hstmt,
|
||||
SQLCHAR* szPkCatalogName,
|
||||
SQLSMALLINT cbPkCatalogName,
|
||||
SQLCHAR* szPkSchemaName,
|
||||
SQLSMALLINT cbPkSchemaName,
|
||||
SQLCHAR* szPkTableName,
|
||||
SQLSMALLINT cbPkTableName,
|
||||
SQLCHAR* szFkCatalogName,
|
||||
SQLSMALLINT cbFkCatalogName,
|
||||
SQLCHAR* szFkSchemaName,
|
||||
SQLSMALLINT cbFkSchemaName,
|
||||
SQLCHAR* szFkTableName,
|
||||
SQLSMALLINT cbFkTableName)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
SQLRETURN SQLNativeSql(SQLHDBC hdbc,
|
||||
SQLCHAR* szSqlStrIn,
|
||||
SQLINTEGER cbSqlStrIn,
|
||||
SQLCHAR* szSqlStr,
|
||||
SQLINTEGER cbSqlStrMax,
|
||||
SQLINTEGER* pcbSqlStr)
|
||||
{
|
||||
std::string str;
|
||||
makeUTF16(szSqlStrIn, cbSqlStrIn, str);
|
||||
|
||||
Buffer<SQLWCHAR> bufSQLOut(cbSqlStrMax);
|
||||
|
||||
SQLRETURN rc = SQLNativeSqlW(hdbc,
|
||||
(SQLWCHAR*) str.c_str(),
|
||||
(SQLINTEGER) str.size(),
|
||||
bufSQLOut.begin(),
|
||||
(SQLINTEGER) bufSQLOut.size(),
|
||||
pcbSqlStr);
|
||||
|
||||
makeUTF8(bufSQLOut, *pcbSqlStr * sizeof(SQLWCHAR), szSqlStr, cbSqlStrMax);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
SQLRETURN SQLPrimaryKeys(SQLHSTMT hstmt,
|
||||
SQLCHAR* szCatalogName,
|
||||
SQLSMALLINT cbCatalogName,
|
||||
SQLCHAR* szSchemaName,
|
||||
SQLSMALLINT cbSchemaName,
|
||||
SQLCHAR* szTableName,
|
||||
SQLSMALLINT cbTableName)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
SQLRETURN SQLProcedureColumns(SQLHSTMT hstmt,
|
||||
SQLCHAR* szCatalogName,
|
||||
SQLSMALLINT cbCatalogName,
|
||||
SQLCHAR* szSchemaName,
|
||||
SQLSMALLINT cbSchemaName,
|
||||
SQLCHAR* szProcName,
|
||||
SQLSMALLINT cbProcName,
|
||||
SQLCHAR* szColumnName,
|
||||
SQLSMALLINT cbColumnName)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
SQLRETURN SQLProcedures(SQLHSTMT hstmt,
|
||||
SQLCHAR* szCatalogName,
|
||||
SQLSMALLINT cbCatalogName,
|
||||
SQLCHAR* szSchemaName,
|
||||
SQLSMALLINT cbSchemaName,
|
||||
SQLCHAR* szProcName,
|
||||
SQLSMALLINT cbProcName)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
SQLRETURN SQLTablePrivileges(SQLHSTMT hstmt,
|
||||
SQLCHAR* szCatalogName,
|
||||
SQLSMALLINT cbCatalogName,
|
||||
SQLCHAR* szSchemaName,
|
||||
SQLSMALLINT cbSchemaName,
|
||||
SQLCHAR* szTableName,
|
||||
SQLSMALLINT cbTableName)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
SQLRETURN SQLDrivers(SQLHENV henv,
|
||||
SQLUSMALLINT fDirection,
|
||||
SQLCHAR* szDriverDesc,
|
||||
SQLSMALLINT cbDriverDescMax,
|
||||
SQLSMALLINT* pcbDriverDesc,
|
||||
SQLCHAR* szDriverAttributes,
|
||||
SQLSMALLINT cbDrvrAttrMax,
|
||||
SQLSMALLINT* pcbDrvrAttr)
|
||||
{
|
||||
Buffer<SQLWCHAR> bufDriverDesc(cbDriverDescMax);
|
||||
Buffer<SQLWCHAR> bufDriverAttr(cbDrvrAttrMax);
|
||||
|
||||
SQLRETURN rc = SQLDriversW(henv,
|
||||
fDirection,
|
||||
bufDriverDesc.begin(),
|
||||
(SQLSMALLINT) bufDriverDesc.size(),
|
||||
pcbDriverDesc,
|
||||
bufDriverAttr.begin(),
|
||||
(SQLSMALLINT) bufDriverAttr.size(),
|
||||
pcbDrvrAttr);
|
||||
|
||||
makeUTF8(bufDriverDesc, *pcbDriverDesc * sizeof(SQLWCHAR), szDriverDesc, cbDriverDescMax);
|
||||
makeUTF8(bufDriverAttr, *pcbDrvrAttr * sizeof(SQLWCHAR), szDriverAttributes, cbDrvrAttrMax);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
} } } // namespace Poco::Data::ODBC
|
||||
+761
@@ -0,0 +1,761 @@
|
||||
//
|
||||
// Unicode.cpp
|
||||
//
|
||||
// Library: Data/ODBC
|
||||
// Package: ODBC
|
||||
// Module: Unicode
|
||||
//
|
||||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#include "Poco/Data/ODBC/ODBC.h"
|
||||
#include "Poco/Data/ODBC/Utility.h"
|
||||
#include "Poco/Data/ODBC/Unicode_WIN32.h"
|
||||
#include "Poco/Buffer.h"
|
||||
#include "Poco/Exception.h"
|
||||
|
||||
|
||||
using Poco::Buffer;
|
||||
using Poco::InvalidArgumentException;
|
||||
using Poco::NotImplementedException;
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Data {
|
||||
namespace ODBC {
|
||||
|
||||
|
||||
SQLRETURN SQLColAttribute(SQLHSTMT hstmt,
|
||||
SQLUSMALLINT iCol,
|
||||
SQLUSMALLINT iField,
|
||||
SQLPOINTER pCharAttr,
|
||||
SQLSMALLINT cbCharAttrMax,
|
||||
SQLSMALLINT* pcbCharAttr,
|
||||
NumAttrPtrType pNumAttr)
|
||||
{
|
||||
if (isString(pCharAttr, cbCharAttrMax))
|
||||
{
|
||||
Buffer<wchar_t> buffer(stringLength(pCharAttr, cbCharAttrMax));
|
||||
|
||||
SQLRETURN rc = SQLColAttributeW(hstmt,
|
||||
iCol,
|
||||
iField,
|
||||
buffer.begin(),
|
||||
(SQLSMALLINT) buffer.sizeBytes(),
|
||||
pcbCharAttr,
|
||||
pNumAttr);
|
||||
|
||||
makeUTF8(buffer, *pcbCharAttr, pCharAttr, cbCharAttrMax);
|
||||
return rc;
|
||||
}
|
||||
|
||||
return SQLColAttributeW(hstmt,
|
||||
iCol,
|
||||
iField,
|
||||
pCharAttr,
|
||||
cbCharAttrMax,
|
||||
pcbCharAttr,
|
||||
pNumAttr);
|
||||
}
|
||||
|
||||
|
||||
SQLRETURN SQLColAttributes(SQLHSTMT hstmt,
|
||||
SQLUSMALLINT icol,
|
||||
SQLUSMALLINT fDescType,
|
||||
SQLPOINTER rgbDesc,
|
||||
SQLSMALLINT cbDescMax,
|
||||
SQLSMALLINT* pcbDesc,
|
||||
SQLLEN* pfDesc)
|
||||
{
|
||||
return SQLColAttribute(hstmt,
|
||||
icol,
|
||||
fDescType,
|
||||
rgbDesc,
|
||||
cbDescMax,
|
||||
pcbDesc,
|
||||
pfDesc);
|
||||
}
|
||||
|
||||
|
||||
SQLRETURN SQLConnect(SQLHDBC hdbc,
|
||||
SQLCHAR* szDSN,
|
||||
SQLSMALLINT cbDSN,
|
||||
SQLCHAR* szUID,
|
||||
SQLSMALLINT cbUID,
|
||||
SQLCHAR* szAuthStr,
|
||||
SQLSMALLINT cbAuthStr)
|
||||
{
|
||||
std::wstring sqlDSN;
|
||||
makeUTF16(szDSN, cbDSN, sqlDSN);
|
||||
|
||||
std::wstring sqlUID;
|
||||
makeUTF16(szUID, cbUID, sqlUID);
|
||||
|
||||
std::wstring sqlPWD;
|
||||
makeUTF16(szAuthStr, cbAuthStr, sqlPWD);
|
||||
|
||||
return SQLConnectW(hdbc,
|
||||
(SQLWCHAR*) sqlDSN.c_str(),
|
||||
(SQLSMALLINT) sqlDSN.size(),
|
||||
(SQLWCHAR*) sqlUID.c_str(),
|
||||
(SQLSMALLINT) sqlUID.size(),
|
||||
(SQLWCHAR*) sqlPWD.c_str(),
|
||||
(SQLSMALLINT) sqlPWD.size());
|
||||
}
|
||||
|
||||
|
||||
SQLRETURN SQLDescribeCol(SQLHSTMT hstmt,
|
||||
SQLUSMALLINT icol,
|
||||
SQLCHAR* szColName,
|
||||
SQLSMALLINT cbColNameMax,
|
||||
SQLSMALLINT* pcbColName,
|
||||
SQLSMALLINT* pfSqlType,
|
||||
SQLULEN* pcbColDef,
|
||||
SQLSMALLINT* pibScale,
|
||||
SQLSMALLINT* pfNullable)
|
||||
{
|
||||
Buffer<wchar_t> buffer(cbColNameMax);
|
||||
SQLRETURN rc = SQLDescribeColW(hstmt,
|
||||
icol,
|
||||
(SQLWCHAR*) buffer.begin(),
|
||||
(SQLSMALLINT) buffer.size(),
|
||||
pcbColName,
|
||||
pfSqlType,
|
||||
pcbColDef,
|
||||
pibScale,
|
||||
pfNullable);
|
||||
|
||||
makeUTF8(buffer, *pcbColName * sizeof(wchar_t), szColName, cbColNameMax);
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
SQLRETURN SQLError(SQLHENV henv,
|
||||
SQLHDBC hdbc,
|
||||
SQLHSTMT hstmt,
|
||||
SQLCHAR* szSqlState,
|
||||
SQLINTEGER* pfNativeError,
|
||||
SQLCHAR* szErrorMsg,
|
||||
SQLSMALLINT cbErrorMsgMax,
|
||||
SQLSMALLINT* pcbErrorMsg)
|
||||
{
|
||||
throw NotImplementedException("SQLError is obsolete. "
|
||||
"Use SQLGetDiagRec instead.");
|
||||
}
|
||||
|
||||
|
||||
SQLRETURN SQLExecDirect(SQLHSTMT hstmt,
|
||||
SQLCHAR* szSqlStr,
|
||||
SQLINTEGER cbSqlStr)
|
||||
{
|
||||
std::wstring sqlStr;
|
||||
makeUTF16(szSqlStr, cbSqlStr, sqlStr);
|
||||
|
||||
return SQLExecDirectW(hstmt,
|
||||
(SQLWCHAR*) sqlStr.c_str(),
|
||||
(SQLINTEGER) sqlStr.size());
|
||||
}
|
||||
|
||||
|
||||
SQLRETURN SQLGetConnectAttr(SQLHDBC hdbc,
|
||||
SQLINTEGER fAttribute,
|
||||
SQLPOINTER rgbValue,
|
||||
SQLINTEGER cbValueMax,
|
||||
SQLINTEGER* pcbValue)
|
||||
{
|
||||
if (isString(rgbValue, cbValueMax))
|
||||
{
|
||||
Buffer<wchar_t> buffer(stringLength(rgbValue, cbValueMax));
|
||||
|
||||
SQLRETURN rc = SQLGetConnectAttrW(hdbc,
|
||||
fAttribute,
|
||||
buffer.begin(),
|
||||
(SQLINTEGER) buffer.sizeBytes(),
|
||||
pcbValue);
|
||||
|
||||
makeUTF8(buffer, *pcbValue, rgbValue, cbValueMax);
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
return SQLGetConnectAttrW(hdbc,
|
||||
fAttribute,
|
||||
rgbValue,
|
||||
cbValueMax,
|
||||
pcbValue);
|
||||
}
|
||||
|
||||
|
||||
SQLRETURN SQLGetCursorName(SQLHSTMT hstmt,
|
||||
SQLCHAR* szCursor,
|
||||
SQLSMALLINT cbCursorMax,
|
||||
SQLSMALLINT* pcbCursor)
|
||||
{
|
||||
throw NotImplementedException("Not implemented");
|
||||
}
|
||||
|
||||
|
||||
SQLRETURN SQLSetDescField(SQLHDESC hdesc,
|
||||
SQLSMALLINT iRecord,
|
||||
SQLSMALLINT iField,
|
||||
SQLPOINTER rgbValue,
|
||||
SQLINTEGER cbValueMax)
|
||||
{
|
||||
if (isString(rgbValue, cbValueMax))
|
||||
{
|
||||
std::wstring str;
|
||||
makeUTF16((SQLCHAR*) rgbValue, cbValueMax, str);
|
||||
|
||||
SQLRETURN rc = SQLSetDescFieldW(hdesc,
|
||||
iRecord,
|
||||
iField,
|
||||
(SQLPOINTER) str.c_str(),
|
||||
(SQLINTEGER) str.size() * sizeof(std::wstring::value_type));
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
return SQLSetDescFieldW(hdesc,
|
||||
iRecord,
|
||||
iField,
|
||||
rgbValue,
|
||||
cbValueMax);
|
||||
}
|
||||
|
||||
|
||||
SQLRETURN SQLGetDescField(SQLHDESC hdesc,
|
||||
SQLSMALLINT iRecord,
|
||||
SQLSMALLINT iField,
|
||||
SQLPOINTER rgbValue,
|
||||
SQLINTEGER cbValueMax,
|
||||
SQLINTEGER* pcbValue)
|
||||
{
|
||||
if (isString(rgbValue, cbValueMax))
|
||||
{
|
||||
Buffer<wchar_t> buffer(stringLength(rgbValue, cbValueMax));
|
||||
|
||||
SQLRETURN rc = SQLGetDescFieldW(hdesc,
|
||||
iRecord,
|
||||
iField,
|
||||
buffer.begin(),
|
||||
(SQLINTEGER) buffer.sizeBytes(),
|
||||
pcbValue);
|
||||
|
||||
makeUTF8(buffer, *pcbValue, rgbValue, cbValueMax);
|
||||
return rc;
|
||||
}
|
||||
|
||||
return SQLGetDescFieldW(hdesc,
|
||||
iRecord,
|
||||
iField,
|
||||
rgbValue,
|
||||
cbValueMax,
|
||||
pcbValue);
|
||||
}
|
||||
|
||||
|
||||
SQLRETURN SQLGetDescRec(SQLHDESC hdesc,
|
||||
SQLSMALLINT iRecord,
|
||||
SQLCHAR* szName,
|
||||
SQLSMALLINT cbNameMax,
|
||||
SQLSMALLINT* pcbName,
|
||||
SQLSMALLINT* pfType,
|
||||
SQLSMALLINT* pfSubType,
|
||||
SQLLEN* pLength,
|
||||
SQLSMALLINT* pPrecision,
|
||||
SQLSMALLINT* pScale,
|
||||
SQLSMALLINT* pNullable)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
SQLRETURN SQLGetDiagField(SQLSMALLINT fHandleType,
|
||||
SQLHANDLE handle,
|
||||
SQLSMALLINT iRecord,
|
||||
SQLSMALLINT fDiagField,
|
||||
SQLPOINTER rgbDiagInfo,
|
||||
SQLSMALLINT cbDiagInfoMax,
|
||||
SQLSMALLINT* pcbDiagInfo)
|
||||
{
|
||||
if (isString(rgbDiagInfo, cbDiagInfoMax))
|
||||
{
|
||||
Buffer<wchar_t> buffer(stringLength(rgbDiagInfo, cbDiagInfoMax));
|
||||
|
||||
SQLRETURN rc = SQLGetDiagFieldW(fHandleType,
|
||||
handle,
|
||||
iRecord,
|
||||
fDiagField,
|
||||
buffer.begin(),
|
||||
(SQLSMALLINT) buffer.sizeBytes(),
|
||||
pcbDiagInfo);
|
||||
|
||||
makeUTF8(buffer, *pcbDiagInfo, rgbDiagInfo, cbDiagInfoMax);
|
||||
return rc;
|
||||
}
|
||||
|
||||
return SQLGetDiagFieldW(fHandleType,
|
||||
handle,
|
||||
iRecord,
|
||||
fDiagField,
|
||||
rgbDiagInfo,
|
||||
cbDiagInfoMax,
|
||||
pcbDiagInfo);
|
||||
}
|
||||
|
||||
|
||||
SQLRETURN SQLGetDiagRec(SQLSMALLINT fHandleType,
|
||||
SQLHANDLE handle,
|
||||
SQLSMALLINT iRecord,
|
||||
SQLCHAR* szSqlState,
|
||||
SQLINTEGER* pfNativeError,
|
||||
SQLCHAR* szErrorMsg,
|
||||
SQLSMALLINT cbErrorMsgMax,
|
||||
SQLSMALLINT* pcbErrorMsg)
|
||||
{
|
||||
const SQLINTEGER stateLen = SQL_SQLSTATE_SIZE + 1;
|
||||
Buffer<wchar_t> bufState(stateLen);
|
||||
Buffer<wchar_t> bufErr(cbErrorMsgMax);
|
||||
|
||||
SQLRETURN rc = SQLGetDiagRecW(fHandleType,
|
||||
handle,
|
||||
iRecord,
|
||||
bufState.begin(),
|
||||
pfNativeError,
|
||||
bufErr.begin(),
|
||||
(SQLSMALLINT) bufErr.size(),
|
||||
pcbErrorMsg);
|
||||
|
||||
makeUTF8(bufState, stateLen * sizeof(wchar_t), szSqlState, stateLen);
|
||||
makeUTF8(bufErr, *pcbErrorMsg * sizeof(wchar_t), szErrorMsg, cbErrorMsgMax);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
SQLRETURN SQLPrepare(SQLHSTMT hstmt,
|
||||
SQLCHAR* szSqlStr,
|
||||
SQLINTEGER cbSqlStr)
|
||||
{
|
||||
std::wstring sqlStr;
|
||||
makeUTF16(szSqlStr, cbSqlStr, sqlStr);
|
||||
|
||||
return SQLPrepareW(hstmt,
|
||||
(SQLWCHAR*) sqlStr.c_str(),
|
||||
(SQLINTEGER) sqlStr.size());
|
||||
}
|
||||
|
||||
|
||||
SQLRETURN SQLSetConnectAttr(SQLHDBC hdbc,
|
||||
SQLINTEGER fAttribute,
|
||||
SQLPOINTER rgbValue,
|
||||
SQLINTEGER cbValue)
|
||||
{
|
||||
if (isString(rgbValue, cbValue))
|
||||
{
|
||||
std::wstring str;
|
||||
makeUTF16((SQLCHAR*) rgbValue, cbValue, str);
|
||||
|
||||
return SQLSetConnectAttrW(hdbc,
|
||||
fAttribute,
|
||||
(SQLWCHAR*) str.c_str(),
|
||||
(SQLINTEGER) str.size() * sizeof(std::wstring::value_type));
|
||||
}
|
||||
|
||||
return SQLSetConnectAttrW(hdbc,
|
||||
fAttribute,
|
||||
rgbValue,
|
||||
cbValue);
|
||||
}
|
||||
|
||||
|
||||
SQLRETURN SQLSetCursorName(SQLHSTMT hstmt,
|
||||
SQLCHAR* szCursor,
|
||||
SQLSMALLINT cbCursor)
|
||||
{
|
||||
throw NotImplementedException("Not implemented");
|
||||
}
|
||||
|
||||
|
||||
SQLRETURN SQLSetStmtAttr(SQLHSTMT hstmt,
|
||||
SQLINTEGER fAttribute,
|
||||
SQLPOINTER rgbValue,
|
||||
SQLINTEGER cbValueMax)
|
||||
{
|
||||
if (isString(rgbValue, cbValueMax))
|
||||
{
|
||||
std::wstring str;
|
||||
makeUTF16((SQLCHAR*) rgbValue, cbValueMax, str);
|
||||
|
||||
return SQLSetStmtAttrW(hstmt,
|
||||
fAttribute,
|
||||
(SQLPOINTER) str.c_str(),
|
||||
(SQLINTEGER) str.size());
|
||||
}
|
||||
|
||||
return SQLSetStmtAttrW(hstmt,
|
||||
fAttribute,
|
||||
rgbValue,
|
||||
cbValueMax);
|
||||
}
|
||||
|
||||
|
||||
SQLRETURN SQLGetStmtAttr(SQLHSTMT hstmt,
|
||||
SQLINTEGER fAttribute,
|
||||
SQLPOINTER rgbValue,
|
||||
SQLINTEGER cbValueMax,
|
||||
SQLINTEGER* pcbValue)
|
||||
{
|
||||
if (isString(rgbValue, cbValueMax))
|
||||
{
|
||||
Buffer<wchar_t> buffer(stringLength(rgbValue, cbValueMax));
|
||||
|
||||
return SQLGetStmtAttrW(hstmt,
|
||||
fAttribute,
|
||||
(SQLPOINTER) buffer.begin(),
|
||||
(SQLINTEGER) buffer.sizeBytes(),
|
||||
pcbValue);
|
||||
}
|
||||
|
||||
return SQLGetStmtAttrW(hstmt,
|
||||
fAttribute,
|
||||
rgbValue,
|
||||
cbValueMax,
|
||||
pcbValue);
|
||||
}
|
||||
|
||||
|
||||
SQLRETURN SQLColumns(SQLHSTMT hstmt,
|
||||
SQLCHAR* szCatalogName,
|
||||
SQLSMALLINT cbCatalogName,
|
||||
SQLCHAR* szSchemaName,
|
||||
SQLSMALLINT cbSchemaName,
|
||||
SQLCHAR* szTableName,
|
||||
SQLSMALLINT cbTableName,
|
||||
SQLCHAR* szColumnName,
|
||||
SQLSMALLINT cbColumnName)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
SQLRETURN SQLGetConnectOption(SQLHDBC hdbc,
|
||||
SQLUSMALLINT fOption,
|
||||
SQLPOINTER pvParam)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
SQLRETURN SQLGetInfo(SQLHDBC hdbc,
|
||||
SQLUSMALLINT fInfoType,
|
||||
SQLPOINTER rgbInfoValue,
|
||||
SQLSMALLINT cbInfoValueMax,
|
||||
SQLSMALLINT* pcbInfoValue)
|
||||
{
|
||||
if (cbInfoValueMax)
|
||||
{
|
||||
Buffer<wchar_t> buffer(cbInfoValueMax);
|
||||
|
||||
SQLRETURN rc = SQLGetInfoW(hdbc,
|
||||
fInfoType,
|
||||
(SQLPOINTER) buffer.begin(),
|
||||
(SQLSMALLINT) buffer.sizeBytes(),
|
||||
pcbInfoValue);
|
||||
|
||||
makeUTF8(buffer, *pcbInfoValue, rgbInfoValue, cbInfoValueMax);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
return SQLGetInfoW(hdbc,
|
||||
fInfoType,
|
||||
rgbInfoValue,
|
||||
cbInfoValueMax,
|
||||
pcbInfoValue);
|
||||
}
|
||||
|
||||
|
||||
SQLRETURN SQLGetTypeInfo(SQLHSTMT StatementHandle, SQLSMALLINT DataType)
|
||||
{
|
||||
return SQLGetTypeInfoW(StatementHandle, DataType);
|
||||
}
|
||||
|
||||
|
||||
SQLRETURN SQLSetConnectOption(SQLHDBC hdbc,
|
||||
SQLUSMALLINT fOption,
|
||||
SQLULEN vParam)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
SQLRETURN SQLSpecialColumns(SQLHSTMT hstmt,
|
||||
SQLUSMALLINT fColType,
|
||||
SQLCHAR* szCatalogName,
|
||||
SQLSMALLINT cbCatalogName,
|
||||
SQLCHAR* szSchemaName,
|
||||
SQLSMALLINT cbSchemaName,
|
||||
SQLCHAR* szTableName,
|
||||
SQLSMALLINT cbTableName,
|
||||
SQLUSMALLINT fScope,
|
||||
SQLUSMALLINT fNullable)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
SQLRETURN SQLStatistics(SQLHSTMT hstmt,
|
||||
SQLCHAR* szCatalogName,
|
||||
SQLSMALLINT cbCatalogName,
|
||||
SQLCHAR* szSchemaName,
|
||||
SQLSMALLINT cbSchemaName,
|
||||
SQLCHAR* szTableName,
|
||||
SQLSMALLINT cbTableName,
|
||||
SQLUSMALLINT fUnique,
|
||||
SQLUSMALLINT fAccuracy)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
SQLRETURN SQLTables(SQLHSTMT hstmt,
|
||||
SQLCHAR* szCatalogName,
|
||||
SQLSMALLINT cbCatalogName,
|
||||
SQLCHAR* szSchemaName,
|
||||
SQLSMALLINT cbSchemaName,
|
||||
SQLCHAR* szTableName,
|
||||
SQLSMALLINT cbTableName,
|
||||
SQLCHAR* szTableType,
|
||||
SQLSMALLINT cbTableType)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
SQLRETURN SQLDataSources(SQLHENV henv,
|
||||
SQLUSMALLINT fDirection,
|
||||
SQLCHAR* szDSN,
|
||||
SQLSMALLINT cbDSNMax,
|
||||
SQLSMALLINT* pcbDSN,
|
||||
SQLCHAR* szDesc,
|
||||
SQLSMALLINT cbDescMax,
|
||||
SQLSMALLINT* pcbDesc)
|
||||
{
|
||||
Buffer<wchar_t> bufDSN(cbDSNMax);
|
||||
Buffer<wchar_t> bufDesc(cbDescMax);
|
||||
|
||||
SQLRETURN rc = SQLDataSourcesW(henv,
|
||||
fDirection,
|
||||
bufDSN.begin(),
|
||||
(SQLSMALLINT) bufDSN.size(),
|
||||
pcbDSN,
|
||||
bufDesc.begin(),
|
||||
(SQLSMALLINT) bufDesc.size(),
|
||||
pcbDesc);
|
||||
|
||||
makeUTF8(bufDSN, *pcbDSN * sizeof(wchar_t), szDSN, cbDSNMax);
|
||||
makeUTF8(bufDesc, *pcbDesc * sizeof(wchar_t), szDesc, cbDescMax);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
SQLRETURN SQLDriverConnect(SQLHDBC hdbc,
|
||||
SQLHWND hwnd,
|
||||
SQLCHAR* szConnStrIn,
|
||||
SQLSMALLINT cbConnStrIn,
|
||||
SQLCHAR* szConnStrOut,
|
||||
SQLSMALLINT cbConnStrOutMax,
|
||||
SQLSMALLINT* pcbConnStrOut,
|
||||
SQLUSMALLINT fDriverCompletion)
|
||||
{
|
||||
std::wstring connStrIn;
|
||||
int len = cbConnStrIn;
|
||||
if (SQL_NTS == len)
|
||||
len = (int) std::strlen((const char*) szConnStrIn);
|
||||
|
||||
Poco::UnicodeConverter::toUTF16((const char *) szConnStrIn, len, connStrIn);
|
||||
|
||||
Buffer<wchar_t> bufOut(cbConnStrOutMax);
|
||||
SQLRETURN rc = SQLDriverConnectW(hdbc,
|
||||
hwnd,
|
||||
(SQLWCHAR*) connStrIn.c_str(),
|
||||
(SQLSMALLINT) connStrIn.size(),
|
||||
bufOut.begin(),
|
||||
(SQLSMALLINT) bufOut.size(),
|
||||
pcbConnStrOut,
|
||||
fDriverCompletion);
|
||||
|
||||
if (!Utility::isError(rc))
|
||||
makeUTF8(bufOut, *pcbConnStrOut * sizeof(wchar_t), szConnStrOut, cbConnStrOutMax);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
SQLRETURN SQLBrowseConnect(SQLHDBC hdbc,
|
||||
SQLCHAR* szConnStrIn,
|
||||
SQLSMALLINT cbConnStrIn,
|
||||
SQLCHAR* szConnStrOut,
|
||||
SQLSMALLINT cbConnStrOutMax,
|
||||
SQLSMALLINT* pcbConnStrOut)
|
||||
{
|
||||
std::wstring str;
|
||||
makeUTF16(szConnStrIn, cbConnStrIn, str);
|
||||
|
||||
Buffer<wchar_t> bufConnStrOut(cbConnStrOutMax);
|
||||
|
||||
SQLRETURN rc = SQLBrowseConnectW(hdbc,
|
||||
(SQLWCHAR*) str.c_str(),
|
||||
(SQLSMALLINT) str.size(),
|
||||
bufConnStrOut.begin(),
|
||||
(SQLSMALLINT) bufConnStrOut.size(),
|
||||
pcbConnStrOut);
|
||||
|
||||
makeUTF8(bufConnStrOut, *pcbConnStrOut * sizeof(wchar_t), szConnStrOut, cbConnStrOutMax);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
SQLRETURN SQLColumnPrivileges(SQLHSTMT hstmt,
|
||||
SQLCHAR* szCatalogName,
|
||||
SQLSMALLINT cbCatalogName,
|
||||
SQLCHAR* szSchemaName,
|
||||
SQLSMALLINT cbSchemaName,
|
||||
SQLCHAR* szTableName,
|
||||
SQLSMALLINT cbTableName,
|
||||
SQLCHAR* szColumnName,
|
||||
SQLSMALLINT cbColumnName)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
SQLRETURN SQLForeignKeys(SQLHSTMT hstmt,
|
||||
SQLCHAR* szPkCatalogName,
|
||||
SQLSMALLINT cbPkCatalogName,
|
||||
SQLCHAR* szPkSchemaName,
|
||||
SQLSMALLINT cbPkSchemaName,
|
||||
SQLCHAR* szPkTableName,
|
||||
SQLSMALLINT cbPkTableName,
|
||||
SQLCHAR* szFkCatalogName,
|
||||
SQLSMALLINT cbFkCatalogName,
|
||||
SQLCHAR* szFkSchemaName,
|
||||
SQLSMALLINT cbFkSchemaName,
|
||||
SQLCHAR* szFkTableName,
|
||||
SQLSMALLINT cbFkTableName)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
SQLRETURN SQLNativeSql(SQLHDBC hdbc,
|
||||
SQLCHAR* szSqlStrIn,
|
||||
SQLINTEGER cbSqlStrIn,
|
||||
SQLCHAR* szSqlStr,
|
||||
SQLINTEGER cbSqlStrMax,
|
||||
SQLINTEGER* pcbSqlStr)
|
||||
{
|
||||
std::wstring str;
|
||||
makeUTF16(szSqlStrIn, cbSqlStrIn, str);
|
||||
|
||||
Buffer<wchar_t> bufSQLOut(cbSqlStrMax);
|
||||
|
||||
SQLRETURN rc = SQLNativeSqlW(hdbc,
|
||||
(SQLWCHAR*) str.c_str(),
|
||||
(SQLINTEGER) str.size(),
|
||||
bufSQLOut.begin(),
|
||||
(SQLINTEGER) bufSQLOut.size(),
|
||||
pcbSqlStr);
|
||||
|
||||
makeUTF8(bufSQLOut, *pcbSqlStr * sizeof(wchar_t), szSqlStr, cbSqlStrMax);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
SQLRETURN SQLPrimaryKeys(SQLHSTMT hstmt,
|
||||
SQLCHAR* szCatalogName,
|
||||
SQLSMALLINT cbCatalogName,
|
||||
SQLCHAR* szSchemaName,
|
||||
SQLSMALLINT cbSchemaName,
|
||||
SQLCHAR* szTableName,
|
||||
SQLSMALLINT cbTableName)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
SQLRETURN SQLProcedureColumns(SQLHSTMT hstmt,
|
||||
SQLCHAR* szCatalogName,
|
||||
SQLSMALLINT cbCatalogName,
|
||||
SQLCHAR* szSchemaName,
|
||||
SQLSMALLINT cbSchemaName,
|
||||
SQLCHAR* szProcName,
|
||||
SQLSMALLINT cbProcName,
|
||||
SQLCHAR* szColumnName,
|
||||
SQLSMALLINT cbColumnName)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
SQLRETURN SQLProcedures(SQLHSTMT hstmt,
|
||||
SQLCHAR* szCatalogName,
|
||||
SQLSMALLINT cbCatalogName,
|
||||
SQLCHAR* szSchemaName,
|
||||
SQLSMALLINT cbSchemaName,
|
||||
SQLCHAR* szProcName,
|
||||
SQLSMALLINT cbProcName)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
SQLRETURN SQLTablePrivileges(SQLHSTMT hstmt,
|
||||
SQLCHAR* szCatalogName,
|
||||
SQLSMALLINT cbCatalogName,
|
||||
SQLCHAR* szSchemaName,
|
||||
SQLSMALLINT cbSchemaName,
|
||||
SQLCHAR* szTableName,
|
||||
SQLSMALLINT cbTableName)
|
||||
{
|
||||
throw NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
SQLRETURN SQLDrivers(SQLHENV henv,
|
||||
SQLUSMALLINT fDirection,
|
||||
SQLCHAR* szDriverDesc,
|
||||
SQLSMALLINT cbDriverDescMax,
|
||||
SQLSMALLINT* pcbDriverDesc,
|
||||
SQLCHAR* szDriverAttributes,
|
||||
SQLSMALLINT cbDrvrAttrMax,
|
||||
SQLSMALLINT* pcbDrvrAttr)
|
||||
{
|
||||
Buffer<wchar_t> bufDriverDesc(cbDriverDescMax);
|
||||
Buffer<wchar_t> bufDriverAttr(cbDrvrAttrMax);
|
||||
|
||||
SQLRETURN rc = SQLDriversW(henv,
|
||||
fDirection,
|
||||
bufDriverDesc.begin(),
|
||||
(SQLSMALLINT) bufDriverDesc.size(),
|
||||
pcbDriverDesc,
|
||||
bufDriverAttr.begin(),
|
||||
(SQLSMALLINT) bufDriverAttr.size(),
|
||||
pcbDrvrAttr);
|
||||
|
||||
makeUTF8(bufDriverDesc, *pcbDriverDesc * sizeof(wchar_t), szDriverDesc, cbDriverDescMax);
|
||||
makeUTF8(bufDriverAttr, *pcbDrvrAttr * sizeof(wchar_t), szDriverAttributes, cbDrvrAttrMax);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
} } } // namespace Poco::Data::ODBC
|
||||
+159
@@ -0,0 +1,159 @@
|
||||
//
|
||||
// Utility.cpp
|
||||
//
|
||||
// Library: Data/ODBC
|
||||
// Package: ODBC
|
||||
// Module: Utility
|
||||
//
|
||||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#include "Poco/Data/ODBC/Utility.h"
|
||||
#include "Poco/Data/ODBC/Handle.h"
|
||||
#include "Poco/Data/ODBC/ODBCException.h"
|
||||
#include "Poco/NumberFormatter.h"
|
||||
#include "Poco/DateTime.h"
|
||||
#include <cmath>
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Data {
|
||||
namespace ODBC {
|
||||
|
||||
|
||||
const TypeInfo Utility::_dataTypes;
|
||||
|
||||
|
||||
Utility::DriverMap& Utility::drivers(Utility::DriverMap& driverMap)
|
||||
{
|
||||
static const EnvironmentHandle henv;
|
||||
const int length = sizeof(SQLCHAR) * 512;
|
||||
|
||||
SQLCHAR desc[length];
|
||||
std::memset(desc, 0, length);
|
||||
SQLSMALLINT len1 = length;
|
||||
SQLCHAR attr[length];
|
||||
std::memset(attr, 0, length);
|
||||
SQLSMALLINT len2 = length;
|
||||
RETCODE rc = 0;
|
||||
|
||||
if (!Utility::isError(rc = SQLDrivers(henv,
|
||||
SQL_FETCH_FIRST,
|
||||
desc,
|
||||
length,
|
||||
&len1,
|
||||
attr,
|
||||
len2,
|
||||
&len2)))
|
||||
{
|
||||
do
|
||||
{
|
||||
driverMap.insert(DSNMap::value_type(std::string((char *) desc),
|
||||
std::string((char *) attr)));
|
||||
std::memset(desc, 0, length);
|
||||
std::memset(attr, 0, length);
|
||||
len2 = length;
|
||||
}while (!Utility::isError(rc = SQLDrivers(henv,
|
||||
SQL_FETCH_NEXT,
|
||||
desc,
|
||||
length,
|
||||
&len1,
|
||||
attr,
|
||||
len2,
|
||||
&len2)));
|
||||
}
|
||||
|
||||
if (SQL_NO_DATA != rc)
|
||||
throw EnvironmentException(henv);
|
||||
|
||||
return driverMap;
|
||||
}
|
||||
|
||||
|
||||
Utility::DSNMap& Utility::dataSources(Utility::DSNMap& dsnMap)
|
||||
{
|
||||
static const EnvironmentHandle henv;
|
||||
const int length = sizeof(SQLCHAR) * 512;
|
||||
const int dsnLength = sizeof(SQLCHAR) * (SQL_MAX_DSN_LENGTH + 1);
|
||||
|
||||
SQLCHAR dsn[dsnLength];
|
||||
std::memset(dsn, 0, dsnLength);
|
||||
SQLSMALLINT len1 = sizeof(SQLCHAR) * SQL_MAX_DSN_LENGTH;
|
||||
SQLCHAR desc[length];
|
||||
std::memset(desc, 0, length);
|
||||
SQLSMALLINT len2 = length;
|
||||
RETCODE rc = 0;
|
||||
|
||||
while (!Utility::isError(rc = Poco::Data::ODBC::SQLDataSources(henv,
|
||||
SQL_FETCH_NEXT,
|
||||
dsn,
|
||||
SQL_MAX_DSN_LENGTH,
|
||||
&len1,
|
||||
desc,
|
||||
len2,
|
||||
&len2)))
|
||||
{
|
||||
dsnMap.insert(DSNMap::value_type(std::string((char *) dsn), std::string((char *) desc)));
|
||||
std::memset(dsn, 0, dsnLength);
|
||||
std::memset(desc, 0, length);
|
||||
len2 = length;
|
||||
}
|
||||
|
||||
if (SQL_NO_DATA != rc)
|
||||
throw EnvironmentException(henv);
|
||||
|
||||
return dsnMap;
|
||||
}
|
||||
|
||||
|
||||
void Utility::dateTimeSync(Poco::DateTime& dt, const SQL_TIMESTAMP_STRUCT& ts)
|
||||
{
|
||||
double msec = ts.fraction/1000000;
|
||||
double usec = 1000 * (msec - std::floor(msec));
|
||||
|
||||
dt.assign(ts.year,
|
||||
ts.month,
|
||||
ts.day,
|
||||
ts.hour,
|
||||
ts.minute,
|
||||
ts.second,
|
||||
(int) std::floor(msec),
|
||||
(int) std::floor(usec));
|
||||
}
|
||||
|
||||
|
||||
void Utility::dateSync(SQL_DATE_STRUCT& ds, const Date& d)
|
||||
{
|
||||
ds.year = d.year();
|
||||
ds.month = d.month();
|
||||
ds.day = d.day();
|
||||
}
|
||||
|
||||
|
||||
void Utility::timeSync(SQL_TIME_STRUCT& ts, const Time& t)
|
||||
{
|
||||
ts.hour = t.hour();
|
||||
ts.minute = t.minute();
|
||||
ts.second = t.second();
|
||||
}
|
||||
|
||||
|
||||
void Utility::dateTimeSync(SQL_TIMESTAMP_STRUCT& ts, const Poco::DateTime& dt)
|
||||
{
|
||||
ts.year = dt.year();
|
||||
ts.month = dt.month();
|
||||
ts.day = dt.day();
|
||||
ts.hour = dt.hour();
|
||||
ts.minute = dt.minute();
|
||||
ts.second = dt.second();
|
||||
// Fraction support is limited to milliseconds due to MS SQL Server limitation
|
||||
// see http://support.microsoft.com/kb/263872
|
||||
ts.fraction = (dt.millisecond() * 1000000);// + (dt.microsecond() * 1000);
|
||||
}
|
||||
|
||||
|
||||
} } } // namespace Poco::Data::ODBC
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
# Sources
|
||||
file(GLOB SRCS_G "src/*.cpp")
|
||||
POCO_SOURCES_AUTO(TEST_SRCS ${SRCS_G})
|
||||
|
||||
# Headers
|
||||
file(GLOB_RECURSE HDRS_G "src/*.h")
|
||||
POCO_HEADERS_AUTO(TEST_SRCS ${HDRS_G})
|
||||
|
||||
POCO_SOURCES_AUTO_PLAT(TEST_SRCS OFF
|
||||
src/WinDriver.cpp
|
||||
)
|
||||
|
||||
add_executable(DataODBC-testrunner ${TEST_SRCS})
|
||||
if(ANDROID)
|
||||
add_test(
|
||||
NAME DataODBC
|
||||
WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
||||
COMMAND ${CMAKE_COMMAND} -DANDROID_NDK=${ANDROID_NDK} -DLIBRARY_DIR=${CMAKE_BINARY_DIR}/lib -DUNITTEST=${CMAKE_BINARY_DIR}/bin/DataODBC-testrunner -DTEST_PARAMETER=-all -P ${CMAKE_SOURCE_DIR}/cmake/ExecuteOnAndroid.cmake
|
||||
)
|
||||
else()
|
||||
add_test(
|
||||
NAME DataODBC
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
COMMAND DataODBC-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all
|
||||
)
|
||||
set_tests_properties(DataODBC PROPERTIES ENVIRONMENT POCO_BASE=${CMAKE_SOURCE_DIR})
|
||||
endif()
|
||||
target_link_libraries(DataODBC-testrunner PUBLIC Poco::DataODBC CppUnit)
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
#
|
||||
# Makefile
|
||||
#
|
||||
# Makefile for Poco SQLite testsuite
|
||||
#
|
||||
# For Unicode support, add following to COMMONFLAGS:
|
||||
#
|
||||
# -DUNICODE
|
||||
#
|
||||
# Unicode is supported only for UnixODBC
|
||||
#
|
||||
|
||||
include $(POCO_BASE)/build/rules/global
|
||||
|
||||
include $(POCO_BASE)/Data/ODBC/ODBC.make
|
||||
|
||||
##################################################################################################
|
||||
# Note: #
|
||||
# Do not change linking order or move this line up, these libs have to be linked in this order. #
|
||||
##################################################################################################
|
||||
ifneq ($(OSNAME),Darwin)
|
||||
SYSLIBS += -lltdl
|
||||
endif
|
||||
ifneq ($(OSNAME),FreeBSD)
|
||||
SYSLIBS += -ldl
|
||||
endif
|
||||
|
||||
objects = ODBCTestSuite Driver \
|
||||
ODBCDB2Test ODBCMySQLTest ODBCOracleTest ODBCPostgreSQLTest \
|
||||
ODBCSQLiteTest ODBCSQLServerTest ODBCTest SQLExecutor
|
||||
|
||||
ifeq ($(POCO_CONFIG),MinGW)
|
||||
objects += ODBCAccessTest
|
||||
endif
|
||||
|
||||
target = testrunner
|
||||
target_version = 1
|
||||
target_libs = PocoDataODBC PocoData PocoFoundation CppUnit
|
||||
|
||||
include $(POCO_BASE)/build/rules/exec
|
||||
@@ -0,0 +1,10 @@
|
||||
vc.project.guid = 00627063-395B-4413-9099-23BDB56562FA
|
||||
vc.project.name = TestSuite
|
||||
vc.project.target = TestSuite
|
||||
vc.project.type = testsuite
|
||||
vc.project.pocobase = ..\\..\\..
|
||||
vc.project.platforms = Win32
|
||||
vc.project.configurations = debug_shared, release_shared, debug_static_mt, release_static_mt, debug_static_md, release_static_md
|
||||
vc.project.prototype = TestSuite_vs90.vcproj
|
||||
vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\Data\\include
|
||||
vc.project.linker.dependencies = odbc32.lib odbccp32.lib iphlpapi.lib
|
||||
@@ -0,0 +1,514 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
Name="TestSuite"
|
||||
Version="9.00"
|
||||
ProjectType="Visual C++"
|
||||
ProjectGUID="{00627063-395B-4413-9099-23BDB56562FA}"
|
||||
RootNamespace="TestSuite"
|
||||
Keyword="Win32Proj">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<ToolFiles/>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="debug_shared|Win32"
|
||||
OutputDirectory="obj\$(ConfigurationName)"
|
||||
IntermediateDirectory="obj\$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
UseOfMFC="0"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\include;..\..\..\CppUnit\include;..\..\..\Foundation\include;..\..\..\Data\include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;WINVER=0x0501;"
|
||||
StringPooling="true"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
BufferSecurityCheck="true"
|
||||
TreatWChar_tAsBuiltInType="true"
|
||||
ForceConformanceInForLoopScope="true"
|
||||
RuntimeTypeInfo="true"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="3"
|
||||
CompileAs="0"
|
||||
DisableSpecificWarnings=""
|
||||
AdditionalOptions=""/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="odbc32.lib odbccp32.lib"
|
||||
OutputFile="bin\TestSuited.exe"
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories="..\..\..\lib"
|
||||
SuppressStartupBanner="true"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="bin\TestSuited.pdb"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"
|
||||
AdditionalOptions=""/>
|
||||
<Tool
|
||||
Name="VCALinkTool"/>
|
||||
<Tool
|
||||
Name="VCManifestTool"/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="release_shared|Win32"
|
||||
OutputDirectory="obj\$(ConfigurationName)"
|
||||
IntermediateDirectory="obj\$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
UseOfMFC="0"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="4"
|
||||
InlineFunctionExpansion="1"
|
||||
EnableIntrinsicFunctions="true"
|
||||
FavorSizeOrSpeed="1"
|
||||
OmitFramePointers="true"
|
||||
AdditionalIncludeDirectories="..\include;..\..\..\CppUnit\include;..\..\..\Foundation\include;..\..\..\Data\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;WINVER=0x0501;"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="2"
|
||||
BufferSecurityCheck="false"
|
||||
TreatWChar_tAsBuiltInType="true"
|
||||
ForceConformanceInForLoopScope="true"
|
||||
RuntimeTypeInfo="true"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="0"
|
||||
CompileAs="0"
|
||||
DisableSpecificWarnings=""
|
||||
AdditionalOptions=""/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="odbc32.lib odbccp32.lib"
|
||||
OutputFile="bin\TestSuite.exe"
|
||||
LinkIncremental="1"
|
||||
AdditionalLibraryDirectories="..\..\..\lib"
|
||||
GenerateDebugInformation="false"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"
|
||||
AdditionalOptions=""/>
|
||||
<Tool
|
||||
Name="VCALinkTool"/>
|
||||
<Tool
|
||||
Name="VCManifestTool"/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="debug_static_mt|Win32"
|
||||
OutputDirectory="obj\$(ConfigurationName)"
|
||||
IntermediateDirectory="obj\$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
UseOfMFC="0"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="4"
|
||||
AdditionalIncludeDirectories="..\include;..\..\..\CppUnit\include;..\..\..\Foundation\include;..\..\..\Data\include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;WINVER=0x0501;POCO_STATIC;"
|
||||
StringPooling="true"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
BufferSecurityCheck="true"
|
||||
TreatWChar_tAsBuiltInType="true"
|
||||
ForceConformanceInForLoopScope="true"
|
||||
RuntimeTypeInfo="true"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="3"
|
||||
CompileAs="0"
|
||||
DisableSpecificWarnings=""
|
||||
AdditionalOptions=""/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="odbc32.lib odbccp32.lib"
|
||||
OutputFile="bin\static_mt\TestSuited.exe"
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories="..\..\..\lib"
|
||||
IgnoreDefaultLibraryNames="nafxcwd.lib"
|
||||
SuppressStartupBanner="true"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="bin\static_mt\TestSuited.pdb"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"
|
||||
AdditionalOptions=""/>
|
||||
<Tool
|
||||
Name="VCALinkTool"/>
|
||||
<Tool
|
||||
Name="VCManifestTool"/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="release_static_mt|Win32"
|
||||
OutputDirectory="obj\$(ConfigurationName)"
|
||||
IntermediateDirectory="obj\$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
UseOfMFC="0"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="4"
|
||||
InlineFunctionExpansion="1"
|
||||
EnableIntrinsicFunctions="true"
|
||||
FavorSizeOrSpeed="1"
|
||||
OmitFramePointers="true"
|
||||
AdditionalIncludeDirectories="..\include;..\..\..\CppUnit\include;..\..\..\Foundation\include;..\..\..\Data\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;WINVER=0x0501;POCO_STATIC;"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="0"
|
||||
BufferSecurityCheck="false"
|
||||
TreatWChar_tAsBuiltInType="true"
|
||||
ForceConformanceInForLoopScope="true"
|
||||
RuntimeTypeInfo="true"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="0"
|
||||
CompileAs="0"
|
||||
DisableSpecificWarnings=""
|
||||
AdditionalOptions=""/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="odbc32.lib odbccp32.lib"
|
||||
OutputFile="bin\static_mt\TestSuite.exe"
|
||||
LinkIncremental="1"
|
||||
AdditionalLibraryDirectories="..\..\..\lib"
|
||||
IgnoreDefaultLibraryNames="nafxcw.lib"
|
||||
GenerateDebugInformation="false"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"
|
||||
AdditionalOptions=""/>
|
||||
<Tool
|
||||
Name="VCALinkTool"/>
|
||||
<Tool
|
||||
Name="VCManifestTool"/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="debug_static_md|Win32"
|
||||
OutputDirectory="obj\$(ConfigurationName)"
|
||||
IntermediateDirectory="obj\$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
UseOfMFC="0"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="4"
|
||||
AdditionalIncludeDirectories="..\include;..\..\..\CppUnit\include;..\..\..\Foundation\include;..\..\..\Data\include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;WINVER=0x0501;POCO_STATIC;"
|
||||
StringPooling="true"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
BufferSecurityCheck="true"
|
||||
TreatWChar_tAsBuiltInType="true"
|
||||
ForceConformanceInForLoopScope="true"
|
||||
RuntimeTypeInfo="true"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="3"
|
||||
CompileAs="0"
|
||||
DisableSpecificWarnings=""
|
||||
AdditionalOptions=""/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="odbc32.lib odbccp32.lib"
|
||||
OutputFile="bin\static_md\TestSuited.exe"
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories="..\..\..\lib"
|
||||
SuppressStartupBanner="true"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="bin\static_md\TestSuited.pdb"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"
|
||||
AdditionalOptions=""/>
|
||||
<Tool
|
||||
Name="VCALinkTool"/>
|
||||
<Tool
|
||||
Name="VCManifestTool"/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="release_static_md|Win32"
|
||||
OutputDirectory="obj\$(ConfigurationName)"
|
||||
IntermediateDirectory="obj\$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
UseOfMFC="0"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="4"
|
||||
InlineFunctionExpansion="1"
|
||||
EnableIntrinsicFunctions="true"
|
||||
FavorSizeOrSpeed="1"
|
||||
OmitFramePointers="true"
|
||||
AdditionalIncludeDirectories="..\include;..\..\..\CppUnit\include;..\..\..\Foundation\include;..\..\..\Data\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;WINVER=0x0501;POCO_STATIC;"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="2"
|
||||
BufferSecurityCheck="false"
|
||||
TreatWChar_tAsBuiltInType="true"
|
||||
ForceConformanceInForLoopScope="true"
|
||||
RuntimeTypeInfo="true"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="0"
|
||||
CompileAs="0"
|
||||
DisableSpecificWarnings=""
|
||||
AdditionalOptions=""/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="odbc32.lib odbccp32.lib"
|
||||
OutputFile="bin\static_md\TestSuite.exe"
|
||||
LinkIncremental="1"
|
||||
AdditionalLibraryDirectories="..\..\..\lib"
|
||||
GenerateDebugInformation="false"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"
|
||||
AdditionalOptions=""/>
|
||||
<Tool
|
||||
Name="VCALinkTool"/>
|
||||
<Tool
|
||||
Name="VCManifestTool"/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References/>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="ODBC">
|
||||
<Filter
|
||||
Name="Header Files">
|
||||
<File
|
||||
RelativePath=".\src\ODBCAccessTest.h"/>
|
||||
<File
|
||||
RelativePath=".\src\ODBCDB2Test.h"/>
|
||||
<File
|
||||
RelativePath=".\src\ODBCMySQLTest.h"/>
|
||||
<File
|
||||
RelativePath=".\src\ODBCOracleTest.h"/>
|
||||
<File
|
||||
RelativePath=".\src\ODBCPostgreSQLTest.h"/>
|
||||
<File
|
||||
RelativePath=".\src\ODBCSQLiteTest.h"/>
|
||||
<File
|
||||
RelativePath=".\src\ODBCSQLServerTest.h"/>
|
||||
<File
|
||||
RelativePath=".\src\ODBCTest.h"/>
|
||||
<File
|
||||
RelativePath=".\src\SQLExecutor.h"/>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files">
|
||||
<File
|
||||
RelativePath=".\src\ODBCAccessTest.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\ODBCDB2Test.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\ODBCMySQLTest.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\ODBCOracleTest.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\ODBCPostgreSQLTest.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\ODBCSQLiteTest.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\ODBCSQLServerTest.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\ODBCTest.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\SQLExecutor.cpp"/>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="_Suite">
|
||||
<Filter
|
||||
Name="Header Files">
|
||||
<File
|
||||
RelativePath=".\src\ODBCTestSuite.h"/>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files">
|
||||
<File
|
||||
RelativePath=".\src\ODBCTestSuite.cpp"/>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="_Driver">
|
||||
<Filter
|
||||
Name="Source Files">
|
||||
<File
|
||||
RelativePath=".\src\Driver.cpp"/>
|
||||
</Filter>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals/>
|
||||
</VisualStudioProject>
|
||||
@@ -0,0 +1,649 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="debug_shared|Win32">
|
||||
<Configuration>debug_shared</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="debug_shared|x64">
|
||||
<Configuration>debug_shared</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="debug_static_md|Win32">
|
||||
<Configuration>debug_static_md</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="debug_static_md|x64">
|
||||
<Configuration>debug_static_md</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="debug_static_mt|Win32">
|
||||
<Configuration>debug_static_mt</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="debug_static_mt|x64">
|
||||
<Configuration>debug_static_mt</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="release_shared|Win32">
|
||||
<Configuration>release_shared</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="release_shared|x64">
|
||||
<Configuration>release_shared</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="release_static_md|Win32">
|
||||
<Configuration>release_static_md</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="release_static_md|x64">
|
||||
<Configuration>release_static_md</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="release_static_mt|Win32">
|
||||
<Configuration>release_static_mt</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="release_static_mt|x64">
|
||||
<Configuration>release_static_mt</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectName>TestSuite</ProjectName>
|
||||
<ProjectGuid>{00627063-395B-4413-9099-23BDB56562FA}</ProjectGuid>
|
||||
<RootNamespace>TestSuite</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props"/>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props"/>
|
||||
<ImportGroup Label="ExtensionSettings"/>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros"/>
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>14.0.25420.1</_ProjectFileVersion>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">TestSuited</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">TestSuited</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">TestSuited</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">TestSuite</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">TestSuite</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">TestSuite</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">TestSuited</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">TestSuited</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">TestSuited</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">TestSuite</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">TestSuite</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">TestSuite</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">
|
||||
<OutDir>bin\</OutDir>
|
||||
<IntDir>obj\TestSuite\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">
|
||||
<OutDir>bin\</OutDir>
|
||||
<IntDir>obj\TestSuite\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">
|
||||
<OutDir>bin\static_mt\</OutDir>
|
||||
<IntDir>obj\TestSuite\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">
|
||||
<OutDir>bin\static_mt\</OutDir>
|
||||
<IntDir>obj\TestSuite\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">
|
||||
<OutDir>bin\static_md\</OutDir>
|
||||
<IntDir>obj\TestSuite\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">
|
||||
<OutDir>bin\static_md\</OutDir>
|
||||
<IntDir>obj\TestSuite\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">
|
||||
<OutDir>bin64\</OutDir>
|
||||
<IntDir>obj64\TestSuite\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">
|
||||
<OutDir>bin64\</OutDir>
|
||||
<IntDir>obj64\TestSuite\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">
|
||||
<OutDir>bin64\static_mt\</OutDir>
|
||||
<IntDir>obj64\TestSuite\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">
|
||||
<OutDir>bin64\static_mt\</OutDir>
|
||||
<IntDir>obj64\TestSuite\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">
|
||||
<OutDir>bin64\static_md\</OutDir>
|
||||
<IntDir>obj64\TestSuite\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">
|
||||
<OutDir>bin64\static_md\</OutDir>
|
||||
<IntDir>obj64\TestSuite\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\include;..\..\..\CppUnit\include;..\..\..\Foundation\include;..\..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;WINVER=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>CppUnitd.lib;odbc32.lib;odbccp32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>bin\TestSuited.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>bin\TestSuited.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<AdditionalIncludeDirectories>..\include;..\..\..\CppUnit\include;..\..\..\Foundation\include;..\..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;WINVER=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat/>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>CppUnit.lib;odbc32.lib;odbccp32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>bin\TestSuite.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\include;..\..\..\CppUnit\include;..\..\..\Foundation\include;..\..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>CppUnitmtd.lib;iphlpapi.lib;winmm.lib;odbc32.lib;odbccp32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>bin\static_mt\TestSuited.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>bin\static_mt\TestSuited.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<AdditionalIncludeDirectories>..\include;..\..\..\CppUnit\include;..\..\..\Foundation\include;..\..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat/>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>CppUnitmt.lib;iphlpapi.lib;winmm.lib;odbc32.lib;odbccp32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>bin\static_mt\TestSuite.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\include;..\..\..\CppUnit\include;..\..\..\CppUnit\WinTestRunner\include;..\..\..\Foundation\include;..\..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>CppUnitmdd.lib;iphlpapi.lib;winmm.lib;odbc32.lib;odbccp32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>bin\static_md\TestSuited.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>bin\static_md\TestSuited.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<AdditionalIncludeDirectories>..\include;..\..\..\CppUnit\include;..\..\..\Foundation\include;..\..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat/>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>CppUnitmd.lib;iphlpapi.lib;winmm.lib;odbc32.lib;odbccp32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>bin\static_md\TestSuite.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\include;..\..\..\CppUnit\include;..\..\..\Foundation\include;..\..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;WINVER=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>CppUnitd.lib;odbc32.lib;odbccp32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>bin64\TestSuited.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>bin64\TestSuited.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<AdditionalIncludeDirectories>..\include;..\..\..\CppUnit\include;..\..\..\Foundation\include;..\..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;WINVER=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat/>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>CppUnit.lib;odbc32.lib;odbccp32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>bin64\TestSuite.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\include;..\..\..\CppUnit\include;..\..\..\Foundation\include;..\..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>CppUnitmtd.lib;iphlpapi.lib;winmm.lib;odbc32.lib;odbccp32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>bin64\static_mt\TestSuited.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>bin64\static_mt\TestSuited.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<AdditionalIncludeDirectories>..\include;..\..\..\CppUnit\include;..\..\..\Foundation\include;..\..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat/>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>CppUnitmt.lib;iphlpapi.lib;winmm.lib;odbc32.lib;odbccp32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>bin64\static_mt\TestSuite.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\include;..\..\..\CppUnit\include;..\..\..\Foundation\include;..\..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>CppUnitmdd.lib;iphlpapi.lib;winmm.lib;odbc32.lib;odbccp32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>bin64\static_md\TestSuited.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>bin64\static_md\TestSuited.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<AdditionalIncludeDirectories>..\include;..\..\..\CppUnit\include;..\..\..\Foundation\include;..\..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat/>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>CppUnitmd.lib;iphlpapi.lib;winmm.lib;odbc32.lib;odbccp32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>bin64\static_md\TestSuite.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="src\ODBCAccessTest.h"/>
|
||||
<ClInclude Include="src\ODBCDB2Test.h"/>
|
||||
<ClInclude Include="src\ODBCMySQLTest.h"/>
|
||||
<ClInclude Include="src\ODBCOracleTest.h"/>
|
||||
<ClInclude Include="src\ODBCPostgreSQLTest.h"/>
|
||||
<ClInclude Include="src\ODBCSQLiteTest.h"/>
|
||||
<ClInclude Include="src\ODBCSQLServerTest.h"/>
|
||||
<ClInclude Include="src\ODBCTest.h"/>
|
||||
<ClInclude Include="src\ODBCTestSuite.h"/>
|
||||
<ClInclude Include="src\SQLExecutor.h"/>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="src\Driver.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ODBCAccessTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ODBCDB2Test.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ODBCMySQLTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ODBCOracleTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ODBCPostgreSQLTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ODBCSQLiteTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ODBCSQLServerTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ODBCTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ODBCTestSuite.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\SQLExecutor.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets"/>
|
||||
<ImportGroup Label="ExtensionTargets"/>
|
||||
</Project>
|
||||
@@ -0,0 +1,96 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="ODBC">
|
||||
<UniqueIdentifier>{ccdb5e6e-eb82-4b6c-b9dc-2c3e57debea9}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="ODBC\Header Files">
|
||||
<UniqueIdentifier>{c9545407-a1fa-4f97-8609-f6a46de9d267}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="ODBC\Source Files">
|
||||
<UniqueIdentifier>{9f30b3f9-9774-4aae-bc56-30907a7f8e15}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="_Suite">
|
||||
<UniqueIdentifier>{cad9d554-f79a-450d-8374-51683e09163b}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="_Suite\Header Files">
|
||||
<UniqueIdentifier>{759a03c2-3767-49c1-aac6-84258f27e01e}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="_Suite\Source Files">
|
||||
<UniqueIdentifier>{96da7c52-a552-473b-ac6f-981aef9d1327}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="_Driver">
|
||||
<UniqueIdentifier>{0500b0ee-7b7d-4ccb-9b07-14bde5a83ccb}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="_Driver\Source Files">
|
||||
<UniqueIdentifier>{e2005758-9fb8-40a3-a87d-65d3f9d75ded}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="src\ODBCAccessTest.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\ODBCDB2Test.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\ODBCMySQLTest.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\ODBCOracleTest.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\ODBCPostgreSQLTest.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\ODBCSQLiteTest.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\ODBCSQLServerTest.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\ODBCTest.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\SQLExecutor.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\ODBCTestSuite.h">
|
||||
<Filter>_Suite\Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="src\ODBCAccessTest.cpp">
|
||||
<Filter>ODBC\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ODBCDB2Test.cpp">
|
||||
<Filter>ODBC\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ODBCMySQLTest.cpp">
|
||||
<Filter>ODBC\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ODBCOracleTest.cpp">
|
||||
<Filter>ODBC\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ODBCPostgreSQLTest.cpp">
|
||||
<Filter>ODBC\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ODBCSQLiteTest.cpp">
|
||||
<Filter>ODBC\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ODBCSQLServerTest.cpp">
|
||||
<Filter>ODBC\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ODBCTest.cpp">
|
||||
<Filter>ODBC\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\SQLExecutor.cpp">
|
||||
<Filter>ODBC\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ODBCTestSuite.cpp">
|
||||
<Filter>_Suite\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Driver.cpp">
|
||||
<Filter>_Driver\Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,649 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="debug_shared|Win32">
|
||||
<Configuration>debug_shared</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="debug_shared|x64">
|
||||
<Configuration>debug_shared</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="debug_static_md|Win32">
|
||||
<Configuration>debug_static_md</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="debug_static_md|x64">
|
||||
<Configuration>debug_static_md</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="debug_static_mt|Win32">
|
||||
<Configuration>debug_static_mt</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="debug_static_mt|x64">
|
||||
<Configuration>debug_static_mt</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="release_shared|Win32">
|
||||
<Configuration>release_shared</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="release_shared|x64">
|
||||
<Configuration>release_shared</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="release_static_md|Win32">
|
||||
<Configuration>release_static_md</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="release_static_md|x64">
|
||||
<Configuration>release_static_md</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="release_static_mt|Win32">
|
||||
<Configuration>release_static_mt</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="release_static_mt|x64">
|
||||
<Configuration>release_static_mt</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectName>TestSuite</ProjectName>
|
||||
<ProjectGuid>{00627063-395B-4413-9099-23BDB56562FA}</ProjectGuid>
|
||||
<RootNamespace>TestSuite</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props"/>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props"/>
|
||||
<ImportGroup Label="ExtensionSettings"/>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros"/>
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>15.0.28307.799</_ProjectFileVersion>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">TestSuited</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">TestSuited</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">TestSuited</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">TestSuite</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">TestSuite</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">TestSuite</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">TestSuited</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">TestSuited</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">TestSuited</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">TestSuite</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">TestSuite</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">TestSuite</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">
|
||||
<OutDir>bin\</OutDir>
|
||||
<IntDir>obj\TestSuite\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">
|
||||
<OutDir>bin\</OutDir>
|
||||
<IntDir>obj\TestSuite\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">
|
||||
<OutDir>bin\static_mt\</OutDir>
|
||||
<IntDir>obj\TestSuite\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">
|
||||
<OutDir>bin\static_mt\</OutDir>
|
||||
<IntDir>obj\TestSuite\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">
|
||||
<OutDir>bin\static_md\</OutDir>
|
||||
<IntDir>obj\TestSuite\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">
|
||||
<OutDir>bin\static_md\</OutDir>
|
||||
<IntDir>obj\TestSuite\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">
|
||||
<OutDir>bin64\</OutDir>
|
||||
<IntDir>obj64\TestSuite\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">
|
||||
<OutDir>bin64\</OutDir>
|
||||
<IntDir>obj64\TestSuite\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">
|
||||
<OutDir>bin64\static_mt\</OutDir>
|
||||
<IntDir>obj64\TestSuite\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">
|
||||
<OutDir>bin64\static_mt\</OutDir>
|
||||
<IntDir>obj64\TestSuite\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">
|
||||
<OutDir>bin64\static_md\</OutDir>
|
||||
<IntDir>obj64\TestSuite\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">
|
||||
<OutDir>bin64\static_md\</OutDir>
|
||||
<IntDir>obj64\TestSuite\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\include;..\..\..\CppUnit\include;..\..\..\Foundation\include;..\..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;WINVER=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>CppUnitd.lib;odbc32.lib;odbccp32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>bin\TestSuited.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>bin\TestSuited.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<AdditionalIncludeDirectories>..\include;..\..\..\CppUnit\include;..\..\..\Foundation\include;..\..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;WINVER=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat/>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>CppUnit.lib;odbc32.lib;odbccp32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>bin\TestSuite.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\include;..\..\..\CppUnit\include;..\..\..\Foundation\include;..\..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>CppUnitmtd.lib;iphlpapi.lib;winmm.lib;odbc32.lib;odbccp32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>bin\static_mt\TestSuited.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>bin\static_mt\TestSuited.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<AdditionalIncludeDirectories>..\include;..\..\..\CppUnit\include;..\..\..\Foundation\include;..\..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat/>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>CppUnitmt.lib;iphlpapi.lib;winmm.lib;odbc32.lib;odbccp32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>bin\static_mt\TestSuite.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\include;..\..\..\CppUnit\include;..\..\..\CppUnit\WinTestRunner\include;..\..\..\Foundation\include;..\..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>CppUnitmdd.lib;iphlpapi.lib;winmm.lib;odbc32.lib;odbccp32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>bin\static_md\TestSuited.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>bin\static_md\TestSuited.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<AdditionalIncludeDirectories>..\include;..\..\..\CppUnit\include;..\..\..\Foundation\include;..\..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat/>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>CppUnitmd.lib;iphlpapi.lib;winmm.lib;odbc32.lib;odbccp32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>bin\static_md\TestSuite.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\include;..\..\..\CppUnit\include;..\..\..\Foundation\include;..\..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;WINVER=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>CppUnitd.lib;odbc32.lib;odbccp32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>bin64\TestSuited.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>bin64\TestSuited.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<AdditionalIncludeDirectories>..\include;..\..\..\CppUnit\include;..\..\..\Foundation\include;..\..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;WINVER=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat/>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>CppUnit.lib;odbc32.lib;odbccp32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>bin64\TestSuite.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\include;..\..\..\CppUnit\include;..\..\..\Foundation\include;..\..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>CppUnitmtd.lib;iphlpapi.lib;winmm.lib;odbc32.lib;odbccp32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>bin64\static_mt\TestSuited.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>bin64\static_mt\TestSuited.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<AdditionalIncludeDirectories>..\include;..\..\..\CppUnit\include;..\..\..\Foundation\include;..\..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat/>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>CppUnitmt.lib;iphlpapi.lib;winmm.lib;odbc32.lib;odbccp32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>bin64\static_mt\TestSuite.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\include;..\..\..\CppUnit\include;..\..\..\Foundation\include;..\..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>CppUnitmdd.lib;iphlpapi.lib;winmm.lib;odbc32.lib;odbccp32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>bin64\static_md\TestSuited.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>bin64\static_md\TestSuited.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<AdditionalIncludeDirectories>..\include;..\..\..\CppUnit\include;..\..\..\Foundation\include;..\..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat/>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>CppUnitmd.lib;iphlpapi.lib;winmm.lib;odbc32.lib;odbccp32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>bin64\static_md\TestSuite.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="src\ODBCAccessTest.h"/>
|
||||
<ClInclude Include="src\ODBCDB2Test.h"/>
|
||||
<ClInclude Include="src\ODBCMySQLTest.h"/>
|
||||
<ClInclude Include="src\ODBCOracleTest.h"/>
|
||||
<ClInclude Include="src\ODBCPostgreSQLTest.h"/>
|
||||
<ClInclude Include="src\ODBCSQLiteTest.h"/>
|
||||
<ClInclude Include="src\ODBCSQLServerTest.h"/>
|
||||
<ClInclude Include="src\ODBCTest.h"/>
|
||||
<ClInclude Include="src\ODBCTestSuite.h"/>
|
||||
<ClInclude Include="src\SQLExecutor.h"/>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="src\Driver.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ODBCAccessTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ODBCDB2Test.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ODBCMySQLTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ODBCOracleTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ODBCPostgreSQLTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ODBCSQLiteTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ODBCSQLServerTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ODBCTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ODBCTestSuite.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\SQLExecutor.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets"/>
|
||||
<ImportGroup Label="ExtensionTargets"/>
|
||||
</Project>
|
||||
@@ -0,0 +1,96 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="ODBC">
|
||||
<UniqueIdentifier>{29ae075d-10c6-4831-90cc-8a1b8e42c4ed}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="ODBC\Header Files">
|
||||
<UniqueIdentifier>{871d1501-ee35-4529-8db0-5125306fbc6f}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="ODBC\Source Files">
|
||||
<UniqueIdentifier>{a8b986a3-0bf0-4aa7-bf2d-e9f04e024e67}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="_Suite">
|
||||
<UniqueIdentifier>{158dfd0b-cd41-4f21-b66b-2e5753f153db}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="_Suite\Header Files">
|
||||
<UniqueIdentifier>{96672d2d-98a4-4578-8d22-9d6603fe7783}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="_Suite\Source Files">
|
||||
<UniqueIdentifier>{915fde9e-9c65-48a4-9493-30a2ffd32321}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="_Driver">
|
||||
<UniqueIdentifier>{53898714-92bb-44c2-ad5b-3d1ab99bce08}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="_Driver\Source Files">
|
||||
<UniqueIdentifier>{b9011739-f7e3-4c0e-8a7f-ed78ee154b17}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="src\ODBCAccessTest.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\ODBCDB2Test.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\ODBCMySQLTest.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\ODBCOracleTest.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\ODBCPostgreSQLTest.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\ODBCSQLiteTest.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\ODBCSQLServerTest.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\ODBCTest.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\SQLExecutor.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\ODBCTestSuite.h">
|
||||
<Filter>_Suite\Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="src\ODBCAccessTest.cpp">
|
||||
<Filter>ODBC\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ODBCDB2Test.cpp">
|
||||
<Filter>ODBC\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ODBCMySQLTest.cpp">
|
||||
<Filter>ODBC\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ODBCOracleTest.cpp">
|
||||
<Filter>ODBC\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ODBCPostgreSQLTest.cpp">
|
||||
<Filter>ODBC\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ODBCSQLiteTest.cpp">
|
||||
<Filter>ODBC\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ODBCSQLServerTest.cpp">
|
||||
<Filter>ODBC\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ODBCTest.cpp">
|
||||
<Filter>ODBC\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\SQLExecutor.cpp">
|
||||
<Filter>ODBC\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ODBCTestSuite.cpp">
|
||||
<Filter>_Suite\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Driver.cpp">
|
||||
<Filter>_Driver\Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,649 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="debug_shared|Win32">
|
||||
<Configuration>debug_shared</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="debug_shared|x64">
|
||||
<Configuration>debug_shared</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="debug_static_md|Win32">
|
||||
<Configuration>debug_static_md</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="debug_static_md|x64">
|
||||
<Configuration>debug_static_md</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="debug_static_mt|Win32">
|
||||
<Configuration>debug_static_mt</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="debug_static_mt|x64">
|
||||
<Configuration>debug_static_mt</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="release_shared|Win32">
|
||||
<Configuration>release_shared</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="release_shared|x64">
|
||||
<Configuration>release_shared</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="release_static_md|Win32">
|
||||
<Configuration>release_static_md</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="release_static_md|x64">
|
||||
<Configuration>release_static_md</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="release_static_mt|Win32">
|
||||
<Configuration>release_static_mt</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="release_static_mt|x64">
|
||||
<Configuration>release_static_mt</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectName>TestSuite</ProjectName>
|
||||
<ProjectGuid>{00627063-395B-4413-9099-23BDB56562FA}</ProjectGuid>
|
||||
<RootNamespace>TestSuite</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props"/>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props"/>
|
||||
<ImportGroup Label="ExtensionSettings"/>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros"/>
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>15.0.28307.799</_ProjectFileVersion>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">TestSuited</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">TestSuited</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">TestSuited</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">TestSuite</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">TestSuite</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">TestSuite</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">TestSuited</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">TestSuited</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">TestSuited</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">TestSuite</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">TestSuite</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">TestSuite</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">
|
||||
<OutDir>bin\</OutDir>
|
||||
<IntDir>obj\TestSuite\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">
|
||||
<OutDir>bin\</OutDir>
|
||||
<IntDir>obj\TestSuite\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">
|
||||
<OutDir>bin\static_mt\</OutDir>
|
||||
<IntDir>obj\TestSuite\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">
|
||||
<OutDir>bin\static_mt\</OutDir>
|
||||
<IntDir>obj\TestSuite\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">
|
||||
<OutDir>bin\static_md\</OutDir>
|
||||
<IntDir>obj\TestSuite\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">
|
||||
<OutDir>bin\static_md\</OutDir>
|
||||
<IntDir>obj\TestSuite\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">
|
||||
<OutDir>bin64\</OutDir>
|
||||
<IntDir>obj64\TestSuite\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">
|
||||
<OutDir>bin64\</OutDir>
|
||||
<IntDir>obj64\TestSuite\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">
|
||||
<OutDir>bin64\static_mt\</OutDir>
|
||||
<IntDir>obj64\TestSuite\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">
|
||||
<OutDir>bin64\static_mt\</OutDir>
|
||||
<IntDir>obj64\TestSuite\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">
|
||||
<OutDir>bin64\static_md\</OutDir>
|
||||
<IntDir>obj64\TestSuite\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">
|
||||
<OutDir>bin64\static_md\</OutDir>
|
||||
<IntDir>obj64\TestSuite\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\include;..\..\..\CppUnit\include;..\..\..\Foundation\include;..\..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;WINVER=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>CppUnitd.lib;odbc32.lib;odbccp32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>bin\TestSuited.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>bin\TestSuited.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<AdditionalIncludeDirectories>..\include;..\..\..\CppUnit\include;..\..\..\Foundation\include;..\..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;WINVER=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat/>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>CppUnit.lib;odbc32.lib;odbccp32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>bin\TestSuite.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\include;..\..\..\CppUnit\include;..\..\..\Foundation\include;..\..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>CppUnitmtd.lib;iphlpapi.lib;winmm.lib;odbc32.lib;odbccp32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>bin\static_mt\TestSuited.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>bin\static_mt\TestSuited.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<AdditionalIncludeDirectories>..\include;..\..\..\CppUnit\include;..\..\..\Foundation\include;..\..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat/>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>CppUnitmt.lib;iphlpapi.lib;winmm.lib;odbc32.lib;odbccp32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>bin\static_mt\TestSuite.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\include;..\..\..\CppUnit\include;..\..\..\CppUnit\WinTestRunner\include;..\..\..\Foundation\include;..\..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>CppUnitmdd.lib;iphlpapi.lib;winmm.lib;odbc32.lib;odbccp32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>bin\static_md\TestSuited.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>bin\static_md\TestSuited.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<AdditionalIncludeDirectories>..\include;..\..\..\CppUnit\include;..\..\..\Foundation\include;..\..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat/>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>CppUnitmd.lib;iphlpapi.lib;winmm.lib;odbc32.lib;odbccp32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>bin\static_md\TestSuite.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\include;..\..\..\CppUnit\include;..\..\..\Foundation\include;..\..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;WINVER=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>CppUnitd.lib;odbc32.lib;odbccp32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>bin64\TestSuited.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>bin64\TestSuited.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<AdditionalIncludeDirectories>..\include;..\..\..\CppUnit\include;..\..\..\Foundation\include;..\..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;WINVER=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat/>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>CppUnit.lib;odbc32.lib;odbccp32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>bin64\TestSuite.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\include;..\..\..\CppUnit\include;..\..\..\Foundation\include;..\..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>CppUnitmtd.lib;iphlpapi.lib;winmm.lib;odbc32.lib;odbccp32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>bin64\static_mt\TestSuited.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>bin64\static_mt\TestSuited.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<AdditionalIncludeDirectories>..\include;..\..\..\CppUnit\include;..\..\..\Foundation\include;..\..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat/>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>CppUnitmt.lib;iphlpapi.lib;winmm.lib;odbc32.lib;odbccp32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>bin64\static_mt\TestSuite.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\include;..\..\..\CppUnit\include;..\..\..\Foundation\include;..\..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>CppUnitmdd.lib;iphlpapi.lib;winmm.lib;odbc32.lib;odbccp32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>bin64\static_md\TestSuited.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>bin64\static_md\TestSuited.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<AdditionalIncludeDirectories>..\include;..\..\..\CppUnit\include;..\..\..\Foundation\include;..\..\..\Data\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat/>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>CppUnitmd.lib;iphlpapi.lib;winmm.lib;odbc32.lib;odbccp32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>bin64\static_md\TestSuite.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="src\ODBCAccessTest.h"/>
|
||||
<ClInclude Include="src\ODBCDB2Test.h"/>
|
||||
<ClInclude Include="src\ODBCMySQLTest.h"/>
|
||||
<ClInclude Include="src\ODBCOracleTest.h"/>
|
||||
<ClInclude Include="src\ODBCPostgreSQLTest.h"/>
|
||||
<ClInclude Include="src\ODBCSQLiteTest.h"/>
|
||||
<ClInclude Include="src\ODBCSQLServerTest.h"/>
|
||||
<ClInclude Include="src\ODBCTest.h"/>
|
||||
<ClInclude Include="src\ODBCTestSuite.h"/>
|
||||
<ClInclude Include="src\SQLExecutor.h"/>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="src\Driver.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ODBCAccessTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ODBCDB2Test.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ODBCMySQLTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ODBCOracleTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ODBCPostgreSQLTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ODBCSQLiteTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ODBCSQLServerTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ODBCTest.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ODBCTestSuite.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\SQLExecutor.cpp">
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets"/>
|
||||
<ImportGroup Label="ExtensionTargets"/>
|
||||
</Project>
|
||||
@@ -0,0 +1,96 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="ODBC">
|
||||
<UniqueIdentifier>{e2bd62e2-949b-437b-971b-48484d6a0d72}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="ODBC\Header Files">
|
||||
<UniqueIdentifier>{44c93e62-417f-40e6-b4ed-7af5f6bbeea3}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="ODBC\Source Files">
|
||||
<UniqueIdentifier>{f77ee3ee-39ea-4276-9f42-e6719c76c567}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="_Suite">
|
||||
<UniqueIdentifier>{548bf7c2-04c3-490d-ae1f-61a4fe93b7d6}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="_Suite\Header Files">
|
||||
<UniqueIdentifier>{66c8a268-e4e4-4edb-83a8-83cb1e5c028f}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="_Suite\Source Files">
|
||||
<UniqueIdentifier>{17121a95-2f6b-430c-af19-1dd77b2f9558}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="_Driver">
|
||||
<UniqueIdentifier>{180f1b2b-e1aa-481c-a794-aa41d763aa0e}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="_Driver\Source Files">
|
||||
<UniqueIdentifier>{00cb3142-6543-4572-b3c6-5d6081e36d3d}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="src\ODBCAccessTest.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\ODBCDB2Test.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\ODBCMySQLTest.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\ODBCOracleTest.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\ODBCPostgreSQLTest.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\ODBCSQLiteTest.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\ODBCSQLServerTest.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\ODBCTest.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\SQLExecutor.h">
|
||||
<Filter>ODBC\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\ODBCTestSuite.h">
|
||||
<Filter>_Suite\Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="src\ODBCAccessTest.cpp">
|
||||
<Filter>ODBC\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ODBCDB2Test.cpp">
|
||||
<Filter>ODBC\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ODBCMySQLTest.cpp">
|
||||
<Filter>ODBC\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ODBCOracleTest.cpp">
|
||||
<Filter>ODBC\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ODBCPostgreSQLTest.cpp">
|
||||
<Filter>ODBC\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ODBCSQLiteTest.cpp">
|
||||
<Filter>ODBC\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ODBCSQLServerTest.cpp">
|
||||
<Filter>ODBC\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ODBCTest.cpp">
|
||||
<Filter>ODBC\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\SQLExecutor.cpp">
|
||||
<Filter>ODBC\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ODBCTestSuite.cpp">
|
||||
<Filter>_Suite\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Driver.cpp">
|
||||
<Filter>_Driver\Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
//
|
||||
// Driver.cpp
|
||||
//
|
||||
// Console-based test driver for Poco SQLite.
|
||||
//
|
||||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#include "CppUnit/TestRunner.h"
|
||||
#include "ODBCTestSuite.h"
|
||||
#include "Poco/Data/ODBC/Connector.h"
|
||||
|
||||
|
||||
int main(int ac, char **av)
|
||||
{
|
||||
Poco::Data::ODBC::Connector::registerConnector();
|
||||
|
||||
std::vector<std::string> args;
|
||||
for (int i = 0; i < ac; ++i)
|
||||
args.push_back(std::string(av[i]));
|
||||
CppUnit::TestRunner runner;
|
||||
runner.addTest("ODBCTestSuite", ODBCTestSuite::suite());
|
||||
return runner.run(args) ? 0 : 1;
|
||||
}
|
||||
@@ -0,0 +1,213 @@
|
||||
//
|
||||
// ODBCAccessTest.cpp
|
||||
//
|
||||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#include "ODBCAccessTest.h"
|
||||
#include "CppUnit/TestCaller.h"
|
||||
#include "CppUnit/TestSuite.h"
|
||||
#include "Poco/String.h"
|
||||
#include "Poco/Format.h"
|
||||
#include "Poco/Exception.h"
|
||||
#include "Poco/Data/LOB.h"
|
||||
#include "Poco/Data/StatementImpl.h"
|
||||
#include "Poco/Data/ODBC/Connector.h"
|
||||
#include "Poco/Data/ODBC/Utility.h"
|
||||
#include "Poco/Data/ODBC/Diagnostics.h"
|
||||
#include "Poco/Data/ODBC/ODBCException.h"
|
||||
#include "Poco/Data/ODBC/ODBCStatementImpl.h"
|
||||
#include <sqltypes.h>
|
||||
#include <iostream>
|
||||
|
||||
|
||||
using namespace Poco::Data::Keywords;
|
||||
using Poco::Data::Session;
|
||||
using Poco::Data::ODBC::Utility;
|
||||
using Poco::Data::ODBC::ConnectionException;
|
||||
using Poco::Data::ODBC::StatementException;
|
||||
using Poco::Data::ODBC::StatementDiagnostics;
|
||||
using Poco::format;
|
||||
using Poco::NotFoundException;
|
||||
|
||||
|
||||
Session* ODBCAccessTest::_pSession = 0;
|
||||
std::string ODBCAccessTest::_dbConnString;
|
||||
Poco::Data::ODBC::Utility::DriverMap ODBCAccessTest::_drivers;
|
||||
|
||||
|
||||
ODBCAccessTest::ODBCAccessTest(const std::string& name):
|
||||
CppUnit::TestCase(name)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
ODBCAccessTest::~ODBCAccessTest()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void ODBCAccessTest::testSimpleAccess()
|
||||
{
|
||||
if (!_pSession) fail ("Test not available.");
|
||||
|
||||
std::string lastName = "lastName";
|
||||
int age = 133132;
|
||||
int count = 0;
|
||||
std::string result;
|
||||
|
||||
recreatePersonTable();
|
||||
|
||||
count = 0;
|
||||
try { *_pSession << "INSERT INTO PERSON VALUES('lastName', 'firstName', 'Address', 133132)", now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("testSimpleAccess()"); }
|
||||
catch(StatementException& ex){ std::cout << ex.toString() << std::endl; fail ("testSimpleAccess()");}
|
||||
|
||||
try { *_pSession << "SELECT COUNT(*) FROM PERSON", into(count), now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("testSimpleAccess()"); }
|
||||
catch(StatementException& ex){ std::cout << ex.toString() << std::endl; fail ("testSimpleAccess()"); }
|
||||
assertTrue (count == 1);
|
||||
|
||||
try { *_pSession << "SELECT LastName FROM PERSON", into(result), now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("testSimpleAccess()"); }
|
||||
catch(StatementException& ex){ std::cout << ex.toString() << std::endl; fail ("testSimpleAccess()"); }
|
||||
assertTrue (lastName == result);
|
||||
|
||||
try { *_pSession << "SELECT Age FROM PERSON", into(count), now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("testSimpleAccess()"); }
|
||||
catch(StatementException& ex){ std::cout << ex.toString() << std::endl; fail ("testSimpleAccess()"); }
|
||||
assertTrue (count == age);
|
||||
}
|
||||
|
||||
|
||||
void ODBCAccessTest::dropTable(const std::string& tableName)
|
||||
{
|
||||
try
|
||||
{
|
||||
*_pSession << format("DROP TABLE %s", tableName), now;
|
||||
}
|
||||
catch (StatementException& ex)
|
||||
{
|
||||
bool ignoreError = false;
|
||||
const StatementDiagnostics::FieldVec& flds = ex.diagnostics().fields();
|
||||
StatementDiagnostics::Iterator it = flds.begin();
|
||||
for (; it != flds.end(); ++it)
|
||||
{
|
||||
if (-1305 == it->_nativeError)//MS Access -1305 (table does not exist)
|
||||
{
|
||||
ignoreError = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!ignoreError) throw;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ODBCAccessTest::recreatePersonTable()
|
||||
{
|
||||
dropTable("Person");
|
||||
*_pSession << "CREATE TABLE Person (LastName TEXT(30), FirstName TEXT(30), Address TEXT(30), Age INTEGER)", now;
|
||||
}
|
||||
|
||||
|
||||
bool ODBCAccessTest::canConnect(const std::string& driver, const std::string& dsn)
|
||||
{
|
||||
Utility::DriverMap::iterator itDrv = _drivers.begin();
|
||||
for (; itDrv != _drivers.end(); ++itDrv)
|
||||
{
|
||||
if (((itDrv->first).find(driver) != std::string::npos))
|
||||
{
|
||||
std::cout << "Driver found: " << itDrv->first
|
||||
<< " (" << itDrv->second << ')' << std::endl;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (_drivers.end() == itDrv)
|
||||
{
|
||||
std::cout << driver << " driver NOT found, tests not available." << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
Utility::DSNMap dataSources;
|
||||
Utility::dataSources(dataSources);
|
||||
Utility::DSNMap::iterator itDSN = dataSources.begin();
|
||||
for (; itDSN != dataSources.end(); ++itDSN)
|
||||
{
|
||||
if (itDSN->first == dsn && itDSN->second == driver)
|
||||
{
|
||||
std::cout << "DSN found: " << itDSN->first
|
||||
<< " (" << itDSN->second << ')' << std::endl;
|
||||
format(_dbConnString, "DSN=%s", dsn);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// DSN not found, try connect without it
|
||||
format(_dbConnString, "DRIVER=%s;"
|
||||
"UID=admin;"
|
||||
"UserCommitSync=Yes;"
|
||||
"Threads=3;"
|
||||
"SafeTransactions=0;"
|
||||
"PageTimeout=5;"
|
||||
"MaxScanRows=8;"
|
||||
"MaxBufferSize=2048;"
|
||||
"FIL=MS Access;"
|
||||
"DriverId=25;"
|
||||
"DBQ=test.mdb;", driver);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void ODBCAccessTest::setUp()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void ODBCAccessTest::tearDown()
|
||||
{
|
||||
dropTable("Person");
|
||||
}
|
||||
|
||||
|
||||
bool ODBCAccessTest::init(const std::string& driver, const std::string& dsn)
|
||||
{
|
||||
Utility::drivers(_drivers);
|
||||
if (!canConnect(driver, dsn)) return false;
|
||||
|
||||
try
|
||||
{
|
||||
_pSession = new Session(Poco::Data::ODBC::Connector::KEY, _dbConnString);
|
||||
}catch (ConnectionException& ex)
|
||||
{
|
||||
std::cout << ex.toString() << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
//N.B. Access driver does not suport check for connection.
|
||||
std::cout << "*** Connected to [" << driver << "] test database." << std::endl;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
CppUnit::Test* ODBCAccessTest::suite()
|
||||
{
|
||||
if (init("Microsoft Access Driver (*.mdb)", "PocoDataAccessTest"))
|
||||
{
|
||||
CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("ODBCAccessTest");
|
||||
|
||||
CppUnit_addTest(pSuite, ODBCAccessTest, testSimpleAccess);
|
||||
|
||||
return pSuite;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
//
|
||||
// ODBCAccessTest.h
|
||||
//
|
||||
// Definition of the ODBCAccessTest class.
|
||||
//
|
||||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#ifndef ODBCAccessTest_INCLUDED
|
||||
#define ODBCAccessTest_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Data/ODBC/ODBC.h"
|
||||
#include "Poco/Data/Session.h"
|
||||
#include "Poco/Data/ODBC/Utility.h"
|
||||
#include "Poco/SharedPtr.h"
|
||||
#include "CppUnit/TestCase.h"
|
||||
#include "SQLExecutor.h"
|
||||
|
||||
|
||||
class ODBCAccessTest: public CppUnit::TestCase
|
||||
/// MS Access ODBC test class
|
||||
/// Tested:
|
||||
///
|
||||
/// Driver | DB | OS
|
||||
/// ------------+-----------+------------------------------------------
|
||||
/// 4.00.6305.00| Jet 4.0 | MS Windows XP Professional x64 v.2003/SP1
|
||||
{
|
||||
public:
|
||||
ODBCAccessTest(const std::string& name);
|
||||
~ODBCAccessTest();
|
||||
|
||||
void testSimpleAccess();
|
||||
|
||||
void setUp();
|
||||
void tearDown();
|
||||
|
||||
static CppUnit::Test* suite();
|
||||
|
||||
private:
|
||||
void dropTable(const std::string& tableName);
|
||||
void recreatePersonTable();
|
||||
|
||||
static bool init(const std::string& driver, const std::string& dsn);
|
||||
static bool canConnect(const std::string& driver, const std::string& dsn);
|
||||
|
||||
static Poco::Data::ODBC::Utility::DriverMap _drivers;
|
||||
static std::string _dbConnString;
|
||||
static Poco::Data::Session* _pSession;
|
||||
bool _owner;
|
||||
};
|
||||
|
||||
|
||||
#endif // ODBCAccessTest_INCLUDED
|
||||
+679
@@ -0,0 +1,679 @@
|
||||
//
|
||||
// ODBCDB2Test.cpp
|
||||
//
|
||||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#include "ODBCDB2Test.h"
|
||||
#include "CppUnit/TestCaller.h"
|
||||
#include "CppUnit/TestSuite.h"
|
||||
#include "Poco/String.h"
|
||||
#include "Poco/Format.h"
|
||||
#include "Poco/Any.h"
|
||||
#include "Poco/DynamicAny.h"
|
||||
#include "Poco/Tuple.h"
|
||||
#include "Poco/Exception.h"
|
||||
#include "Poco/Data/LOB.h"
|
||||
#include "Poco/Data/StatementImpl.h"
|
||||
#include "Poco/Data/ODBC/Connector.h"
|
||||
#include "Poco/Data/ODBC/Utility.h"
|
||||
#include "Poco/Data/ODBC/Diagnostics.h"
|
||||
#include "Poco/Data/ODBC/ODBCException.h"
|
||||
#include "Poco/Data/ODBC/ODBCStatementImpl.h"
|
||||
#include <sqltypes.h>
|
||||
#include <iostream>
|
||||
|
||||
|
||||
using namespace Poco::Data::Keywords;
|
||||
using Poco::Data::DataException;
|
||||
using Poco::Data::ODBC::Utility;
|
||||
using Poco::Data::ODBC::ConnectionException;
|
||||
using Poco::Data::ODBC::StatementException;
|
||||
using Poco::Data::ODBC::StatementDiagnostics;
|
||||
using Poco::format;
|
||||
using Poco::Tuple;
|
||||
using Poco::Any;
|
||||
using Poco::AnyCast;
|
||||
using Poco::DynamicAny;
|
||||
using Poco::NotFoundException;
|
||||
|
||||
|
||||
#define DB2_ODBC_DRIVER "IBM DB2 ODBC DRIVER - DB2COPY1"
|
||||
#define DB2_DSN "PocoDataDB2Test"
|
||||
#define DB2_SERVER POCO_ODBC_TEST_DATABASE_SERVER
|
||||
#define DB2_PORT "50000"
|
||||
#define DB2_DB "POCOTEST"
|
||||
#define DB2_UID "db2admin"
|
||||
#define DB2_PWD "db2admin"
|
||||
|
||||
|
||||
ODBCTest::SessionPtr ODBCDB2Test::_pSession;
|
||||
ODBCTest::ExecPtr ODBCDB2Test::_pExecutor;
|
||||
std::string ODBCDB2Test::_driver = DB2_ODBC_DRIVER;
|
||||
std::string ODBCDB2Test::_dsn = DB2_DSN;
|
||||
std::string ODBCDB2Test::_uid = DB2_UID;
|
||||
std::string ODBCDB2Test::_pwd = DB2_PWD;
|
||||
std::string ODBCDB2Test::_connectString = "Driver=" DB2_ODBC_DRIVER ";"
|
||||
"Database=" DB2_DB ";"
|
||||
"Hostname=" DB2_SERVER ";"
|
||||
"Port=" DB2_PORT ";"
|
||||
"Protocol=TCPIP;"
|
||||
"Uid=" DB2_UID ";"
|
||||
"Pwd=" DB2_PWD ";";
|
||||
|
||||
|
||||
ODBCDB2Test::ODBCDB2Test(const std::string& name):
|
||||
ODBCTest(name, _pSession, _pExecutor, _dsn, _uid, _pwd, _connectString)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
ODBCDB2Test::~ODBCDB2Test()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void ODBCDB2Test::testBareboneODBC()
|
||||
{
|
||||
if (!_pSession) fail ("Test not available.");
|
||||
|
||||
std::string tableCreateString = "CREATE TABLE Test "
|
||||
"(First VARCHAR(30),"
|
||||
"Second VARCHAR(30),"
|
||||
"Third BLOB,"
|
||||
"Fourth INTEGER,"
|
||||
"Fifth FLOAT,"
|
||||
"Sixth TIMESTAMP)";
|
||||
|
||||
_pExecutor->bareboneODBCTest(dbConnString(), tableCreateString, SQLExecutor::PB_IMMEDIATE, SQLExecutor::DE_MANUAL);
|
||||
_pExecutor->bareboneODBCTest(dbConnString(), tableCreateString, SQLExecutor::PB_IMMEDIATE, SQLExecutor::DE_BOUND);
|
||||
_pExecutor->bareboneODBCTest(dbConnString(), tableCreateString, SQLExecutor::PB_AT_EXEC, SQLExecutor::DE_MANUAL);
|
||||
_pExecutor->bareboneODBCTest(dbConnString(), tableCreateString, SQLExecutor::PB_AT_EXEC, SQLExecutor::DE_BOUND);
|
||||
|
||||
|
||||
tableCreateString = "CREATE TABLE Test "
|
||||
"(First VARCHAR(30),"
|
||||
"Second INTEGER,"
|
||||
"Third FLOAT)";
|
||||
|
||||
_pExecutor->bareboneODBCMultiResultTest(dbConnString(), tableCreateString, SQLExecutor::PB_IMMEDIATE, SQLExecutor::DE_MANUAL);
|
||||
_pExecutor->bareboneODBCMultiResultTest(dbConnString(), tableCreateString, SQLExecutor::PB_IMMEDIATE, SQLExecutor::DE_BOUND);
|
||||
_pExecutor->bareboneODBCMultiResultTest(dbConnString(), tableCreateString, SQLExecutor::PB_AT_EXEC, SQLExecutor::DE_MANUAL);
|
||||
_pExecutor->bareboneODBCMultiResultTest(dbConnString(), tableCreateString, SQLExecutor::PB_AT_EXEC, SQLExecutor::DE_BOUND);
|
||||
}
|
||||
|
||||
|
||||
void ODBCDB2Test::testBLOB()
|
||||
{
|
||||
if (!_pSession) fail ("Test not available.");
|
||||
|
||||
const std::size_t maxFldSize = 1000000;
|
||||
_pSession->setProperty("maxFieldSize", Poco::Any(maxFldSize-1));
|
||||
recreatePersonBLOBTable();
|
||||
|
||||
try
|
||||
{
|
||||
_pExecutor->blob(maxFldSize);
|
||||
fail ("must fail");
|
||||
}
|
||||
catch (DataException&)
|
||||
{
|
||||
_pSession->setProperty("maxFieldSize", Poco::Any(maxFldSize));
|
||||
}
|
||||
|
||||
for (int i = 0; i < 8;)
|
||||
{
|
||||
recreatePersonBLOBTable();
|
||||
_pSession->setFeature("autoBind", bindValue(i));
|
||||
_pSession->setFeature("autoExtract", bindValue(i+1));
|
||||
_pExecutor->blob(maxFldSize);
|
||||
i += 2;
|
||||
}
|
||||
|
||||
recreatePersonBLOBTable();
|
||||
try
|
||||
{
|
||||
_pExecutor->blob(maxFldSize+1);
|
||||
fail ("must fail");
|
||||
}
|
||||
catch (DataException&) { }
|
||||
}
|
||||
|
||||
|
||||
void ODBCDB2Test::testFilter()
|
||||
{
|
||||
if (!_pSession) fail ("Test not available.");
|
||||
|
||||
for (int i = 0; i < 8;)
|
||||
{
|
||||
recreateVectorsTable();
|
||||
_pSession->setFeature("autoBind", bindValue(i));
|
||||
_pSession->setFeature("autoExtract", bindValue(i+1));
|
||||
_pExecutor->filter("SELECT * FROM Vectors ORDER BY i0 ASC", "i0");
|
||||
i += 2;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ODBCDB2Test::testStoredProcedure()
|
||||
{
|
||||
if (!_pSession) fail ("Test not available.");
|
||||
|
||||
for (int k = 0; k < 8;)
|
||||
{
|
||||
_pSession->setFeature("autoBind", bindValue(k));
|
||||
_pSession->setFeature("autoExtract", bindValue(k+1));
|
||||
|
||||
dropObject("PROCEDURE", "storedProcedure");
|
||||
*_pSession << "CREATE PROCEDURE storedProcedure(OUT outParam INTEGER) "
|
||||
"BEGIN "
|
||||
" SET outParam = -1; "
|
||||
"END" , now;
|
||||
|
||||
int i = 0;
|
||||
*_pSession << "{call storedProcedure(?)}", out(i), now;
|
||||
assertTrue (-1 == i);
|
||||
dropObject("PROCEDURE", "storedProcedure");
|
||||
|
||||
*_pSession << "CREATE PROCEDURE storedProcedure(inParam INTEGER, OUT outParam INTEGER) "
|
||||
"BEGIN "
|
||||
" SET outParam = inParam*inParam; "
|
||||
"END" , now;
|
||||
|
||||
|
||||
i = 2;
|
||||
int j = 0;
|
||||
*_pSession << "{call storedProcedure(?, ?)}", in(i), out(j), now;
|
||||
assertTrue (4 == j);
|
||||
dropObject("PROCEDURE", "storedProcedure");
|
||||
|
||||
*_pSession << "CREATE PROCEDURE storedProcedure(INOUT ioParam INTEGER) "
|
||||
"BEGIN "
|
||||
" SET ioParam = ioParam*ioParam; "
|
||||
"END" , now;
|
||||
|
||||
i = 2;
|
||||
*_pSession << "{call storedProcedure(?)}", io(i), now;
|
||||
assertTrue (4 == i);
|
||||
dropObject("PROCEDURE", "storedProcedure");
|
||||
|
||||
//TIMESTAMP is not supported as stored procedure parameter in DB2
|
||||
//(SQL0182N An expression with a datetime value or a labeled duration is not valid.)
|
||||
|
||||
*_pSession << "CREATE PROCEDURE storedProcedure(inParam VARCHAR(1000), OUT outParam VARCHAR(1000)) "
|
||||
"BEGIN "
|
||||
" SET outParam = inParam; "
|
||||
"END" , now;
|
||||
|
||||
std::string inParam =
|
||||
"1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
|
||||
"1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
|
||||
"1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
|
||||
"1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
|
||||
"1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
|
||||
"1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
|
||||
"1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
|
||||
"1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
|
||||
"1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890";
|
||||
std::string outParam;
|
||||
*_pSession << "{call storedProcedure(?,?)}", in(inParam), out(outParam), now;
|
||||
assertTrue (inParam == outParam);
|
||||
dropObject("PROCEDURE", "storedProcedure");
|
||||
|
||||
k += 2;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ODBCDB2Test::testStoredProcedureAny()
|
||||
{
|
||||
if (!_pSession) fail ("Test not available.");
|
||||
|
||||
for (int k = 0; k < 8;)
|
||||
{
|
||||
_pSession->setFeature("autoBind", bindValue(k));
|
||||
_pSession->setFeature("autoExtract", bindValue(k+1));
|
||||
|
||||
Any i = 2;
|
||||
Any j = 0;
|
||||
|
||||
*_pSession << "CREATE PROCEDURE storedProcedure(inParam INTEGER, OUT outParam INTEGER) "
|
||||
"BEGIN "
|
||||
" SET outParam = inParam*inParam; "
|
||||
"END" , now;
|
||||
|
||||
*_pSession << "{call storedProcedure(?, ?)}", in(i), out(j), now;
|
||||
assertTrue (4 == AnyCast<int>(j));
|
||||
*_pSession << "DROP PROCEDURE storedProcedure;", now;
|
||||
|
||||
*_pSession << "CREATE PROCEDURE storedProcedure(INOUT ioParam INTEGER) "
|
||||
"BEGIN "
|
||||
" SET ioParam = ioParam*ioParam; "
|
||||
"END" , now;
|
||||
|
||||
i = 2;
|
||||
*_pSession << "{call storedProcedure(?)}", io(i), now;
|
||||
assertTrue (4 == AnyCast<int>(i));
|
||||
dropObject("PROCEDURE", "storedProcedure");
|
||||
|
||||
k += 2;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ODBCDB2Test::testStoredProcedureDynamicAny()
|
||||
{
|
||||
if (!_pSession) fail ("Test not available.");
|
||||
|
||||
for (int k = 0; k < 8;)
|
||||
{
|
||||
_pSession->setFeature("autoBind", bindValue(k));
|
||||
|
||||
DynamicAny i = 2;
|
||||
DynamicAny j = 0;
|
||||
|
||||
*_pSession << "CREATE PROCEDURE storedProcedure(inParam INTEGER, OUT outParam INTEGER) "
|
||||
"BEGIN "
|
||||
" SET outParam = inParam*inParam; "
|
||||
"END" , now;
|
||||
|
||||
*_pSession << "{call storedProcedure(?, ?)}", in(i), out(j), now;
|
||||
assertTrue (4 == j);
|
||||
*_pSession << "DROP PROCEDURE storedProcedure;", now;
|
||||
|
||||
*_pSession << "CREATE PROCEDURE storedProcedure(INOUT ioParam INTEGER) "
|
||||
"BEGIN "
|
||||
" SET ioParam = ioParam*ioParam; "
|
||||
"END" , now;
|
||||
|
||||
i = 2;
|
||||
*_pSession << "{call storedProcedure(?)}", io(i), now;
|
||||
assertTrue (4 == i);
|
||||
dropObject("PROCEDURE", "storedProcedure");
|
||||
|
||||
k += 2;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ODBCDB2Test::testStoredFunction()
|
||||
{
|
||||
if (!_pSession) fail ("Test not available.");
|
||||
|
||||
for (int k = 0; k < 8;)
|
||||
{
|
||||
_pSession->setFeature("autoBind", bindValue(k));
|
||||
_pSession->setFeature("autoExtract", bindValue(k+1));
|
||||
|
||||
dropObject("PROCEDURE", "storedFunction");
|
||||
*_pSession << "CREATE PROCEDURE storedFunction() "
|
||||
"BEGIN "
|
||||
" RETURN -1; "
|
||||
"END" , now;
|
||||
|
||||
int i = 0;
|
||||
*_pSession << "{? = call storedFunction()}", out(i), now;
|
||||
assertTrue (-1 == i);
|
||||
dropObject("PROCEDURE", "storedFunction");
|
||||
|
||||
*_pSession << "CREATE PROCEDURE storedFunction(inParam INTEGER) "
|
||||
"BEGIN "
|
||||
" RETURN inParam*inParam; "
|
||||
"END" , now;
|
||||
|
||||
i = 2;
|
||||
int result = 0;
|
||||
*_pSession << "{? = call storedFunction(?)}", out(result), in(i), now;
|
||||
assertTrue (4 == result);
|
||||
dropObject("PROCEDURE", "storedFunction");
|
||||
|
||||
*_pSession << "CREATE PROCEDURE storedFunction(inParam INTEGER, OUT outParam INTEGER) "
|
||||
"BEGIN "
|
||||
" SET outParam = inParam*inParam; "
|
||||
" RETURN outParam; "
|
||||
"END" , now;
|
||||
|
||||
i = 2;
|
||||
int j = 0;
|
||||
result = 0;
|
||||
*_pSession << "{? = call storedFunction(?, ?)}", out(result), in(i), out(j), now;
|
||||
assertTrue (4 == j);
|
||||
assertTrue (j == result);
|
||||
dropObject("PROCEDURE", "storedFunction");
|
||||
|
||||
*_pSession << "CREATE PROCEDURE storedFunction(INOUT param1 INTEGER, INOUT param2 INTEGER) "
|
||||
"BEGIN "
|
||||
" DECLARE temp INTEGER;"
|
||||
" SET temp = param1; "
|
||||
" SET param1 = param2; "
|
||||
" SET param2 = temp; "
|
||||
" RETURN param1 + param2; "
|
||||
"END" , now;
|
||||
|
||||
i = 1;
|
||||
j = 2;
|
||||
result = 0;
|
||||
*_pSession << "{? = call storedFunction(?, ?)}", out(result), io(i), io(j), now;
|
||||
assertTrue (1 == j);
|
||||
assertTrue (2 == i);
|
||||
assertTrue (3 == result);
|
||||
|
||||
Tuple<int, int> params(1, 2);
|
||||
assertTrue (1 == params.get<0>());
|
||||
assertTrue (2 == params.get<1>());
|
||||
result = 0;
|
||||
*_pSession << "{? = call storedFunction(?, ?)}", out(result), io(params), now;
|
||||
assertTrue (1 == params.get<1>());
|
||||
assertTrue (2 == params.get<0>());
|
||||
assertTrue (3 == result);
|
||||
|
||||
dropObject("PROCEDURE", "storedFunction");
|
||||
|
||||
_pSession->setFeature("autoBind", true);
|
||||
|
||||
*_pSession << "CREATE PROCEDURE storedFunction(inParam VARCHAR(10), OUT outParam VARCHAR(10)) "
|
||||
"BEGIN "
|
||||
" SET outParam = inParam; "
|
||||
" RETURN LENGTH(outParam);"//DB2 allows only integer as return type
|
||||
"END" , now;
|
||||
|
||||
std::string inParam = "123456789";
|
||||
std::string outParam;
|
||||
int ret;
|
||||
*_pSession << "{? = call storedFunction(?,?)}", out(ret), in(inParam), out(outParam), now;
|
||||
assertTrue (inParam == outParam);
|
||||
assertTrue (ret == inParam.size());
|
||||
dropObject("PROCEDURE", "storedFunction");
|
||||
|
||||
k += 2;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ODBCDB2Test::dropObject(const std::string& type, const std::string& name)
|
||||
{
|
||||
try
|
||||
{
|
||||
*_pSession << format("DROP %s %s", type, name), now;
|
||||
}
|
||||
catch (StatementException& ex)
|
||||
{
|
||||
bool ignoreError = false;
|
||||
const StatementDiagnostics::FieldVec& flds = ex.diagnostics().fields();
|
||||
StatementDiagnostics::Iterator it = flds.begin();
|
||||
for (; it != flds.end(); ++it)
|
||||
{
|
||||
if (-204 == it->_nativeError)//(table does not exist)
|
||||
{
|
||||
ignoreError = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!ignoreError) throw;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ODBCDB2Test::recreateNullableTable()
|
||||
{
|
||||
dropObject("TABLE", "NullableTest");
|
||||
try { *_pSession << "CREATE TABLE NullableTest (EmptyString VARCHAR(30) NULL, EmptyInteger INTEGER NULL, EmptyFloat FLOAT NULL , EmptyDateTime TIMESTAMP NULL)", now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCDB2Test::recreatePersonTable()
|
||||
{
|
||||
dropObject("TABLE", "Person");
|
||||
try { *_pSession << "CREATE TABLE Person (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), Age INTEGER)", now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCDB2Test::recreatePersonBLOBTable()
|
||||
{
|
||||
dropObject("TABLE", "Person");
|
||||
try { *_pSession << "CREATE TABLE Person (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), Image BLOB)", now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonBLOBTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonBLOBTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCDB2Test::recreatePersonDateTable()
|
||||
{
|
||||
dropObject("TABLE", "Person");
|
||||
try { *_pSession << "CREATE TABLE Person (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), BornDate DATE)", now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonDateTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonDateTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCDB2Test::recreatePersonTimeTable()
|
||||
{
|
||||
dropObject("TABLE", "Person");
|
||||
try { *_pSession << "CREATE TABLE Person (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), BornTime TIME)", now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonTimeTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonTimeTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCDB2Test::recreatePersonDateTimeTable()
|
||||
{
|
||||
dropObject("TABLE", "Person");
|
||||
try { *_pSession << "CREATE TABLE Person (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), Born TIMESTAMP)", now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonDateTimeTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonDateTimeTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCDB2Test::recreateIntsTable()
|
||||
{
|
||||
dropObject("TABLE", "Strings");
|
||||
try { *_pSession << "CREATE TABLE Strings (str INTEGER)", now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateIntsTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateIntsTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCDB2Test::recreateStringsTable()
|
||||
{
|
||||
dropObject("TABLE", "Strings");
|
||||
try { *_pSession << "CREATE TABLE Strings (str VARCHAR(30))", now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateStringsTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateStringsTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCDB2Test::recreateFloatsTable()
|
||||
{
|
||||
dropObject("TABLE", "Strings");
|
||||
try { *_pSession << "CREATE TABLE Strings (str FLOAT)", now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateFloatsTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateFloatsTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCDB2Test::recreateTuplesTable()
|
||||
{
|
||||
dropObject("TABLE", "Tuples");
|
||||
try { *_pSession << "CREATE TABLE Tuples "
|
||||
"(int0 INTEGER, int1 INTEGER, int2 INTEGER, int3 INTEGER, int4 INTEGER, int5 INTEGER, int6 INTEGER, "
|
||||
"int7 INTEGER, int8 INTEGER, int9 INTEGER, int10 INTEGER, int11 INTEGER, int12 INTEGER, int13 INTEGER,"
|
||||
"int14 INTEGER, int15 INTEGER, int16 INTEGER, int17 INTEGER, int18 INTEGER, int19 INTEGER)", now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateTuplesTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateTuplesTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCDB2Test::recreateVectorsTable()
|
||||
{
|
||||
dropObject("TABLE", "Vectors");
|
||||
try { *_pSession << "CREATE TABLE Vectors (i0 INTEGER, flt0 FLOAT, str0 VARCHAR(30))", now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateVectorsTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateVectorsTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCDB2Test::recreateAnysTable()
|
||||
{
|
||||
dropObject("TABLE", "Anys");
|
||||
try { *_pSession << "CREATE TABLE Anys (i0 INTEGER, flt0 FLOAT, str0 VARCHAR(30))", now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateAnysTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateAnysTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCDB2Test::recreateNullsTable(const std::string& notNull)
|
||||
{
|
||||
dropObject("TABLE", "NullTest");
|
||||
try { *_pSession << format("CREATE TABLE NullTest (i INTEGER %s, r FLOAT %s, v VARCHAR(30) %s)",
|
||||
notNull,
|
||||
notNull,
|
||||
notNull), now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateNullsTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateNullsTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCDB2Test::recreateMiscTable()
|
||||
{
|
||||
dropObject("TABLE", "MiscTest");
|
||||
try
|
||||
{
|
||||
session() << "CREATE TABLE MiscTest "
|
||||
"(First VARCHAR(30),"
|
||||
"Second BLOB,"
|
||||
"Third INTEGER,"
|
||||
"Fourth FLOAT,"
|
||||
"Fifth TIMESTAMP)", now;
|
||||
} catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateMiscTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateMiscTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCDB2Test::recreateLogTable()
|
||||
{
|
||||
dropObject("TABLE", "T_POCO_LOG");
|
||||
dropObject("TABLE", "T_POCO_LOG_ARCHIVE");
|
||||
|
||||
try
|
||||
{
|
||||
std::string sql = "CREATE TABLE %s "
|
||||
"(Source VARCHAR(100),"
|
||||
"Name VARCHAR(100),"
|
||||
"ProcessId INTEGER,"
|
||||
"Thread VARCHAR(100), "
|
||||
"ThreadId INTEGER,"
|
||||
"Priority INTEGER,"
|
||||
"Text VARCHAR(100),"
|
||||
"DateTime TIMESTAMP)";
|
||||
|
||||
session() << sql, "T_POCO_LOG", now;
|
||||
session() << sql, "T_POCO_LOG_ARCHIVE", now;
|
||||
|
||||
} catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateLogTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateLogTable()"); }
|
||||
}
|
||||
|
||||
|
||||
CppUnit::Test* ODBCDB2Test::suite()
|
||||
{
|
||||
if ((_pSession = init(_driver, _dsn, _uid, _pwd, _connectString)))
|
||||
{
|
||||
std::cout << "*** Connected to [" << _driver << "] test database." << std::endl;
|
||||
|
||||
_pExecutor = new SQLExecutor(_driver + " SQL Executor", _pSession);
|
||||
|
||||
CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("ODBCDB2Test");
|
||||
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testBareboneODBC);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testZeroRows);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testSimpleAccess);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testComplexType);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testSimpleAccessVector);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testComplexTypeVector);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testSharedPtrComplexTypeVector);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testAutoPtrComplexTypeVector);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testInsertVector);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testInsertEmptyVector);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testSimpleAccessList);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testComplexTypeList);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testInsertList);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testInsertEmptyList);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testSimpleAccessDeque);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testComplexTypeDeque);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testInsertDeque);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testInsertEmptyDeque);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testAffectedRows);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testInsertSingleBulk);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testInsertSingleBulkVec);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testLimit);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testLimitOnce);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testLimitPrepare);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testLimitZero);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testPrepare);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testBulk);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testBulkPerformance);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testSetSimple);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testSetComplex);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testSetComplexUnique);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testMultiSetSimple);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testMultiSetComplex);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testMapComplex);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testMapComplexUnique);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testMultiMapComplex);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testSelectIntoSingle);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testSelectIntoSingleStep);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testSelectIntoSingleFail);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testLowerLimitOk);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testLowerLimitFail);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testCombinedLimits);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testCombinedIllegalLimits);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testRange);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testIllegalRange);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testSingleSelect);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testEmptyDB);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testBLOB);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testBLOBContainer);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testBLOBStmt);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testDate);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testTime);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testDateTime);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testFloat);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testDouble);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testTuple);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testTupleVector);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testInternalExtraction);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testFilter);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testInternalBulkExtraction);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testInternalStorageType);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testStoredProcedure);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testStoredProcedureAny);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testStoredProcedureDynamicAny);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testStoredFunction);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testNull);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testRowIterator);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testAsync);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testAny);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testDynamicAny);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testMultipleResults);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testSQLChannel);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testSQLLogger);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testSessionTransaction);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testTransaction);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testTransactor);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testNullable);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testReconnect);
|
||||
|
||||
return pSuite;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
//
|
||||
// ODBCDB2Test.h
|
||||
//
|
||||
// Definition of the ODBCDB2Test class.
|
||||
//
|
||||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#ifndef ODBCDB2Test_INCLUDED
|
||||
#define ODBCDB2Test_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Data/ODBC/ODBC.h"
|
||||
#include "ODBCTest.h"
|
||||
|
||||
|
||||
class ODBCDB2Test: public ODBCTest
|
||||
/// IBM DB2 UDB ODBC test class
|
||||
/// Tested:
|
||||
///
|
||||
/// Driver | DB | OS
|
||||
/// ------------+-------------------+------------------------------------------
|
||||
/// 9.01.00.356 | DB2 Express-C 9.1 | MS Windows XP Professional x64 v.2003/SP1
|
||||
{
|
||||
public:
|
||||
ODBCDB2Test(const std::string& name);
|
||||
~ODBCDB2Test();
|
||||
|
||||
void testBareboneODBC();
|
||||
|
||||
void testBLOB();
|
||||
void testFilter();
|
||||
|
||||
void testStoredProcedure();
|
||||
void testStoredProcedureAny();
|
||||
void testStoredProcedureDynamicAny();
|
||||
void testStoredFunction();
|
||||
|
||||
static CppUnit::Test* suite();
|
||||
|
||||
private:
|
||||
void dropObject(const std::string& type, const std::string& tableName);
|
||||
void recreateNullableTable();
|
||||
void recreatePersonTable();
|
||||
void recreatePersonBLOBTable();
|
||||
void recreatePersonDateTable();
|
||||
void recreatePersonTimeTable();
|
||||
void recreatePersonDateTimeTable();
|
||||
void recreateStringsTable();
|
||||
void recreateIntsTable();
|
||||
void recreateFloatsTable();
|
||||
void recreateTuplesTable();
|
||||
void recreateVectorsTable();
|
||||
void recreateAnysTable();
|
||||
void recreateNullsTable(const std::string& notNull = "");
|
||||
void recreateMiscTable();
|
||||
void recreateLogTable();
|
||||
|
||||
static ODBCTest::SessionPtr _pSession;
|
||||
static ODBCTest::ExecPtr _pExecutor;
|
||||
static std::string _driver;
|
||||
static std::string _dsn;
|
||||
static std::string _uid;
|
||||
static std::string _pwd;
|
||||
static std::string _connectString;
|
||||
};
|
||||
|
||||
|
||||
#endif // ODBCDB2Test_INCLUDED
|
||||
@@ -0,0 +1,504 @@
|
||||
//
|
||||
// ODBCMySQLTest.cpp
|
||||
//
|
||||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#include "ODBCMySQLTest.h"
|
||||
#include "ODBCTest.h"
|
||||
#include "CppUnit/TestCaller.h"
|
||||
#include "CppUnit/TestSuite.h"
|
||||
#include "Poco/String.h"
|
||||
#include "Poco/Format.h"
|
||||
#include "Poco/Tuple.h"
|
||||
#include "Poco/Exception.h"
|
||||
#include "Poco/Data/LOB.h"
|
||||
#include "Poco/Data/StatementImpl.h"
|
||||
#include "Poco/Data/ODBC/Connector.h"
|
||||
#include "Poco/Data/ODBC/Utility.h"
|
||||
#include "Poco/Data/ODBC/Diagnostics.h"
|
||||
#include "Poco/Data/ODBC/ODBCException.h"
|
||||
#include "Poco/Data/ODBC/ODBCStatementImpl.h"
|
||||
#include <sqltypes.h>
|
||||
#include <iostream>
|
||||
|
||||
|
||||
using namespace Poco::Data::Keywords;
|
||||
using Poco::Data::DataException;
|
||||
using Poco::Data::ODBC::Utility;
|
||||
using Poco::Data::ODBC::ConnectionException;
|
||||
using Poco::Data::ODBC::StatementException;
|
||||
using Poco::Data::ODBC::StatementDiagnostics;
|
||||
using Poco::format;
|
||||
using Poco::Tuple;
|
||||
using Poco::NotFoundException;
|
||||
|
||||
|
||||
#define MYSQL_ODBC_DRIVER "MySQL ODBC 5.3 Unicode Driver"
|
||||
#define MYSQL_DSN "PocoDataMySQLTest"
|
||||
#define MYSQL_SERVER POCO_ODBC_TEST_DATABASE_SERVER
|
||||
#define MYSQL_DB "test"
|
||||
#define MYSQL_UID "root"
|
||||
#define MYSQL_PWD "poco"
|
||||
#define MYSQL_DB "test"
|
||||
|
||||
|
||||
ODBCTest::SessionPtr ODBCMySQLTest::_pSession;
|
||||
ODBCTest::ExecPtr ODBCMySQLTest::_pExecutor;
|
||||
std::string ODBCMySQLTest::_driver = MYSQL_ODBC_DRIVER;
|
||||
std::string ODBCMySQLTest::_dsn = MYSQL_DSN;
|
||||
std::string ODBCMySQLTest::_uid = MYSQL_UID;
|
||||
std::string ODBCMySQLTest::_pwd = MYSQL_PWD;
|
||||
std::string ODBCMySQLTest::_db = MYSQL_DB;
|
||||
std::string ODBCMySQLTest::_connectString = "DRIVER={" MYSQL_ODBC_DRIVER "};"
|
||||
"DATABASE=" MYSQL_DB ";"
|
||||
"SERVER=" MYSQL_SERVER ";"
|
||||
"UID=" MYSQL_UID ";"
|
||||
"PWD=" MYSQL_PWD ";";
|
||||
|
||||
|
||||
ODBCMySQLTest::ODBCMySQLTest(const std::string& name):
|
||||
ODBCTest(name, _pSession, _pExecutor, _dsn, _uid, _pwd, _connectString)
|
||||
{
|
||||
_pExecutor->execute("SET @@global.sql_mode= '';"); // disable strict mode
|
||||
}
|
||||
|
||||
|
||||
ODBCMySQLTest::~ODBCMySQLTest()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void ODBCMySQLTest::testBareboneODBC()
|
||||
{
|
||||
if (!_pSession) fail ("Test not available.");
|
||||
|
||||
std::string tableCreateString = "CREATE TABLE Test "
|
||||
"(First VARCHAR(30),"
|
||||
"Second VARCHAR(30),"
|
||||
"Third VARBINARY(30),"
|
||||
"Fourth INTEGER,"
|
||||
"Fifth FLOAT,"
|
||||
"Sixth DATETIME)";
|
||||
|
||||
_pExecutor->bareboneODBCTest(dbConnString(), tableCreateString, SQLExecutor::PB_IMMEDIATE, SQLExecutor::DE_MANUAL);
|
||||
_pExecutor->bareboneODBCTest(dbConnString(), tableCreateString, SQLExecutor::PB_IMMEDIATE, SQLExecutor::DE_BOUND);
|
||||
_pExecutor->bareboneODBCTest(dbConnString(), tableCreateString, SQLExecutor::PB_AT_EXEC, SQLExecutor::DE_MANUAL);
|
||||
_pExecutor->bareboneODBCTest(dbConnString(), tableCreateString, SQLExecutor::PB_AT_EXEC, SQLExecutor::DE_BOUND);
|
||||
|
||||
/*
|
||||
MySQL supports batch statements as of 3.51.18
|
||||
(http://bugs.mysql.com/bug.php?id=7445)
|
||||
has different SQL syntax for it and behaves differently
|
||||
compared to other DBMS systems in regards to SQLMoreResults.
|
||||
So, we skip this test.
|
||||
|
||||
tableCreateString = "CREATE TABLE Test "
|
||||
"(First VARCHAR(30),"
|
||||
"Second INTEGER,"
|
||||
"Third FLOAT)";
|
||||
|
||||
std::string MULTI_INSERT = "INSERT INTO Test VALUES "
|
||||
"('1', 2, 3.5),"
|
||||
"('2', 3, 4.5),"
|
||||
"('3', 4, 5.5),"
|
||||
"('4', 5, 6.5),"
|
||||
"('5', 6, 7.5);";
|
||||
|
||||
_pExecutor->bareboneODBCMultiResultTest(dbConnString(), tableCreateString, SQLExecutor::PB_IMMEDIATE, SQLExecutor::DE_MANUAL, MULTI_INSERT);
|
||||
_pExecutor->bareboneODBCMultiResultTest(dbConnString(), tableCreateString, SQLExecutor::PB_IMMEDIATE, SQLExecutor::DE_BOUND, MULTI_INSERT);
|
||||
_pExecutor->bareboneODBCMultiResultTest(dbConnString(), tableCreateString, SQLExecutor::PB_AT_EXEC, SQLExecutor::DE_MANUAL, MULTI_INSERT);
|
||||
_pExecutor->bareboneODBCMultiResultTest(dbConnString(), tableCreateString, SQLExecutor::PB_AT_EXEC, SQLExecutor::DE_BOUND, MULTI_INSERT);
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
void ODBCMySQLTest::testBLOB()
|
||||
{
|
||||
if (!_pSession) fail ("Test not available.");
|
||||
|
||||
const std::size_t maxFldSize = 65534;
|
||||
_pSession->setProperty("maxFieldSize", Poco::Any(maxFldSize-1));
|
||||
recreatePersonBLOBTable();
|
||||
|
||||
try
|
||||
{
|
||||
_pExecutor->blob(maxFldSize);
|
||||
fail ("must fail");
|
||||
}
|
||||
catch (DataException&)
|
||||
{
|
||||
_pSession->setProperty("maxFieldSize", Poco::Any(maxFldSize));
|
||||
}
|
||||
|
||||
for (int i = 0; i < 8;)
|
||||
{
|
||||
recreatePersonBLOBTable();
|
||||
_pSession->setFeature("autoBind", bindValue(i));
|
||||
_pSession->setFeature("autoExtract", bindValue(i+1));
|
||||
_pExecutor->blob(maxFldSize);
|
||||
i += 2;
|
||||
}
|
||||
|
||||
recreatePersonBLOBTable();
|
||||
try
|
||||
{
|
||||
_pExecutor->blob(maxFldSize+1);
|
||||
fail ("must fail");
|
||||
}
|
||||
catch (DataException&) { }
|
||||
}
|
||||
|
||||
|
||||
void ODBCMySQLTest::testNull()
|
||||
{
|
||||
if (!_pSession) fail ("Test not available.");
|
||||
|
||||
// test for NOT NULL violation exception
|
||||
for (int i = 0; i < 8;)
|
||||
{
|
||||
recreateNullsTable("NOT NULL");
|
||||
_pSession->setFeature("autoBind", bindValue(i));
|
||||
_pSession->setFeature("autoExtract", bindValue(i+1));
|
||||
_pExecutor->notNulls("HY000");
|
||||
i += 2;
|
||||
}
|
||||
|
||||
// test for null insertion
|
||||
for (int i = 0; i < 8;)
|
||||
{
|
||||
recreateNullsTable();
|
||||
_pSession->setFeature("autoBind", bindValue(i));
|
||||
_pSession->setFeature("autoExtract", bindValue(i+1));
|
||||
_pExecutor->nulls();
|
||||
i += 2;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ODBCMySQLTest::testStoredProcedure()
|
||||
{
|
||||
//MySQL is currently buggy in this area:
|
||||
// http://bugs.mysql.com/bug.php?id=17898
|
||||
// http://bugs.mysql.com/bug.php?id=27632
|
||||
// Additionally, the standard ODBC stored procedure call syntax
|
||||
// {call storedProcedure(?)} is currently (3.51.12.00) not supported.
|
||||
// See http://bugs.mysql.com/bug.php?id=26535
|
||||
// Poco::Data support for MySQL ODBC is postponed until the above
|
||||
// issues are resolved.
|
||||
}
|
||||
|
||||
|
||||
void ODBCMySQLTest::testStoredFunction()
|
||||
{
|
||||
//MySQL is currently buggy in this area:
|
||||
// http://bugs.mysql.com/bug.php?id=17898
|
||||
// http://bugs.mysql.com/bug.php?id=27632
|
||||
// Additionally, the standard ODBC stored procedure call syntax
|
||||
// {call storedProcedure(?)} is currently (3.51.12.00) not supported.
|
||||
// See http://bugs.mysql.com/bug.php?id=26535
|
||||
// Poco::Data support for MySQL ODBC is postponed until the above
|
||||
// issues are resolved.
|
||||
}
|
||||
|
||||
|
||||
void ODBCMySQLTest::testMultipleResults()
|
||||
{
|
||||
/*
|
||||
MySQL supports batch statements as of 3.51.18
|
||||
http://bugs.mysql.com/bug.php?id=7445
|
||||
|
||||
if (!_pSession) fail ("Test not available.");
|
||||
|
||||
for (int i = 0; i < 8;)
|
||||
{
|
||||
recreatePersonTable();
|
||||
_pSession->setFeature("autoBind", bindValue(i));
|
||||
_pSession->setFeature("autoExtract", bindValue(i+1));
|
||||
_pExecutor->multipleResults();
|
||||
|
||||
i += 2;
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
void ODBCMySQLTest::testFilter()
|
||||
{
|
||||
if (!_pSession) fail ("Test not available.");
|
||||
|
||||
for (int i = 0; i < 8;)
|
||||
{
|
||||
recreateVectorsTable();
|
||||
_pSession->setFeature("autoBind", bindValue(i));
|
||||
_pSession->setFeature("autoExtract", bindValue(i+1));
|
||||
_pExecutor->filter("SELECT * FROM Vectors ORDER BY i0 ASC", "i0");
|
||||
i += 2;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ODBCMySQLTest::dropObject(const std::string& type, const std::string& name)
|
||||
{
|
||||
*_pSession << format("DROP %s IF EXISTS %s", type, name), now;
|
||||
}
|
||||
|
||||
|
||||
void ODBCMySQLTest::recreateNullableTable()
|
||||
{
|
||||
dropObject("TABLE", "NullableTest");
|
||||
try { *_pSession << "CREATE TABLE NullableTest (EmptyString VARCHAR(30) NULL, EmptyInteger INTEGER NULL, EmptyFloat FLOAT NULL , EmptyDateTime TIMESTAMP NULL)", now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCMySQLTest::recreatePersonTable()
|
||||
{
|
||||
dropObject("TABLE", "Person");
|
||||
try { *_pSession << "CREATE TABLE Person (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), Age INTEGER)", now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCMySQLTest::recreatePersonBLOBTable()
|
||||
{
|
||||
dropObject("TABLE", "Person");
|
||||
try { *_pSession << "CREATE TABLE Person (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), Image BLOB)", now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonBLOBTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonBLOBTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCMySQLTest::recreatePersonDateTable()
|
||||
{
|
||||
dropObject("TABLE", "Person");
|
||||
try { *_pSession << "CREATE TABLE Person (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), BornDate DATE)", now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonDateTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonDateTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCMySQLTest::recreatePersonTimeTable()
|
||||
{
|
||||
dropObject("TABLE", "Person");
|
||||
try { *_pSession << "CREATE TABLE Person (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), BornTime TIME)", now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonTimeTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonTimeTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCMySQLTest::recreatePersonDateTimeTable()
|
||||
{
|
||||
dropObject("TABLE", "Person");
|
||||
try { *_pSession << "CREATE TABLE Person (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), Born DATETIME)", now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonDateTimeTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonDateTimeTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCMySQLTest::recreateIntsTable()
|
||||
{
|
||||
dropObject("TABLE", "Strings");
|
||||
try { *_pSession << "CREATE TABLE Strings (str INTEGER)", now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateIntsTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateIntsTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCMySQLTest::recreateStringsTable()
|
||||
{
|
||||
dropObject("TABLE", "Strings");
|
||||
try { *_pSession << "CREATE TABLE Strings (str VARCHAR(30))", now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateStringsTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateStringsTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCMySQLTest::recreateFloatsTable()
|
||||
{
|
||||
dropObject("TABLE", "Strings");
|
||||
try { *_pSession << "CREATE TABLE Strings (str FLOAT)", now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateFloatsTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateFloatsTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCMySQLTest::recreateTuplesTable()
|
||||
{
|
||||
dropObject("TABLE", "Tuples");
|
||||
try { *_pSession << "CREATE TABLE Tuples "
|
||||
"(i0 INTEGER, i1 INTEGER, i2 INTEGER, i3 INTEGER, i4 INTEGER, i5 INTEGER, i6 INTEGER, "
|
||||
"i7 INTEGER, i8 INTEGER, i9 INTEGER, i10 INTEGER, i11 INTEGER, i12 INTEGER, i13 INTEGER,"
|
||||
"i14 INTEGER, i15 INTEGER, i16 INTEGER, i17 INTEGER, i18 INTEGER, i19 INTEGER)", now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateTuplesTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateTuplesTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCMySQLTest::recreateVectorsTable()
|
||||
{
|
||||
dropObject("TABLE", "Vectors");
|
||||
try { *_pSession << "CREATE TABLE Vectors (i0 INTEGER, flt0 FLOAT, str0 VARCHAR(30))", now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateVectorsTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateVectorsTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCMySQLTest::recreateAnysTable()
|
||||
{
|
||||
dropObject("TABLE", "Anys");
|
||||
try { *_pSession << "CREATE TABLE Anys (i0 INTEGER, flt0 DOUBLE, str0 VARCHAR(30))", now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateAnysTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateAnysTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCMySQLTest::recreateNullsTable(const std::string& notNull)
|
||||
{
|
||||
dropObject("TABLE", "NullTest");
|
||||
try { *_pSession << format("CREATE TABLE NullTest (i INTEGER %s, r FLOAT %s, v VARCHAR(30) %s)",
|
||||
notNull,
|
||||
notNull,
|
||||
notNull), now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateNullsTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateNullsTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCMySQLTest::recreateMiscTable()
|
||||
{
|
||||
dropObject("TABLE", "MiscTest");
|
||||
try { *_pSession << "CREATE TABLE MiscTest "
|
||||
"(First VARCHAR(30),"
|
||||
"Second VARBINARY(30),"
|
||||
"Third INTEGER,"
|
||||
"Fourth FLOAT,"
|
||||
"Fifth DATETIME)", now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateNullsTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateNullsTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCMySQLTest::recreateLogTable()
|
||||
{
|
||||
dropObject("TABLE", "T_POCO_LOG");
|
||||
dropObject("TABLE", "T_POCO_LOG_ARCHIVE");
|
||||
|
||||
try
|
||||
{
|
||||
std::string sql = "CREATE TABLE %s "
|
||||
"(Source VARCHAR(100),"
|
||||
"Name VARCHAR(100),"
|
||||
"ProcessId INTEGER,"
|
||||
"Thread VARCHAR(100), "
|
||||
"ThreadId INTEGER,"
|
||||
"Priority INTEGER,"
|
||||
"Text VARCHAR(100),"
|
||||
"DateTime DATETIME)";
|
||||
|
||||
session() << sql, "T_POCO_LOG", now;
|
||||
session() << sql, "T_POCO_LOG_ARCHIVE", now;
|
||||
|
||||
} catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateLogTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateLogTable()"); }
|
||||
}
|
||||
|
||||
|
||||
CppUnit::Test* ODBCMySQLTest::suite()
|
||||
{
|
||||
if ((_pSession = init(_driver, _dsn, _uid, _pwd, _connectString, _db)))
|
||||
{
|
||||
std::cout << "*** Connected to [" << _driver << "] test database." << std::endl;
|
||||
|
||||
_pExecutor = new SQLExecutor(_driver + " SQL Executor", _pSession);
|
||||
|
||||
CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("ODBCMySQLTest");
|
||||
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testBareboneODBC);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testZeroRows);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testSimpleAccess);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testComplexType);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testSimpleAccessVector);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testComplexTypeVector);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testSharedPtrComplexTypeVector);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testAutoPtrComplexTypeVector);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testInsertVector);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testInsertEmptyVector);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testSimpleAccessList);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testComplexTypeList);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testInsertList);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testInsertEmptyList);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testSimpleAccessDeque);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testComplexTypeDeque);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testInsertDeque);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testInsertEmptyDeque);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testAffectedRows);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testInsertSingleBulk);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testInsertSingleBulkVec);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testLimit);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testLimitOnce);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testLimitPrepare);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testLimitZero);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testPrepare);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testBulk);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testBulkPerformance);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testSetSimple);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testSetComplex);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testSetComplexUnique);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testMultiSetSimple);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testMultiSetComplex);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testMapComplex);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testMapComplexUnique);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testMultiMapComplex);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testSelectIntoSingle);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testSelectIntoSingleStep);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testSelectIntoSingleFail);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testLowerLimitOk);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testLowerLimitFail);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testCombinedLimits);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testCombinedIllegalLimits);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testRange);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testIllegalRange);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testSingleSelect);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testEmptyDB);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testBLOB);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testBLOBContainer);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testBLOBStmt);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testDate);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testTime);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testDateTime);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testFloat);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testDouble);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testTuple);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testTupleVector);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testStoredProcedure);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testStoredFunction);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testInternalExtraction);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testFilter);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testInternalBulkExtraction);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testInternalStorageType);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testNull);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testRowIterator);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testAsync);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testAny);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testDynamicAny);
|
||||
//CppUnit_addTest(pSuite, ODBCMySQLTest, testMultipleResults);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testSQLChannel);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testSQLLogger);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testSessionTransaction);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testTransaction);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testTransactor);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testNullable);
|
||||
CppUnit_addTest(pSuite, ODBCMySQLTest, testReconnect);
|
||||
|
||||
return pSuite;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
//
|
||||
// ODBCMySQLTest.h
|
||||
//
|
||||
// Definition of the ODBCMySQLTest class.
|
||||
//
|
||||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#ifndef ODBCMySQLTest_INCLUDED
|
||||
#define ODBCMySQLTest_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Data/ODBC/ODBC.h"
|
||||
#include "ODBCTest.h"
|
||||
|
||||
|
||||
class ODBCMySQLTest: public ODBCTest
|
||||
/// MySQL ODBC test class
|
||||
/// Tested:
|
||||
///
|
||||
/// Driver | DB | OS | Driver Manager
|
||||
/// ----------------+---------------------------+-------------------------------------------+---------------------
|
||||
/// 03.51.12.00 | MySQL 5.0.27-community-nt | MS Windows XP Professional x64 v.2003/SP1 | 3.526.3959.0
|
||||
/// 3.51.11.-6 | MySQL 5.0.27-community-nt | Ubuntu 7.04 (2.6.20-15-generic #2 SMP) | unixODBC 2.2.11.-13
|
||||
///
|
||||
|
||||
{
|
||||
public:
|
||||
ODBCMySQLTest(const std::string& name);
|
||||
~ODBCMySQLTest();
|
||||
|
||||
void testBareboneODBC();
|
||||
|
||||
void testBLOB();
|
||||
|
||||
void testStoredProcedure();
|
||||
void testStoredFunction();
|
||||
|
||||
void testNull();
|
||||
|
||||
void testMultipleResults();
|
||||
void testFilter();
|
||||
|
||||
static CppUnit::Test* suite();
|
||||
|
||||
private:
|
||||
void dropObject(const std::string& type, const std::string& name);
|
||||
void recreateNullableTable();
|
||||
void recreatePersonTable();
|
||||
void recreatePersonBLOBTable();
|
||||
void recreatePersonDateTable();
|
||||
void recreatePersonTimeTable();
|
||||
void recreatePersonDateTimeTable();
|
||||
void recreateStringsTable();
|
||||
void recreateIntsTable();
|
||||
void recreateFloatsTable();
|
||||
void recreateTuplesTable();
|
||||
void recreateVectorsTable();
|
||||
void recreateAnysTable();
|
||||
void recreateNullsTable(const std::string& notNull = "");
|
||||
void recreateMiscTable();
|
||||
void recreateLogTable();
|
||||
|
||||
static ODBCTest::SessionPtr _pSession;
|
||||
static ODBCTest::ExecPtr _pExecutor;
|
||||
static std::string _driver;
|
||||
static std::string _dsn;
|
||||
static std::string _uid;
|
||||
static std::string _pwd;
|
||||
static std::string _db;
|
||||
static std::string _connectString;
|
||||
};
|
||||
|
||||
|
||||
#endif // ODBCMySQLTest_INCLUDED
|
||||
@@ -0,0 +1,943 @@
|
||||
//
|
||||
// ODBCOracleTest.cpp
|
||||
//
|
||||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#include "ODBCOracleTest.h"
|
||||
#include "CppUnit/TestCaller.h"
|
||||
#include "CppUnit/TestSuite.h"
|
||||
#include "Poco/String.h"
|
||||
#include "Poco/Tuple.h"
|
||||
#include "Poco/Format.h"
|
||||
#include "Poco/Any.h"
|
||||
#include "Poco/DynamicAny.h"
|
||||
#include "Poco/DateTime.h"
|
||||
#include "Poco/Data/RecordSet.h"
|
||||
#include "Poco/Data/AutoTransaction.h"
|
||||
#include "Poco/Data/ODBC/Diagnostics.h"
|
||||
#include "Poco/Data/ODBC/ODBCException.h"
|
||||
|
||||
|
||||
using namespace Poco::Data::Keywords;
|
||||
using Poco::Data::DataException;
|
||||
using Poco::Data::Statement;
|
||||
using Poco::Data::RecordSet;
|
||||
using Poco::Data::AutoTransaction;
|
||||
using Poco::Data::Session;
|
||||
using Poco::Data::ODBC::Utility;
|
||||
using Poco::Data::ODBC::ConnectionException;
|
||||
using Poco::Data::ODBC::StatementException;
|
||||
using Poco::Data::ODBC::StatementDiagnostics;
|
||||
using Poco::format;
|
||||
using Poco::Tuple;
|
||||
using Poco::Any;
|
||||
using Poco::AnyCast;
|
||||
using Poco::DynamicAny;
|
||||
using Poco::DateTime;
|
||||
|
||||
|
||||
#define ORACLE_ODBC_DRIVER "Oracle in XE"
|
||||
#define ORACLE_DSN "PocoDataOracleTest"
|
||||
#define ORACLE_SERVER POCO_ODBC_TEST_DATABASE_SERVER
|
||||
#define ORACLE_PORT "1521"
|
||||
#define ORACLE_SID "XE"
|
||||
#define ORACLE_UID "poco"
|
||||
#define ORACLE_PWD "poco"
|
||||
|
||||
|
||||
ODBCTest::SessionPtr ODBCOracleTest::_pSession;
|
||||
ODBCTest::ExecPtr ODBCOracleTest::_pExecutor;
|
||||
std::string ODBCOracleTest::_driver = ORACLE_ODBC_DRIVER;
|
||||
std::string ODBCOracleTest::_dsn = ORACLE_DSN;
|
||||
std::string ODBCOracleTest::_uid = ORACLE_UID;
|
||||
std::string ODBCOracleTest::_pwd = ORACLE_PWD;
|
||||
std::string ODBCOracleTest::_connectString = "DRIVER={" ORACLE_ODBC_DRIVER "};"
|
||||
"DBQ=" ORACLE_SERVER ":" ORACLE_PORT "/" ORACLE_SID ";"
|
||||
"UID=" ORACLE_UID ";"
|
||||
"PWD=" ORACLE_PWD ";"
|
||||
"TLO=O;" // translation option
|
||||
"FBS=60000;" // fetch buffer size (bytes), default 60000
|
||||
"FWC=F;" // force SQL_WCHAR support (T/F), default F
|
||||
"CSR=F;" // close cursor (T/F), default F
|
||||
"MDI=T;" // metadata ID (SQL_ATTR_METADATA_ID) (T/F), default T
|
||||
"MTS=F;" // Microsoft Transaction Server support (T/F)
|
||||
"DPM=F;" // disable SQLDescribeParam (T/F), default F
|
||||
"NUM=NLS;" // numeric settings (NLS implies Globalization Support)
|
||||
"BAM=IfAllSuccessful;" // batch autocommit, (IfAllSuccessful/UpToFirstFailure/AllSuccessful), default IfAllSuccessful
|
||||
"BTD=F;" // bind timestamp as date (T/F), default F
|
||||
"RST=T;" // resultsets (T/F), default T
|
||||
"LOB=T;" // LOB writes (T/F), default T
|
||||
"FDL=0;" // failover delay (default 10)
|
||||
"FRC=0;" // failover retry count (default 10)
|
||||
"QTO=T;" // query timout option (T/F), default T
|
||||
"FEN=F;" // failover (T/F), default T
|
||||
"XSM=Default;" // schema field (Default/Database/Owner), default Default
|
||||
"EXC=F;" // EXEC syntax (T/F), default F
|
||||
"APA=T;" // thread safety (T/F), default T
|
||||
"DBA=W;"; // write access (R/W)
|
||||
|
||||
const std::string ODBCOracleTest::MULTI_INSERT =
|
||||
"BEGIN "
|
||||
"INSERT INTO Test VALUES ('1', 2, 3.5);"
|
||||
"INSERT INTO Test VALUES ('2', 3, 4.5);"
|
||||
"INSERT INTO Test VALUES ('3', 4, 5.5);"
|
||||
"INSERT INTO Test VALUES ('4', 5, 6.5);"
|
||||
"INSERT INTO Test VALUES ('5', 6, 7.5);"
|
||||
"END;";
|
||||
|
||||
const std::string ODBCOracleTest::MULTI_SELECT =
|
||||
"{CALL multiResultsProcedure()}";
|
||||
|
||||
|
||||
ODBCOracleTest::ODBCOracleTest(const std::string& name):
|
||||
ODBCTest(name, _pSession, _pExecutor, _dsn, _uid, _pwd, _connectString)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
ODBCOracleTest::~ODBCOracleTest()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void ODBCOracleTest::testBarebone()
|
||||
{
|
||||
std::string tableCreateString = "CREATE TABLE Test "
|
||||
"(First VARCHAR(30),"
|
||||
"Second VARCHAR(30),"
|
||||
"Third BLOB,"
|
||||
"Fourth INTEGER,"
|
||||
"Fifth NUMBER,"
|
||||
"Sixth TIMESTAMP)";
|
||||
|
||||
_pExecutor->bareboneODBCTest(_connectString, tableCreateString, SQLExecutor::PB_IMMEDIATE, SQLExecutor::DE_MANUAL);
|
||||
_pExecutor->bareboneODBCTest(_connectString, tableCreateString, SQLExecutor::PB_IMMEDIATE, SQLExecutor::DE_BOUND);
|
||||
_pExecutor->bareboneODBCTest(_connectString, tableCreateString, SQLExecutor::PB_AT_EXEC, SQLExecutor::DE_MANUAL);
|
||||
_pExecutor->bareboneODBCTest(_connectString, tableCreateString, SQLExecutor::PB_AT_EXEC, SQLExecutor::DE_BOUND);
|
||||
|
||||
tableCreateString = "CREATE TABLE Test "
|
||||
"(First VARCHAR(30),"
|
||||
"Second INTEGER,"
|
||||
"Third NUMBER)";
|
||||
|
||||
*_pSession << "CREATE OR REPLACE "
|
||||
"PROCEDURE multiResultsProcedure(ret1 OUT SYS_REFCURSOR, "
|
||||
"ret2 OUT SYS_REFCURSOR,"
|
||||
"ret3 OUT SYS_REFCURSOR,"
|
||||
"ret4 OUT SYS_REFCURSOR,"
|
||||
"ret5 OUT SYS_REFCURSOR) IS "
|
||||
"BEGIN "
|
||||
"OPEN ret1 FOR SELECT * FROM Test WHERE First = '1';"
|
||||
"OPEN ret2 FOR SELECT * FROM Test WHERE First = '2';"
|
||||
"OPEN ret3 FOR SELECT * FROM Test WHERE First = '3';"
|
||||
"OPEN ret4 FOR SELECT * FROM Test WHERE First = '4';"
|
||||
"OPEN ret5 FOR SELECT * FROM Test WHERE First = '5';"
|
||||
"END multiResultsProcedure;" , now;
|
||||
|
||||
_pExecutor->bareboneODBCMultiResultTest(_connectString,
|
||||
tableCreateString,
|
||||
SQLExecutor::PB_IMMEDIATE,
|
||||
SQLExecutor::DE_MANUAL,
|
||||
MULTI_INSERT,
|
||||
MULTI_SELECT);
|
||||
_pExecutor->bareboneODBCMultiResultTest(_connectString,
|
||||
tableCreateString,
|
||||
SQLExecutor::PB_IMMEDIATE,
|
||||
SQLExecutor::DE_BOUND,
|
||||
MULTI_INSERT,
|
||||
MULTI_SELECT);
|
||||
_pExecutor->bareboneODBCMultiResultTest(_connectString,
|
||||
tableCreateString,
|
||||
SQLExecutor::PB_AT_EXEC,
|
||||
SQLExecutor::DE_MANUAL,
|
||||
MULTI_INSERT,
|
||||
MULTI_SELECT);
|
||||
_pExecutor->bareboneODBCMultiResultTest(_connectString,
|
||||
tableCreateString,
|
||||
SQLExecutor::PB_AT_EXEC,
|
||||
SQLExecutor::DE_BOUND,
|
||||
MULTI_INSERT,
|
||||
MULTI_SELECT);
|
||||
|
||||
}
|
||||
|
||||
|
||||
void ODBCOracleTest::testBLOB()
|
||||
{
|
||||
const std::size_t maxFldSize = 1000000;
|
||||
session().setProperty("maxFieldSize", Poco::Any(maxFldSize-1));
|
||||
recreatePersonBLOBTable();
|
||||
|
||||
try
|
||||
{
|
||||
executor().blob(maxFldSize);
|
||||
fail ("must fail");
|
||||
}
|
||||
catch (DataException&)
|
||||
{
|
||||
session().setProperty("maxFieldSize", Poco::Any(maxFldSize));
|
||||
}
|
||||
|
||||
for (int i = 0; i < 8;)
|
||||
{
|
||||
recreatePersonBLOBTable();
|
||||
session().setFeature("autoBind", bindValue(i));
|
||||
session().setFeature("autoExtract", bindValue(i+1));
|
||||
executor().blob(maxFldSize);
|
||||
i += 2;
|
||||
}
|
||||
|
||||
recreatePersonBLOBTable();
|
||||
try
|
||||
{
|
||||
executor().blob(maxFldSize+1);
|
||||
fail ("must fail");
|
||||
}
|
||||
catch (DataException&) { }
|
||||
}
|
||||
|
||||
|
||||
void ODBCOracleTest::testNull()
|
||||
{
|
||||
// test for NOT NULL violation exception
|
||||
for (int i = 0; i < 8;)
|
||||
{
|
||||
recreateNullsTable("NOT NULL");
|
||||
session().setFeature("autoBind", bindValue(i));
|
||||
session().setFeature("autoExtract", bindValue(i+1));
|
||||
executor().notNulls("HY000");
|
||||
i += 2;
|
||||
}
|
||||
|
||||
// test for null insertion
|
||||
for (int i = 0; i < 8;)
|
||||
{
|
||||
recreateNullsTable();
|
||||
session().setFeature("autoBind", bindValue(i));
|
||||
session().setFeature("autoExtract", bindValue(i+1));
|
||||
executor().nulls();
|
||||
i += 2;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ODBCOracleTest::testStoredProcedure()
|
||||
{
|
||||
for (int k = 0; k < 8;)
|
||||
{
|
||||
session().setFeature("autoBind", bindValue(k));
|
||||
session().setFeature("autoExtract", bindValue(k+1));
|
||||
|
||||
*_pSession << "CREATE OR REPLACE "
|
||||
"PROCEDURE storedProcedure(outParam OUT NUMBER) IS "
|
||||
" BEGIN outParam := -1; "
|
||||
"END storedProcedure;" , now;
|
||||
|
||||
int i = 0;
|
||||
*_pSession << "{call storedProcedure(?)}", out(i), now;
|
||||
assertTrue (-1 == i);
|
||||
dropObject("PROCEDURE", "storedProcedure");
|
||||
|
||||
*_pSession << "CREATE OR REPLACE "
|
||||
"PROCEDURE storedProcedure(inParam IN NUMBER, outParam OUT NUMBER) IS "
|
||||
" BEGIN outParam := inParam*inParam; "
|
||||
"END storedProcedure;" , now;
|
||||
|
||||
i = 2;
|
||||
int j = 0;
|
||||
*_pSession << "{call storedProcedure(?, ?)}", in(i), out(j), now;
|
||||
assertTrue (4 == j);
|
||||
*_pSession << "DROP PROCEDURE storedProcedure;", now;
|
||||
|
||||
*_pSession << "CREATE OR REPLACE "
|
||||
"PROCEDURE storedProcedure(ioParam IN OUT NUMBER) IS "
|
||||
" BEGIN ioParam := ioParam*ioParam; "
|
||||
" END storedProcedure;" , now;
|
||||
|
||||
i = 2;
|
||||
*_pSession << "{call storedProcedure(?)}", io(i), now;
|
||||
assertTrue (4 == i);
|
||||
dropObject("PROCEDURE", "storedProcedure");
|
||||
|
||||
*_pSession << "CREATE OR REPLACE "
|
||||
"PROCEDURE storedProcedure(ioParam IN OUT DATE) IS "
|
||||
" BEGIN ioParam := ioParam + 1; "
|
||||
" END storedProcedure;" , now;
|
||||
|
||||
DateTime dt(1965, 6, 18, 5, 35, 1);
|
||||
*_pSession << "{call storedProcedure(?)}", io(dt), now;
|
||||
assertTrue (19 == dt.day());
|
||||
dropObject("PROCEDURE", "storedProcedure");
|
||||
|
||||
k += 2;
|
||||
}
|
||||
|
||||
|
||||
//strings only work with auto-binding
|
||||
session().setFeature("autoBind", true);
|
||||
|
||||
*_pSession << "CREATE OR REPLACE "
|
||||
"PROCEDURE storedProcedure(inParam IN VARCHAR2, outParam OUT VARCHAR2) IS "
|
||||
" BEGIN outParam := inParam; "
|
||||
"END storedProcedure;" , now;
|
||||
|
||||
std::string inParam =
|
||||
"1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
|
||||
"1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
|
||||
"1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
|
||||
"1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
|
||||
"1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
|
||||
"1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
|
||||
"1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
|
||||
"1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
|
||||
"1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890";
|
||||
std::string outParam;
|
||||
*_pSession << "{call storedProcedure(?,?)}", in(inParam), out(outParam), now;
|
||||
assertTrue (inParam == outParam);
|
||||
dropObject("PROCEDURE", "storedProcedure");
|
||||
}
|
||||
|
||||
|
||||
void ODBCOracleTest::testStoredProcedureAny()
|
||||
{
|
||||
for (int k = 0; k < 8;)
|
||||
{
|
||||
session().setFeature("autoBind", bindValue(k));
|
||||
session().setFeature("autoExtract", bindValue(k+1));
|
||||
|
||||
Any i = 2;
|
||||
Any j = 0;
|
||||
|
||||
*_pSession << "CREATE OR REPLACE "
|
||||
"PROCEDURE storedProcedure(inParam IN NUMBER, outParam OUT NUMBER) IS "
|
||||
" BEGIN outParam := inParam*inParam; "
|
||||
"END storedProcedure;" , now;
|
||||
|
||||
*_pSession << "{call storedProcedure(?, ?)}", in(i), out(j), now;
|
||||
assertTrue (4 == AnyCast<int>(j));
|
||||
*_pSession << "DROP PROCEDURE storedProcedure;", now;
|
||||
|
||||
*_pSession << "CREATE OR REPLACE "
|
||||
"PROCEDURE storedProcedure(ioParam IN OUT NUMBER) IS "
|
||||
" BEGIN ioParam := ioParam*ioParam; "
|
||||
" END storedProcedure;" , now;
|
||||
|
||||
i = 2;
|
||||
*_pSession << "{call storedProcedure(?)}", io(i), now;
|
||||
assertTrue (4 == AnyCast<int>(i));
|
||||
dropObject("PROCEDURE", "storedProcedure");
|
||||
|
||||
k += 2;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ODBCOracleTest::testStoredProcedureDynamicAny()
|
||||
{
|
||||
for (int k = 0; k < 8;)
|
||||
{
|
||||
session().setFeature("autoBind", bindValue(k));
|
||||
|
||||
DynamicAny i = 2;
|
||||
DynamicAny j = 0;
|
||||
|
||||
*_pSession << "CREATE OR REPLACE "
|
||||
"PROCEDURE storedProcedure(inParam IN NUMBER, outParam OUT NUMBER) IS "
|
||||
" BEGIN outParam := inParam*inParam; "
|
||||
"END storedProcedure;" , now;
|
||||
|
||||
*_pSession << "{call storedProcedure(?, ?)}", in(i), out(j), now;
|
||||
assertTrue (4 == j);
|
||||
*_pSession << "DROP PROCEDURE storedProcedure;", now;
|
||||
|
||||
*_pSession << "CREATE OR REPLACE "
|
||||
"PROCEDURE storedProcedure(ioParam IN OUT NUMBER) IS "
|
||||
" BEGIN ioParam := ioParam*ioParam; "
|
||||
" END storedProcedure;" , now;
|
||||
|
||||
i = 2;
|
||||
*_pSession << "{call storedProcedure(?)}", io(i), now;
|
||||
assertTrue (4 == i);
|
||||
dropObject("PROCEDURE", "storedProcedure");
|
||||
|
||||
k += 2;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ODBCOracleTest::testCursorStoredProcedure()
|
||||
{
|
||||
for (int k = 0; k < 8;)
|
||||
{
|
||||
session().setFeature("autoBind", bindValue(k));
|
||||
session().setFeature("autoExtract", bindValue(k+1));
|
||||
|
||||
recreatePersonTable();
|
||||
typedef Tuple<std::string, std::string, std::string, int> Person;
|
||||
std::vector<Person> people;
|
||||
people.push_back(Person("Simpson", "Homer", "Springfield", 42));
|
||||
people.push_back(Person("Simpson", "Bart", "Springfield", 12));
|
||||
people.push_back(Person("Simpson", "Lisa", "Springfield", 10));
|
||||
*_pSession << "INSERT INTO Person VALUES (?, ?, ?, ?)", use(people), now;
|
||||
|
||||
*_pSession << "CREATE OR REPLACE "
|
||||
"PROCEDURE storedCursorProcedure(ret OUT SYS_REFCURSOR, ageLimit IN NUMBER) IS "
|
||||
" BEGIN "
|
||||
" OPEN ret FOR "
|
||||
" SELECT * "
|
||||
" FROM Person "
|
||||
" WHERE Age < ageLimit "
|
||||
" ORDER BY Age DESC; "
|
||||
" END storedCursorProcedure;" , now;
|
||||
|
||||
people.clear();
|
||||
int age = 13;
|
||||
|
||||
*_pSession << "{call storedCursorProcedure(?)}", in(age), into(people), now;
|
||||
|
||||
assertTrue (2 == people.size());
|
||||
assertTrue (Person("Simpson", "Bart", "Springfield", 12) == people[0]);
|
||||
assertTrue (Person("Simpson", "Lisa", "Springfield", 10) == people[1]);
|
||||
|
||||
Statement stmt = ((*_pSession << "{call storedCursorProcedure(?)}", in(age), now));
|
||||
RecordSet rs(stmt);
|
||||
assertTrue (rs["LastName"] == "Simpson");
|
||||
assertTrue (rs["FirstName"] == "Bart");
|
||||
assertTrue (rs["Address"] == "Springfield");
|
||||
assertTrue (rs["Age"] == 12);
|
||||
|
||||
dropObject("TABLE", "Person");
|
||||
dropObject("PROCEDURE", "storedCursorProcedure");
|
||||
|
||||
k += 2;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ODBCOracleTest::testStoredFunction()
|
||||
{
|
||||
for (int k = 0; k < 8;)
|
||||
{
|
||||
session().setFeature("autoBind", bindValue(k));
|
||||
session().setFeature("autoExtract", bindValue(k+1));
|
||||
|
||||
try{
|
||||
*_pSession << "CREATE OR REPLACE "
|
||||
"FUNCTION storedFunction RETURN NUMBER IS "
|
||||
" BEGIN return(-1); "
|
||||
" END storedFunction;" , now;
|
||||
}catch(StatementException& se) { std::cout << se.toString() << std::endl; }
|
||||
|
||||
int i = 0;
|
||||
*_pSession << "{? = call storedFunction()}", out(i), now;
|
||||
assertTrue (-1 == i);
|
||||
dropObject("FUNCTION", "storedFunction");
|
||||
|
||||
|
||||
*_pSession << "CREATE OR REPLACE "
|
||||
"FUNCTION storedFunction(inParam IN NUMBER) RETURN NUMBER IS "
|
||||
" BEGIN RETURN(inParam*inParam); "
|
||||
" END storedFunction;" , now;
|
||||
|
||||
i = 2;
|
||||
int result = 0;
|
||||
*_pSession << "{? = call storedFunction(?)}", out(result), in(i), now;
|
||||
assertTrue (4 == result);
|
||||
dropObject("FUNCTION", "storedFunction");
|
||||
|
||||
*_pSession << "CREATE OR REPLACE "
|
||||
"FUNCTION storedFunction(inParam IN NUMBER, outParam OUT NUMBER) RETURN NUMBER IS "
|
||||
" BEGIN outParam := inParam*inParam; RETURN(outParam); "
|
||||
" END storedFunction;" , now;
|
||||
|
||||
i = 2;
|
||||
int j = 0;
|
||||
result = 0;
|
||||
*_pSession << "{? = call storedFunction(?, ?)}", out(result), in(i), out(j), now;
|
||||
assertTrue (4 == j);
|
||||
assertTrue (j == result);
|
||||
dropObject("FUNCTION", "storedFunction");
|
||||
|
||||
*_pSession << "CREATE OR REPLACE "
|
||||
"FUNCTION storedFunction(param1 IN OUT NUMBER, param2 IN OUT NUMBER) RETURN NUMBER IS "
|
||||
" temp NUMBER := param1; "
|
||||
" BEGIN param1 := param2; param2 := temp; RETURN(param1+param2); "
|
||||
" END storedFunction;" , now;
|
||||
|
||||
i = 1;
|
||||
j = 2;
|
||||
result = 0;
|
||||
*_pSession << "{? = call storedFunction(?, ?)}", out(result), io(i), io(j), now;
|
||||
assertTrue (1 == j);
|
||||
assertTrue (2 == i);
|
||||
assertTrue (3 == result);
|
||||
|
||||
Tuple<int, int> params(1, 2);
|
||||
assertTrue (1 == params.get<0>());
|
||||
assertTrue (2 == params.get<1>());
|
||||
result = 0;
|
||||
*_pSession << "{? = call storedFunction(?, ?)}", out(result), io(params), now;
|
||||
assertTrue (1 == params.get<1>());
|
||||
assertTrue (2 == params.get<0>());
|
||||
assertTrue (3 == result);
|
||||
dropObject("FUNCTION", "storedFunction");
|
||||
|
||||
k += 2;
|
||||
}
|
||||
|
||||
session().setFeature("autoBind", true);
|
||||
|
||||
*_pSession << "CREATE OR REPLACE "
|
||||
"FUNCTION storedFunction(inParam IN VARCHAR2, outParam OUT VARCHAR2) RETURN VARCHAR2 IS "
|
||||
" BEGIN outParam := inParam; RETURN outParam;"
|
||||
"END storedFunction;" , now;
|
||||
|
||||
std::string inParam = "123";
|
||||
std::string outParam;
|
||||
std::string ret;
|
||||
*_pSession << "{? = call storedFunction(?,?)}", out(ret), in(inParam), out(outParam), now;
|
||||
assertTrue ("123" == inParam);
|
||||
assertTrue (inParam == outParam);
|
||||
assertTrue (ret == outParam);
|
||||
dropObject("PROCEDURE", "storedFunction");
|
||||
}
|
||||
|
||||
|
||||
void ODBCOracleTest::testCursorStoredFunction()
|
||||
{
|
||||
for (int k = 0; k < 8;)
|
||||
{
|
||||
session().setFeature("autoBind", bindValue(k));
|
||||
session().setFeature("autoExtract", bindValue(k+1));
|
||||
|
||||
recreatePersonTable();
|
||||
typedef Tuple<std::string, std::string, std::string, int> Person;
|
||||
std::vector<Person> people;
|
||||
people.push_back(Person("Simpson", "Homer", "Springfield", 42));
|
||||
people.push_back(Person("Simpson", "Bart", "Springfield", 12));
|
||||
people.push_back(Person("Simpson", "Lisa", "Springfield", 10));
|
||||
*_pSession << "INSERT INTO Person VALUES (?, ?, ?, ?)", use(people), now;
|
||||
|
||||
*_pSession << "CREATE OR REPLACE "
|
||||
"FUNCTION storedCursorFunction(ageLimit IN NUMBER) RETURN SYS_REFCURSOR IS "
|
||||
" ret SYS_REFCURSOR; "
|
||||
" BEGIN "
|
||||
" OPEN ret FOR "
|
||||
" SELECT * "
|
||||
" FROM Person "
|
||||
" WHERE Age < ageLimit "
|
||||
" ORDER BY Age DESC; "
|
||||
" RETURN ret; "
|
||||
" END storedCursorFunction;" , now;
|
||||
|
||||
people.clear();
|
||||
int age = 13;
|
||||
|
||||
*_pSession << "{call storedCursorFunction(?)}", in(age), into(people), now;
|
||||
|
||||
assertTrue (2 == people.size());
|
||||
assertTrue (Person("Simpson", "Bart", "Springfield", 12) == people[0]);
|
||||
assertTrue (Person("Simpson", "Lisa", "Springfield", 10) == people[1]);
|
||||
|
||||
Statement stmt = ((*_pSession << "{call storedCursorFunction(?)}", in(age), now));
|
||||
RecordSet rs(stmt);
|
||||
assertTrue (rs["LastName"] == "Simpson");
|
||||
assertTrue (rs["FirstName"] == "Bart");
|
||||
assertTrue (rs["Address"] == "Springfield");
|
||||
assertTrue (rs["Age"] == 12);
|
||||
|
||||
dropObject("TABLE", "Person");
|
||||
dropObject("FUNCTION", "storedCursorFunction");
|
||||
|
||||
k += 2;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ODBCOracleTest::testMultipleResults()
|
||||
{
|
||||
std::string sql = "CREATE OR REPLACE "
|
||||
"PROCEDURE multiResultsProcedure(paramAge1 IN NUMBER,"
|
||||
" paramAge2 IN NUMBER,"
|
||||
" paramAge3 IN NUMBER,"
|
||||
" ret1 OUT SYS_REFCURSOR, "
|
||||
" ret2 OUT SYS_REFCURSOR,"
|
||||
" ret3 OUT SYS_REFCURSOR) IS "
|
||||
"BEGIN "
|
||||
" OPEN ret1 FOR SELECT * FROM Person WHERE Age = paramAge1;"
|
||||
" OPEN ret2 FOR SELECT Age FROM Person WHERE FirstName = 'Bart';"
|
||||
" OPEN ret3 FOR SELECT * FROM Person WHERE Age = paramAge2 OR Age = paramAge3 ORDER BY Age;"
|
||||
"END multiResultsProcedure;";
|
||||
|
||||
for (int i = 0; i < 8;)
|
||||
{
|
||||
recreatePersonTable();
|
||||
*_pSession << sql, now;
|
||||
session().setFeature("autoBind", bindValue(i));
|
||||
session().setFeature("autoExtract", bindValue(i+1));
|
||||
executor().multipleResults("{call multiResultsProcedure(?, ?, ?)}");
|
||||
|
||||
i += 2;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ODBCOracleTest::testAutoTransaction()
|
||||
{
|
||||
Session localSession("ODBC", _connectString);
|
||||
bool ac = session().getFeature("autoCommit");
|
||||
int count = 0;
|
||||
|
||||
recreateIntsTable();
|
||||
|
||||
session().setFeature("autoCommit", true);
|
||||
session() << "INSERT INTO Strings VALUES (1)", now;
|
||||
localSession << "SELECT count(*) FROM Strings", into(count), now;
|
||||
assertTrue (1 == count);
|
||||
session() << "INSERT INTO Strings VALUES (2)", now;
|
||||
localSession << "SELECT count(*) FROM Strings", into(count), now;
|
||||
assertTrue (2 == count);
|
||||
session() << "INSERT INTO Strings VALUES (3)", now;
|
||||
localSession << "SELECT count(*) FROM Strings", into(count), now;
|
||||
assertTrue (3 == count);
|
||||
|
||||
session() << "DELETE FROM Strings", now;
|
||||
localSession << "SELECT count(*) FROM Strings", into(count), now;
|
||||
assertTrue (0 == count);
|
||||
|
||||
session().setFeature("autoCommit", false);
|
||||
|
||||
try
|
||||
{
|
||||
AutoTransaction at(session());
|
||||
session() << "INSERT INTO Strings VALUES (1)", now;
|
||||
session() << "INSERT INTO Strings VALUES (2)", now;
|
||||
session() << "BAD QUERY", now;
|
||||
} catch (Poco::Exception&) {}
|
||||
|
||||
session() << "SELECT count(*) FROM Strings", into(count), now;
|
||||
assertTrue (0 == count);
|
||||
|
||||
AutoTransaction at(session());
|
||||
|
||||
session() << "INSERT INTO Strings VALUES (1)", now;
|
||||
session() << "INSERT INTO Strings VALUES (2)", now;
|
||||
session() << "INSERT INTO Strings VALUES (3)", now;
|
||||
|
||||
localSession << "SELECT count(*) FROM Strings", into(count), now;
|
||||
assertTrue (0 == count);
|
||||
|
||||
at.commit();
|
||||
|
||||
localSession << "SELECT count(*) FROM Strings", into(count), now;
|
||||
assertTrue (3 == count);
|
||||
|
||||
session().setFeature("autoCommit", ac);
|
||||
}
|
||||
|
||||
|
||||
void ODBCOracleTest::dropObject(const std::string& type, const std::string& name)
|
||||
{
|
||||
try
|
||||
{
|
||||
*_pSession << format("DROP %s %s", type, name), now;
|
||||
}
|
||||
catch (StatementException& ex)
|
||||
{
|
||||
bool ignoreError = false;
|
||||
const StatementDiagnostics::FieldVec& flds = ex.diagnostics().fields();
|
||||
StatementDiagnostics::Iterator it = flds.begin();
|
||||
for (; it != flds.end(); ++it)
|
||||
{
|
||||
if (4043 == it->_nativeError || //ORA-04043 (object does not exist)
|
||||
942 == it->_nativeError)//ORA-00942 (table does not exist)
|
||||
{
|
||||
ignoreError = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!ignoreError) throw;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ODBCOracleTest::recreateNullableTable()
|
||||
{
|
||||
dropObject("TABLE", "NullableTest");
|
||||
try { *_pSession << "CREATE TABLE NullableTest (EmptyString VARCHAR2(30) NULL, EmptyInteger INTEGER NULL, EmptyFloat NUMBER NULL , EmptyDateTime TIMESTAMP NULL)", now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCOracleTest::recreatePersonTable()
|
||||
{
|
||||
dropObject("TABLE", "Person");
|
||||
try { *_pSession << "CREATE TABLE Person (LastName VARCHAR2(30), FirstName VARCHAR2(30), Address VARCHAR2(30), Age INTEGER)", now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCOracleTest::recreatePersonTupleTable()
|
||||
{
|
||||
dropObject("TABLE", "Person");
|
||||
try { *_pSession << "CREATE TABLE Person (LastName1 VARCHAR2(30), FirstName1 VARCHAR2(30), Address1 VARCHAR2(30), Age1 INTEGER,"
|
||||
"LastName2 VARCHAR2(30), FirstName2 VARCHAR2(30), Address2 VARCHAR2(30), Age2 INTEGER)", now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonTupleTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonTupleTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCOracleTest::recreatePersonBLOBTable()
|
||||
{
|
||||
dropObject("TABLE", "Person");
|
||||
try { *_pSession << "CREATE TABLE Person (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), Image BLOB)", now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonBLOBTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonBLOBTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCOracleTest::recreatePersonDateTimeTable()
|
||||
{
|
||||
dropObject("TABLE", "Person");
|
||||
try { *_pSession << "CREATE TABLE Person (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), Born TIMESTAMP)", now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonDateTimeTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonDateTimeTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCOracleTest::recreatePersonDateTable()
|
||||
{
|
||||
dropObject("TABLE", "Person");
|
||||
try { *_pSession << "CREATE TABLE Person (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), BornDate DATE)", now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonDateTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonDateTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCOracleTest::recreateIntsTable()
|
||||
{
|
||||
dropObject("TABLE", "Strings");
|
||||
try { *_pSession << "CREATE TABLE Strings (str INTEGER)", now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateIntsTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateIntsTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCOracleTest::recreateStringsTable()
|
||||
{
|
||||
dropObject("TABLE", "Strings");
|
||||
try { *_pSession << "CREATE TABLE Strings (str VARCHAR(30))", now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateStringsTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateStringsTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCOracleTest::recreateFloatsTable()
|
||||
{
|
||||
dropObject("TABLE", "Strings");
|
||||
try { *_pSession << "CREATE TABLE Strings (str NUMBER)", now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateFloatsTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateFloatsTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCOracleTest::recreateTuplesTable()
|
||||
{
|
||||
dropObject("TABLE", "Tuples");
|
||||
try { *_pSession << "CREATE TABLE Tuples "
|
||||
"(int0 INTEGER, int1 INTEGER, int2 INTEGER, int3 INTEGER, int4 INTEGER, int5 INTEGER, int6 INTEGER, "
|
||||
"int7 INTEGER, int8 INTEGER, int9 INTEGER, int10 INTEGER, int11 INTEGER, int12 INTEGER, int13 INTEGER,"
|
||||
"int14 INTEGER, int15 INTEGER, int16 INTEGER, int17 INTEGER, int18 INTEGER, int19 INTEGER)", now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateTuplesTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateTuplesTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCOracleTest::recreateVectorsTable()
|
||||
{
|
||||
dropObject("TABLE", "Vectors");
|
||||
try { *_pSession << "CREATE TABLE Vectors (int0 INTEGER, flt0 NUMBER(5,2), str0 VARCHAR(30))", now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateVectorsTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateVectorsTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCOracleTest::recreateAnysTable()
|
||||
{
|
||||
dropObject("TABLE", "Anys");
|
||||
try { *_pSession << "CREATE TABLE Anys (int0 INTEGER, flt0 NUMBER, str0 VARCHAR(30))", now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateAnysTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateAnysTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCOracleTest::recreateNullsTable(const std::string& notNull)
|
||||
{
|
||||
dropObject("TABLE", "NullTest");
|
||||
try { *_pSession << format("CREATE TABLE NullTest (i INTEGER %s, r NUMBER %s, v VARCHAR(30) %s)",
|
||||
notNull,
|
||||
notNull,
|
||||
notNull), now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateNullsTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateNullsTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCOracleTest::recreateMiscTable()
|
||||
{
|
||||
dropObject("TABLE", "MiscTest");
|
||||
try
|
||||
{
|
||||
session() << "CREATE TABLE MiscTest "
|
||||
"(First VARCHAR(30),"
|
||||
"Second BLOB,"
|
||||
"Third INTEGER,"
|
||||
"Fourth NUMBER,"
|
||||
"Fifth TIMESTAMP)", now;
|
||||
} catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateMiscTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateMiscTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCOracleTest::recreateLogTable()
|
||||
{
|
||||
dropObject("TABLE", "T_POCO_LOG");
|
||||
dropObject("TABLE", "T_POCO_LOG_ARCHIVE");
|
||||
|
||||
try
|
||||
{
|
||||
std::string sql = "CREATE TABLE %s "
|
||||
"(Source VARCHAR(100),"
|
||||
"Name VARCHAR(100),"
|
||||
"ProcessId INTEGER,"
|
||||
"Thread VARCHAR(100), "
|
||||
"ThreadId INTEGER,"
|
||||
"Priority INTEGER,"
|
||||
"Text VARCHAR(100),"
|
||||
"DateTime TIMESTAMP)";
|
||||
|
||||
session() << sql, "T_POCO_LOG", now;
|
||||
session() << sql, "T_POCO_LOG_ARCHIVE", now;
|
||||
|
||||
} catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateLogTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateLogTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCOracleTest::recreateUnicodeTable()
|
||||
{
|
||||
#if defined (POCO_ODBC_UNICODE)
|
||||
dropObject("TABLE", "UnicodeTable");
|
||||
try { session() << "CREATE TABLE UnicodeTable (str NVARCHAR2(30))", now; }
|
||||
catch (ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail("recreateUnicodeTable()"); }
|
||||
catch (StatementException& se){ std::cout << se.toString() << std::endl; fail("recreateUnicodeTable()"); }
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
CppUnit::Test* ODBCOracleTest::suite()
|
||||
{
|
||||
if ((_pSession = init(_driver, _dsn, _uid, _pwd, _connectString)))
|
||||
{
|
||||
std::cout << "*** Connected to [" << _driver << "] test database." << std::endl;
|
||||
|
||||
_pExecutor = new SQLExecutor(_driver + " SQL Executor", _pSession);
|
||||
|
||||
CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("ODBCOracleTest");
|
||||
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testBareboneODBC);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testZeroRows);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testSimpleAccess);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testComplexType);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testComplexTypeTuple);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testSimpleAccessVector);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testComplexTypeVector);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testSharedPtrComplexTypeVector);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testAutoPtrComplexTypeVector);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testInsertVector);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testInsertEmptyVector);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testSimpleAccessList);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testComplexTypeList);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testInsertList);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testInsertEmptyList);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testSimpleAccessDeque);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testComplexTypeDeque);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testInsertDeque);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testInsertEmptyDeque);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testAffectedRows);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testInsertSingleBulk);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testInsertSingleBulkVec);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testLimit);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testLimitOnce);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testLimitPrepare);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testLimitZero);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testPrepare);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testBulk);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testBulkPerformance);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testSetSimple);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testSetComplex);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testSetComplexUnique);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testMultiSetSimple);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testMultiSetComplex);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testMapComplex);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testMapComplexUnique);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testMultiMapComplex);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testSelectIntoSingle);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testSelectIntoSingleStep);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testSelectIntoSingleFail);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testLowerLimitOk);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testLowerLimitFail);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testCombinedLimits);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testCombinedIllegalLimits);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testRange);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testIllegalRange);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testSingleSelect);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testEmptyDB);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testBLOB);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testBLOBContainer);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testBLOBStmt);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testDate);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testDateTime);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testFloat);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testDouble);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testTuple);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testTupleVector);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testStoredProcedure);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testCursorStoredProcedure);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testStoredProcedureAny);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testStoredProcedureDynamicAny);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testStoredFunction);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testCursorStoredFunction);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testInternalExtraction);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testFilter);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testInternalBulkExtraction);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testInternalStorageType);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testNull);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testRowIterator);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testAsync);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testAny);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testDynamicAny);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testMultipleResults);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testSQLChannel);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testSQLLogger);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testAutoTransaction);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testSessionTransaction);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testTransaction);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testTransactor);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testNullable);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testUnicode);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testReconnect);
|
||||
|
||||
return pSuite;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
//
|
||||
// ODBCOracleTest.h
|
||||
//
|
||||
// Definition of the ODBCOracleTest class.
|
||||
//
|
||||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#ifndef ODBCOracleTest_INCLUDED
|
||||
#define ODBCOracleTest_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Data/ODBC/ODBC.h"
|
||||
#include "ODBCTest.h"
|
||||
|
||||
|
||||
class ODBCOracleTest: public ODBCTest
|
||||
/// Oracle ODBC test class
|
||||
/// Tested:
|
||||
///
|
||||
/// Driver | DB | OS
|
||||
/// ------------+-------------------------------+------------------------------------------
|
||||
/// 10.02.00.01 | Oracle9i Release 9.2.0.4.0 | MS Windows XP Professional x64 v.2003/SP1
|
||||
/// 10.02.00.01 | Oracle XE Release 10.2.0.1.0 | MS Windows XP Professional x64 v.2003/SP1
|
||||
/// 11.02.00.02 | Oracle XE Release 11.2.0.2.0 | MS Windows 7 Professional x64 v.2009/SP1
|
||||
{
|
||||
public:
|
||||
ODBCOracleTest(const std::string& name);
|
||||
~ODBCOracleTest();
|
||||
|
||||
void testBareboneODBC();
|
||||
|
||||
void testBLOB();
|
||||
|
||||
void testMultipleResults();
|
||||
|
||||
void testStoredProcedure();
|
||||
void testCursorStoredProcedure();
|
||||
void testStoredFunction();
|
||||
void testCursorStoredFunction();
|
||||
void testStoredProcedureAny();
|
||||
void testStoredProcedureDynamicAny();
|
||||
void testAutoTransaction();
|
||||
|
||||
void testNull();
|
||||
static CppUnit::Test* suite();
|
||||
|
||||
private:
|
||||
static void testBarebone();
|
||||
|
||||
void dropObject(const std::string& type, const std::string& name);
|
||||
void recreateNullableTable();
|
||||
void recreatePersonTable();
|
||||
void recreatePersonTupleTable();
|
||||
void recreatePersonBLOBTable();
|
||||
void recreatePersonDateTable();
|
||||
void recreatePersonDateTimeTable();
|
||||
void recreateStringsTable();
|
||||
void recreateIntsTable();
|
||||
void recreateFloatsTable();
|
||||
void recreateTuplesTable();
|
||||
void recreateVectorsTable();
|
||||
void recreateAnysTable();
|
||||
void recreateNullsTable(const std::string& notNull = "");
|
||||
void recreateMiscTable();
|
||||
void recreateLogTable();
|
||||
void recreateUnicodeTable();
|
||||
|
||||
static ODBCTest::SessionPtr _pSession;
|
||||
static ODBCTest::ExecPtr _pExecutor;
|
||||
|
||||
static std::string _driver;
|
||||
static std::string _dsn;
|
||||
static std::string _uid;
|
||||
static std::string _pwd;
|
||||
static std::string _connectString;
|
||||
|
||||
static const std::string MULTI_INSERT;
|
||||
static const std::string MULTI_SELECT;
|
||||
};
|
||||
|
||||
|
||||
inline void ODBCOracleTest::testBareboneODBC()
|
||||
{
|
||||
return testBarebone();
|
||||
}
|
||||
|
||||
|
||||
#endif // ODBCOracleTest_INCLUDED
|
||||
@@ -0,0 +1,685 @@
|
||||
//
|
||||
// ODBCPostgreSQLTest.cpp
|
||||
//
|
||||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#include "ODBCPostgreSQLTest.h"
|
||||
#include "CppUnit/TestCaller.h"
|
||||
#include "CppUnit/TestSuite.h"
|
||||
#include "ODBCTest.h"
|
||||
#include "Poco/Format.h"
|
||||
#include "Poco/Any.h"
|
||||
#include "Poco/DynamicAny.h"
|
||||
#include "Poco/DateTime.h"
|
||||
#include "Poco/Data/ODBC/Diagnostics.h"
|
||||
#include "Poco/Data/ODBC/ODBCException.h"
|
||||
#include <iostream>
|
||||
|
||||
|
||||
using namespace Poco::Data::Keywords;
|
||||
using Poco::Data::DataException;
|
||||
using Poco::Data::ODBC::ConnectionException;
|
||||
using Poco::Data::ODBC::StatementException;
|
||||
using Poco::Data::ODBC::StatementDiagnostics;
|
||||
using Poco::format;
|
||||
using Poco::Any;
|
||||
using Poco::AnyCast;
|
||||
using Poco::DynamicAny;
|
||||
using Poco::DateTime;
|
||||
|
||||
|
||||
#ifdef POCO_ODBC_USE_MAMMOTH_NG
|
||||
#define POSTGRESQL_ODBC_DRIVER "Mammoth ODBCng Beta"
|
||||
#elif defined (POCO_ODBC_UNICODE)
|
||||
#ifdef POCO_PTR_IS_64_BIT
|
||||
#define POSTGRESQL_ODBC_DRIVER "PostgreSQL Unicode(x64)"
|
||||
#else
|
||||
#define POSTGRESQL_ODBC_DRIVER "PostgreSQL Unicode"
|
||||
#endif
|
||||
#define POSTGRESQL_DSN "PocoDataPgSQLTestW"
|
||||
#else
|
||||
#ifdef POCO_PTR_IS_64_BIT
|
||||
#define POSTGRESQL_ODBC_DRIVER "PostgreSQL ANSI(x64)"
|
||||
#else
|
||||
#define POSTGRESQL_ODBC_DRIVER "PostgreSQL ANSI"
|
||||
#endif
|
||||
#define POSTGRESQL_DSN "PocoDataPgSQLTest"
|
||||
#endif
|
||||
|
||||
#if defined(POCO_OS_FAMILY_WINDOWS)
|
||||
#pragma message ("Using " POSTGRESQL_ODBC_DRIVER " driver.")
|
||||
#endif
|
||||
|
||||
#define POSTGRESQL_SERVER POCO_ODBC_TEST_DATABASE_SERVER
|
||||
#define POSTGRESQL_PORT "5432"
|
||||
#define POSTGRESQL_DB "postgres"
|
||||
#define POSTGRESQL_UID "postgres"
|
||||
#define POSTGRESQL_PWD "poco"
|
||||
#define POSTGRESQL_VERSION "10"
|
||||
|
||||
#ifdef POCO_OS_FAMILY_WINDOWS
|
||||
const std::string ODBCPostgreSQLTest::_libDir = "C:\\\\Program Files\\\\PostgreSQL\\\\pg" POSTGRESQL_VERSION "\\\\lib\\\\";
|
||||
#else
|
||||
const std::string ODBCPostgreSQLTest::_libDir = "/usr/local/pgsql/lib/";
|
||||
#endif
|
||||
|
||||
|
||||
ODBCTest::SessionPtr ODBCPostgreSQLTest::_pSession;
|
||||
ODBCTest::ExecPtr ODBCPostgreSQLTest::_pExecutor;
|
||||
std::string ODBCPostgreSQLTest::_driver = POSTGRESQL_ODBC_DRIVER;
|
||||
std::string ODBCPostgreSQLTest::_dsn = POSTGRESQL_DSN;
|
||||
std::string ODBCPostgreSQLTest::_uid = POSTGRESQL_UID;
|
||||
std::string ODBCPostgreSQLTest::_pwd = POSTGRESQL_PWD;
|
||||
std::string ODBCPostgreSQLTest::_connectString =
|
||||
"DRIVER=" POSTGRESQL_ODBC_DRIVER ";"
|
||||
"DATABASE=" POSTGRESQL_DB ";"
|
||||
"SERVER=" POSTGRESQL_SERVER ";"
|
||||
"PORT=" POSTGRESQL_PORT ";"
|
||||
"UID=" POSTGRESQL_UID ";"
|
||||
"PWD=" POSTGRESQL_PWD ";"
|
||||
"SSLMODE=prefer;"
|
||||
"LowerCaseIdentifier=0;"
|
||||
"UseServerSidePrepare=0;"
|
||||
"ByteaAsLongVarBinary=1;"
|
||||
"BI=0;"
|
||||
"TrueIsMinus1=0;"
|
||||
"DisallowPremature=0;"
|
||||
"UpdatableCursors=0;"
|
||||
"LFConversion=1;"
|
||||
"CancelAsFreeStmt=0;"
|
||||
"Parse=0;"
|
||||
"BoolsAsChar=1;"
|
||||
"UnknownsAsLongVarchar=0;"
|
||||
"TextAsLongVarchar=1;"
|
||||
"UseDeclareFetch=0;"
|
||||
"Ksqo=1;"
|
||||
"Optimizer=1;"
|
||||
"CommLog=0;"
|
||||
"Debug=0;"
|
||||
"MaxLongVarcharSize=8190;"
|
||||
"MaxVarcharSize=254;"
|
||||
"UnknownSizes=0;"
|
||||
"Socket=8192;"
|
||||
"Fetch=100;"
|
||||
"ConnSettings=;"
|
||||
"ShowSystemTables=0;"
|
||||
"RowVersioning=0;"
|
||||
"ShowOidColumn=0;"
|
||||
"FakeOidIndex=0;"
|
||||
"ReadOnly=0;";
|
||||
|
||||
|
||||
ODBCPostgreSQLTest::ODBCPostgreSQLTest(const std::string& name):
|
||||
ODBCTest(name, _pSession, _pExecutor, _dsn, _uid, _pwd, _connectString)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
ODBCPostgreSQLTest::~ODBCPostgreSQLTest()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void ODBCPostgreSQLTest::testBareboneODBC()
|
||||
{
|
||||
std::string tableCreateString = "CREATE TABLE Test "
|
||||
"(First VARCHAR(30),"
|
||||
"Second VARCHAR(30),"
|
||||
"Third BYTEA,"
|
||||
"Fourth INTEGER,"
|
||||
"Fifth FLOAT,"
|
||||
"Sixth TIMESTAMP)";
|
||||
|
||||
executor().bareboneODBCTest(_connectString, tableCreateString, SQLExecutor::PB_IMMEDIATE, SQLExecutor::DE_MANUAL);
|
||||
executor().bareboneODBCTest(_connectString, tableCreateString, SQLExecutor::PB_IMMEDIATE, SQLExecutor::DE_BOUND);
|
||||
executor().bareboneODBCTest(_connectString, tableCreateString, SQLExecutor::PB_AT_EXEC, SQLExecutor::DE_MANUAL);
|
||||
executor().bareboneODBCTest(_connectString, tableCreateString, SQLExecutor::PB_AT_EXEC, SQLExecutor::DE_BOUND);
|
||||
|
||||
tableCreateString = "CREATE TABLE Test "
|
||||
"(First VARCHAR(30),"
|
||||
"Second VARCHAR(30),"
|
||||
"Third BYTEA,"
|
||||
"Fourth INTEGER,"
|
||||
"Fifth FLOAT,"
|
||||
"Sixth DATE)";
|
||||
|
||||
executor().bareboneODBCTest(_connectString, tableCreateString, SQLExecutor::PB_IMMEDIATE, SQLExecutor::DE_MANUAL, false);
|
||||
executor().bareboneODBCTest(_connectString, tableCreateString, SQLExecutor::PB_IMMEDIATE, SQLExecutor::DE_BOUND, false);
|
||||
executor().bareboneODBCTest(_connectString, tableCreateString, SQLExecutor::PB_AT_EXEC, SQLExecutor::DE_MANUAL, false);
|
||||
executor().bareboneODBCTest(_connectString, tableCreateString, SQLExecutor::PB_AT_EXEC, SQLExecutor::DE_BOUND, false);
|
||||
|
||||
//neither pSQL ODBC nor Mammoth drivers support multiple results properly
|
||||
/*
|
||||
tableCreateString = "CREATE TABLE Test "
|
||||
"(First VARCHAR(30),"
|
||||
"Second INTEGER,"
|
||||
"Third FLOAT)";
|
||||
|
||||
executor().bareboneODBCMultiResultTest(_dbConnString, tableCreateString, SQLExecutor::PB_IMMEDIATE, SQLExecutor::DE_MANUAL);
|
||||
executor().bareboneODBCMultiResultTest(_dbConnString, tableCreateString, SQLExecutor::PB_IMMEDIATE, SQLExecutor::DE_BOUND);
|
||||
executor().bareboneODBCMultiResultTest(_dbConnString, tableCreateString, SQLExecutor::PB_AT_EXEC, SQLExecutor::DE_MANUAL);
|
||||
executor().bareboneODBCMultiResultTest(_dbConnString, tableCreateString, SQLExecutor::PB_AT_EXEC, SQLExecutor::DE_BOUND);
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
void ODBCPostgreSQLTest::testBLOB()
|
||||
{
|
||||
const std::size_t maxFldSize = 1000000;
|
||||
session().setProperty("maxFieldSize", Poco::Any(maxFldSize-1));
|
||||
recreatePersonBLOBTable();
|
||||
|
||||
try
|
||||
{
|
||||
executor().blob(maxFldSize);
|
||||
fail ("must fail");
|
||||
}
|
||||
catch (DataException&)
|
||||
{
|
||||
session().setProperty("maxFieldSize", Poco::Any(maxFldSize));
|
||||
}
|
||||
|
||||
for (int i = 0; i < 8;)
|
||||
{
|
||||
recreatePersonBLOBTable();
|
||||
session().setFeature("autoBind", bindValue(i));
|
||||
session().setFeature("autoExtract", bindValue(i+1));
|
||||
executor().blob(1000000);
|
||||
i += 2;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ODBCPostgreSQLTest::testStoredFunction()
|
||||
{
|
||||
configurePLPgSQL();
|
||||
|
||||
std::string func("testStoredFunction()");
|
||||
|
||||
for (int k = 0; k < 8;)
|
||||
{
|
||||
session().setFeature("autoBind", bindValue(k));
|
||||
session().setFeature("autoExtract", bindValue(k+1));
|
||||
|
||||
dropObject("FUNCTION", "storedFunction()");
|
||||
try
|
||||
{
|
||||
session() << "CREATE FUNCTION storedFunction() RETURNS INTEGER AS '"
|
||||
"BEGIN "
|
||||
" return -1; "
|
||||
"END;'"
|
||||
"LANGUAGE 'plpgsql'", now;
|
||||
}
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (func); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (func); }
|
||||
|
||||
int i = 0;
|
||||
session() << "{? = call storedFunction()}", out(i), now;
|
||||
assertTrue (-1 == i);
|
||||
dropObject("FUNCTION", "storedFunction()");
|
||||
|
||||
try
|
||||
{
|
||||
session() << "CREATE FUNCTION storedFunction(INTEGER) RETURNS INTEGER AS '"
|
||||
"BEGIN "
|
||||
" RETURN $1 * $1; "
|
||||
"END;'"
|
||||
"LANGUAGE 'plpgsql'" , now;
|
||||
}
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (func); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (func); }
|
||||
|
||||
i = 2;
|
||||
int result = 0;
|
||||
session() << "{? = call storedFunction(?)}", out(result), in(i), now;
|
||||
assertTrue (4 == result);
|
||||
dropObject("FUNCTION", "storedFunction(INTEGER)");
|
||||
|
||||
dropObject("FUNCTION", "storedFunction(TIMESTAMP)");
|
||||
try
|
||||
{
|
||||
session() << "CREATE FUNCTION storedFunction(TIMESTAMP) RETURNS TIMESTAMP AS '"
|
||||
"BEGIN "
|
||||
" RETURN $1; "
|
||||
"END;'"
|
||||
"LANGUAGE 'plpgsql'" , now;
|
||||
}
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (func); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (func); }
|
||||
|
||||
DateTime dtIn(1965, 6, 18, 5, 35, 1);
|
||||
DateTime dtOut;
|
||||
session() << "{? = call storedFunction(?)}", out(dtOut), in(dtIn), now;
|
||||
assertTrue (dtOut == dtIn);
|
||||
dropObject("FUNCTION", "storedFunction(TIMESTAMP)");
|
||||
|
||||
dropObject("FUNCTION", "storedFunction(TEXT, TEXT)");
|
||||
try
|
||||
{
|
||||
session() << "CREATE FUNCTION storedFunction(TEXT,TEXT) RETURNS TEXT AS '"
|
||||
"BEGIN "
|
||||
" RETURN $1 || '', '' || $2 || ''!'';"
|
||||
"END;'"
|
||||
"LANGUAGE 'plpgsql'" , now;
|
||||
}
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (func); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (func); }
|
||||
|
||||
std::string param1 = "Hello";
|
||||
std::string param2 = "world";
|
||||
std::string ret;
|
||||
try
|
||||
{
|
||||
session() << "{? = call storedFunction(?,?)}", out(ret), in(param1), in(param2), now;
|
||||
}
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (func); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (func); }
|
||||
|
||||
assertTrue (ret == "Hello, world!");
|
||||
dropObject("FUNCTION", "storedFunction(TEXT, TEXT)");
|
||||
|
||||
k += 2;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ODBCPostgreSQLTest::testStoredFunctionAny()
|
||||
{
|
||||
session() << "CREATE FUNCTION storedFunction(INTEGER) RETURNS INTEGER AS '"
|
||||
"BEGIN "
|
||||
" RETURN $1 * $1; "
|
||||
"END;'"
|
||||
"LANGUAGE 'plpgsql'" , now;
|
||||
|
||||
for (int k = 0; k < 8;)
|
||||
{
|
||||
session().setFeature("autoBind", bindValue(k));
|
||||
session().setFeature("autoExtract", bindValue(k+1));
|
||||
|
||||
Any i = 2;
|
||||
Any result = 0;
|
||||
session() << "{? = call storedFunction(?)}", out(result), in(i), now;
|
||||
assertTrue (4 == AnyCast<int>(result));
|
||||
|
||||
k += 2;
|
||||
}
|
||||
|
||||
dropObject("FUNCTION", "storedFunction(INTEGER)");
|
||||
}
|
||||
|
||||
|
||||
void ODBCPostgreSQLTest::testStoredFunctionDynamicAny()
|
||||
{
|
||||
session() << "CREATE FUNCTION storedFunction(INTEGER) RETURNS INTEGER AS '"
|
||||
"BEGIN "
|
||||
" RETURN $1 * $1; "
|
||||
"END;'"
|
||||
"LANGUAGE 'plpgsql'" , now;
|
||||
|
||||
for (int k = 0; k < 8;)
|
||||
{
|
||||
session().setFeature("autoBind", bindValue(k));
|
||||
session().setFeature("autoExtract", bindValue(k+1));
|
||||
|
||||
DynamicAny i = 2;
|
||||
DynamicAny result = 0;
|
||||
session() << "{? = call storedFunction(?)}", out(result), in(i), now;
|
||||
assertTrue (4 == result);
|
||||
|
||||
k += 2;
|
||||
}
|
||||
|
||||
dropObject("FUNCTION", "storedFunction(INTEGER)");
|
||||
}
|
||||
|
||||
|
||||
void ODBCPostgreSQLTest::configurePLPgSQL()
|
||||
{
|
||||
try
|
||||
{
|
||||
session() << format("CREATE FUNCTION plpgsql_call_handler () "
|
||||
"RETURNS OPAQUE "
|
||||
"AS '%splpgsql.dll' "
|
||||
"LANGUAGE 'C';", _libDir), now;
|
||||
|
||||
session() << "CREATE LANGUAGE 'plpgsql' "
|
||||
"HANDLER plpgsql_call_handler "
|
||||
"LANCOMPILER 'PL/pgSQL'", now;
|
||||
|
||||
}catch(StatementException& ex)
|
||||
{
|
||||
if (1 != ex.diagnostics().nativeError(0))
|
||||
throw;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void ODBCPostgreSQLTest::dropObject(const std::string& type, const std::string& name)
|
||||
{
|
||||
try
|
||||
{
|
||||
session() << format("DROP %s %s", type, name), now;
|
||||
}
|
||||
catch (StatementException& ex)
|
||||
{
|
||||
bool ignoreError = false;
|
||||
const StatementDiagnostics::FieldVec& flds = ex.diagnostics().fields();
|
||||
StatementDiagnostics::Iterator it = flds.begin();
|
||||
for (; it != flds.end(); ++it)
|
||||
{
|
||||
if (1 == it->_nativeError)//(table does not exist)
|
||||
{
|
||||
ignoreError = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!ignoreError) throw;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ODBCPostgreSQLTest::recreateNullableTable()
|
||||
{
|
||||
dropObject("TABLE", "NullableTest");
|
||||
try { *_pSession << "CREATE TABLE NullableTest (EmptyString VARCHAR(30) NULL, EmptyInteger INTEGER NULL, EmptyFloat FLOAT NULL , EmptyDateTime TIMESTAMP NULL)", now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCPostgreSQLTest::recreatePersonTable()
|
||||
{
|
||||
dropObject("TABLE", "Person");
|
||||
try { session() << "CREATE TABLE Person (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), Age INTEGER)", now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCPostgreSQLTest::recreatePersonBLOBTable()
|
||||
{
|
||||
dropObject("TABLE", "Person");
|
||||
try { session() << "CREATE TABLE Person (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), Image BYTEA)", now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonBLOBTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonBLOBTable()"); }
|
||||
}
|
||||
|
||||
|
||||
|
||||
void ODBCPostgreSQLTest::recreatePersonDateTimeTable()
|
||||
{
|
||||
dropObject("TABLE", "Person");
|
||||
try { session() << "CREATE TABLE Person (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), Born TIMESTAMP)", now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonDateTimeTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonDateTimeTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCPostgreSQLTest::recreatePersonDateTable()
|
||||
{
|
||||
dropObject("TABLE", "Person");
|
||||
try { session() << "CREATE TABLE Person (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), BornDate DATE)", now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonDateTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonDateTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCPostgreSQLTest::recreatePersonTimeTable()
|
||||
{
|
||||
dropObject("TABLE", "Person");
|
||||
try { session() << "CREATE TABLE Person (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), BornTime TIME)", now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonTimeTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonTimeTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCPostgreSQLTest::recreateIntsTable()
|
||||
{
|
||||
dropObject("TABLE", "Strings");
|
||||
try { session() << "CREATE TABLE Strings (str INTEGER)", now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateIntsTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateIntsTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCPostgreSQLTest::recreateStringsTable()
|
||||
{
|
||||
dropObject("TABLE", "Strings");
|
||||
try { session() << "CREATE TABLE Strings (str VARCHAR(30))", now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateStringsTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateStringsTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCPostgreSQLTest::recreateFloatsTable()
|
||||
{
|
||||
dropObject("TABLE", "Strings");
|
||||
try { session() << "CREATE TABLE Strings (str FLOAT)", now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateFloatsTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateFloatsTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCPostgreSQLTest::recreateTuplesTable()
|
||||
{
|
||||
dropObject("TABLE", "Tuples");
|
||||
try { session() << "CREATE TABLE Tuples "
|
||||
"(int0 INTEGER, int1 INTEGER, int2 INTEGER, int3 INTEGER, int4 INTEGER, int5 INTEGER, int6 INTEGER, "
|
||||
"int7 INTEGER, int8 INTEGER, int9 INTEGER, int10 INTEGER, int11 INTEGER, int12 INTEGER, int13 INTEGER,"
|
||||
"int14 INTEGER, int15 INTEGER, int16 INTEGER, int17 INTEGER, int18 INTEGER, int19 INTEGER)", now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateTuplesTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateTuplesTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCPostgreSQLTest::recreateVectorsTable()
|
||||
{
|
||||
dropObject("TABLE", "Vectors");
|
||||
try { session() << "CREATE TABLE Vectors (int0 INTEGER, flt0 FLOAT, str0 VARCHAR(30))", now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateVectorsTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateVectorsTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCPostgreSQLTest::recreateAnysTable()
|
||||
{
|
||||
dropObject("TABLE", "Anys");
|
||||
try { session() << "CREATE TABLE Anys (int0 INTEGER, flt0 FLOAT, str0 VARCHAR(30))", now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateAnysTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateAnysTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCPostgreSQLTest::recreateNullsTable(const std::string& notNull)
|
||||
{
|
||||
dropObject("TABLE", "NullTest");
|
||||
try { session() << format("CREATE TABLE NullTest (i INTEGER %s, r FLOAT %s, v VARCHAR(30) %s)",
|
||||
notNull,
|
||||
notNull,
|
||||
notNull), now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateNullsTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateNullsTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCPostgreSQLTest::recreateBoolTable()
|
||||
{
|
||||
dropObject("TABLE", "BoolTest");
|
||||
try { session() << "CREATE TABLE BoolTest (b BOOLEAN)", now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateBoolTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateBoolTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCPostgreSQLTest::recreateMiscTable()
|
||||
{
|
||||
dropObject("TABLE", "MiscTest");
|
||||
try
|
||||
{
|
||||
// Mammoth does not bind columns properly
|
||||
session() << "CREATE TABLE MiscTest "
|
||||
"(First VARCHAR(30),"
|
||||
"Second BYTEA,"
|
||||
"Third INTEGER,"
|
||||
"Fourth FLOAT,"
|
||||
"Fifth TIMESTAMP)", now;
|
||||
} catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateMiscTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateMiscTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCPostgreSQLTest::recreateLogTable()
|
||||
{
|
||||
dropObject("TABLE", "T_POCO_LOG");
|
||||
dropObject("TABLE", "T_POCO_LOG_ARCHIVE");
|
||||
|
||||
try
|
||||
{
|
||||
std::string sql = "CREATE TABLE %s "
|
||||
"(Source VARCHAR,"
|
||||
"Name VARCHAR,"
|
||||
"ProcessId INTEGER,"
|
||||
"Thread VARCHAR, "
|
||||
"ThreadId INTEGER,"
|
||||
"Priority INTEGER,"
|
||||
"Text VARCHAR,"
|
||||
"DateTime TIMESTAMP)";
|
||||
|
||||
session() << sql, "T_POCO_LOG", now;
|
||||
session() << sql, "T_POCO_LOG_ARCHIVE", now;
|
||||
|
||||
} catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateLogTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateLogTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCPostgreSQLTest::recreateUnicodeTable()
|
||||
{
|
||||
#if defined (POCO_ODBC_UNICODE)
|
||||
dropObject("TABLE", "UnicodeTable");
|
||||
try { session() << "CREATE TABLE UnicodeTable (str TEXT)", now; }
|
||||
catch (ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail("recreateUnicodeTable()"); }
|
||||
catch (StatementException& se){ std::cout << se.toString() << std::endl; fail("recreateUnicodeTable()"); }
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
CppUnit::Test* ODBCPostgreSQLTest::suite()
|
||||
{
|
||||
if ((_pSession = init(_driver, _dsn, _uid, _pwd, _connectString)))
|
||||
{
|
||||
std::cout << "*** Connected to [" << _driver << "] test database." << std::endl;
|
||||
|
||||
_pExecutor = new SQLExecutor(_driver + " SQL Executor", _pSession);
|
||||
|
||||
CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("ODBCPostgreSQLTest");
|
||||
|
||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testBareboneODBC);
|
||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testZeroRows);
|
||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testSimpleAccess);
|
||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testComplexType);
|
||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testSimpleAccessVector);
|
||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testComplexTypeVector);
|
||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testSharedPtrComplexTypeVector);
|
||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testAutoPtrComplexTypeVector);
|
||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testInsertVector);
|
||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testInsertEmptyVector);
|
||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testSimpleAccessList);
|
||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testComplexTypeList);
|
||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testInsertList);
|
||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testInsertEmptyList);
|
||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testSimpleAccessDeque);
|
||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testComplexTypeDeque);
|
||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testInsertDeque);
|
||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testInsertEmptyDeque);
|
||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testAffectedRows);
|
||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testInsertSingleBulk);
|
||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testInsertSingleBulkVec);
|
||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testLimit);
|
||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testLimitOnce);
|
||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testLimitPrepare);
|
||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testLimitZero);
|
||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testPrepare);
|
||||
//On Linux, PostgreSQL driver returns SQL_NEED_DATA on SQLExecute (see ODBCStatementImpl::bindImpl() )
|
||||
//this behavior is not expected and not handled for automatic binding
|
||||
#ifdef POCO_OS_FAMILY_WINDOWS
|
||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testBulk);
|
||||
#endif
|
||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testBulkPerformance);
|
||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testSetSimple);
|
||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testSetComplex);
|
||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testSetComplexUnique);
|
||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testMultiSetSimple);
|
||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testMultiSetComplex);
|
||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testMapComplex);
|
||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testMapComplexUnique);
|
||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testMultiMapComplex);
|
||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testSelectIntoSingle);
|
||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testSelectIntoSingleStep);
|
||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testSelectIntoSingleFail);
|
||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testLowerLimitOk);
|
||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testLowerLimitFail);
|
||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testCombinedLimits);
|
||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testCombinedIllegalLimits);
|
||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testRange);
|
||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testIllegalRange);
|
||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testSingleSelect);
|
||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testEmptyDB);
|
||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testBLOB);
|
||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testBLOBContainer);
|
||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testBLOBStmt);
|
||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testDate);
|
||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testTime);
|
||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testDateTime);
|
||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testFloat);
|
||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testDouble);
|
||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testTuple);
|
||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testTupleVector);
|
||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testInternalExtraction);
|
||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testFilter);
|
||||
//On Linux, PostgreSQL driver returns SQL_NEED_DATA on SQLExecute (see ODBCStatementImpl::bindImpl() )
|
||||
//this behavior is not expected and not handled for automatic binding
|
||||
#ifdef POCO_OS_FAMILY_WINDOWS
|
||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testInternalBulkExtraction);
|
||||
#endif
|
||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testInternalStorageType);
|
||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testStoredFunction);
|
||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testStoredFunctionAny);
|
||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testStoredFunctionDynamicAny);
|
||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testNull);
|
||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testRowIterator);
|
||||
#ifdef POCO_ODBC_USE_MAMMOTH_NG
|
||||
// psqlODBC driver returns string for bool fields
|
||||
// even when field is explicitly cast to boolean,
|
||||
// so this functionality seems to be untestable with it
|
||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testStdVectorBool);
|
||||
#endif
|
||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testAsync);
|
||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testAny);
|
||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testDynamicAny);
|
||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testMultipleResults);
|
||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testSQLChannel);
|
||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testSQLLogger);
|
||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testSessionTransaction);
|
||||
// (postgres bug?)
|
||||
// local session claims to be capable of reading uncommitted changes,
|
||||
// but fails to do so
|
||||
//CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testTransaction);
|
||||
//CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testTransactor);
|
||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testNullable);
|
||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testUnicode);
|
||||
CppUnit_addTest(pSuite, ODBCPostgreSQLTest, testReconnect);
|
||||
|
||||
return pSuite;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
//
|
||||
// ODBCPostgreSQLTest.h
|
||||
//
|
||||
// Definition of the ODBCPostgreSQLTest class.
|
||||
//
|
||||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#ifndef ODBCPostgreSQLTest_INCLUDED
|
||||
#define ODBCPostgreSQLTest_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Data/ODBC/ODBC.h"
|
||||
#include "ODBCTest.h"
|
||||
|
||||
|
||||
// uncomment to use Mammoth ODBCng driver
|
||||
//#define POCO_ODBC_USE_MAMMOTH_NG
|
||||
|
||||
|
||||
class ODBCPostgreSQLTest: public ODBCTest
|
||||
/// PostgreSQL ODBC test class
|
||||
/// Tested:
|
||||
///
|
||||
/// Driver | DB | OS | Driver Manager |Notes
|
||||
/// ---------------+----------------------+-------------------------------------------+--------------------+--------------------------
|
||||
/// 07.03.02.60 | PostgreSQL 7.4.6 | MS Windows XP Professional x64 v.2003/SP1 | 3.526.3959.0 | BLOB fails (missing 'lo')
|
||||
/// 08.01.02.00 | PostgreSQL 8.1.5-1 | MS Windows XP Professional x64 v.2003/SP1 | 3.526.3959.0 |
|
||||
/// 1:08.01.0200-2 | PostgreSQL 8.1.5-1 | Ubuntu 7.04 (2.6.20-15-generic #2 SMP) | unixODBC 2.2.11.-13|
|
||||
/// Mammoth ODBCng | | | |
|
||||
/// (0.99.00.122) | PostgreSQL 8.1.5-1 | MS Windows XP Professional x64 v.2003/SP1 | 3.526.3959.0 |
|
||||
///
|
||||
{
|
||||
public:
|
||||
ODBCPostgreSQLTest(const std::string& name);
|
||||
~ODBCPostgreSQLTest();
|
||||
|
||||
void testBareboneODBC();
|
||||
|
||||
void testBLOB();
|
||||
|
||||
void testStoredFunction();
|
||||
void testStoredFunctionAny();
|
||||
void testStoredFunctionDynamicAny();
|
||||
|
||||
static CppUnit::Test* suite();
|
||||
|
||||
private:
|
||||
void dropObject(const std::string& type, const std::string& name);
|
||||
void recreateNullableTable();
|
||||
void recreatePersonTable();
|
||||
void recreatePersonBLOBTable();
|
||||
void recreatePersonDateTimeTable();
|
||||
void recreatePersonDateTable();
|
||||
void recreatePersonTimeTable();
|
||||
void recreateStringsTable();
|
||||
void recreateIntsTable();
|
||||
void recreateFloatsTable();
|
||||
void recreateTuplesTable();
|
||||
void recreateVectorsTable();
|
||||
void recreateAnysTable();
|
||||
void recreateNullsTable(const std::string& notNull="");
|
||||
void recreateBoolTable();
|
||||
void recreateMiscTable();
|
||||
void recreateLogTable();
|
||||
void recreateUnicodeTable();
|
||||
|
||||
void configurePLPgSQL();
|
||||
/// Configures PL/pgSQL in the database. A reasonable defaults
|
||||
/// for the interpreter location on WIN32 and POSIX platforms are
|
||||
/// supplied (see installDir member variable).
|
||||
/// If these do not work, user must determine the proper location,
|
||||
/// modify the function and recompile.
|
||||
/// Alternative is direct database configuration for PL/pgSQL usage.
|
||||
|
||||
static const std::string _libDir;
|
||||
/// Varible determining the location of the library directory
|
||||
/// on the database installation system.
|
||||
/// Used to enable PLpgSQL language programmaticaly when
|
||||
/// it is not enabled.
|
||||
|
||||
static SessionPtr _pSession;
|
||||
static ExecPtr _pExecutor;
|
||||
static std::string _driver;
|
||||
static std::string _dsn;
|
||||
static std::string _uid;
|
||||
static std::string _pwd;
|
||||
static std::string _connectString;
|
||||
};
|
||||
|
||||
|
||||
#endif // ODBCPostgreSQLTest_INCLUDED
|
||||
@@ -0,0 +1,821 @@
|
||||
//
|
||||
// ODBCSQLServerTest.cpp
|
||||
//
|
||||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#include "ODBCSQLServerTest.h"
|
||||
#include "CppUnit/TestCaller.h"
|
||||
#include "CppUnit/TestSuite.h"
|
||||
#include "Poco/String.h"
|
||||
#include "Poco/Format.h"
|
||||
#include "Poco/Any.h"
|
||||
#include "Poco/DynamicAny.h"
|
||||
#include "Poco/Tuple.h"
|
||||
#include "Poco/DateTime.h"
|
||||
#include "Poco/Data/RecordSet.h"
|
||||
#include "Poco/Data/ODBC/Diagnostics.h"
|
||||
#include "Poco/Data/ODBC/ODBCException.h"
|
||||
#include "Poco/Data/ODBC/ODBCStatementImpl.h"
|
||||
#include <iostream>
|
||||
|
||||
|
||||
using namespace Poco::Data::Keywords;
|
||||
using Poco::Data::DataException;
|
||||
using Poco::Data::Statement;
|
||||
using Poco::Data::RecordSet;
|
||||
using Poco::Data::CLOB;
|
||||
using Poco::Data::ODBC::Utility;
|
||||
using Poco::Data::ODBC::ConnectionException;
|
||||
using Poco::Data::ODBC::StatementException;
|
||||
using Poco::Data::ODBC::StatementDiagnostics;
|
||||
using Poco::format;
|
||||
using Poco::Tuple;
|
||||
using Poco::Any;
|
||||
using Poco::AnyCast;
|
||||
using Poco::DynamicAny;
|
||||
using Poco::DateTime;
|
||||
|
||||
|
||||
// uncomment to force FreeTDS on Windows
|
||||
//#define FORCE_FREE_TDS
|
||||
|
||||
// uncomment to use native SQL driver
|
||||
//#define POCO_ODBC_USE_SQL_NATIVE
|
||||
|
||||
// FreeTDS version selection guide (from http://www.freetds.org/userguide/choosingtdsprotocol.htm)
|
||||
// (see #define FREE_TDS_VERSION below)
|
||||
// Product TDS Version Comment
|
||||
// ---------------------------------------------------+------------+------------------------------------------------------------
|
||||
// Sybase before System 10, Microsoft SQL Server 6.x 4.2 Still works with all products, subject to its limitations.
|
||||
// Sybase System 10 and above 5.0 Still the most current protocol used by Sybase.
|
||||
// Sybase System SQL Anywhere 5.0 only Originally Watcom SQL Server, a completely separate codebase.
|
||||
// Our best information is that SQL Anywhere first supported TDS
|
||||
// in version 5.5.03 using the OpenServer Gateway (OSG), and native
|
||||
// TDS 5.0 support arrived with version 6.0.
|
||||
// Microsoft SQL Server 7.0 7.0 Includes support for the extended datatypes in SQL Server 7.0
|
||||
// (such as char/varchar fields of more than 255 characters), and
|
||||
// support for Unicode.
|
||||
// Microsoft SQL Server 2000 8.0 Include support for bigint (64 bit integers), variant and collation
|
||||
// on all fields. variant is not supported; collation is not widely used.
|
||||
|
||||
#if defined(POCO_OS_FAMILY_WINDOWS) && !defined(FORCE_FREE_TDS)
|
||||
#ifdef POCO_ODBC_USE_SQL_NATIVE
|
||||
#define MS_SQL_SERVER_ODBC_DRIVER "SQL Server Native Client 10.0"
|
||||
#else
|
||||
#define MS_SQL_SERVER_ODBC_DRIVER "SQL Server"
|
||||
#endif
|
||||
#pragma message ("Using " MS_SQL_SERVER_ODBC_DRIVER " driver")
|
||||
#else
|
||||
#define MS_SQL_SERVER_ODBC_DRIVER "FreeTDS"
|
||||
#define FREE_TDS_VERSION "8.0"
|
||||
#if defined(POCO_OS_FAMILY_WINDOWS)
|
||||
#pragma message ("Using " MS_SQL_SERVER_ODBC_DRIVER " driver, version " FREE_TDS_VERSION)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define MS_SQL_SERVER_DSN "PocoDataSQLServerTest"
|
||||
#define MS_SQL_SERVER_SERVER POCO_ODBC_TEST_DATABASE_SERVER "\\SQLEXPRESS"
|
||||
#define MS_SQL_SERVER_PORT "1433"
|
||||
#define MS_SQL_SERVER_DB "poco"
|
||||
#define MS_SQL_SERVER_UID "poco"
|
||||
#define MS_SQL_SERVER_PWD "poco"
|
||||
|
||||
|
||||
ODBCTest::SessionPtr ODBCSQLServerTest::_pSession;
|
||||
ODBCTest::ExecPtr ODBCSQLServerTest::_pExecutor;
|
||||
std::string ODBCSQLServerTest::_driver = MS_SQL_SERVER_ODBC_DRIVER;
|
||||
std::string ODBCSQLServerTest::_dsn = MS_SQL_SERVER_DSN;
|
||||
std::string ODBCSQLServerTest::_uid = MS_SQL_SERVER_UID;
|
||||
std::string ODBCSQLServerTest::_pwd = MS_SQL_SERVER_PWD;
|
||||
std::string ODBCSQLServerTest::_db = MS_SQL_SERVER_DB;
|
||||
|
||||
std::string ODBCSQLServerTest::_connectString = "DRIVER=" MS_SQL_SERVER_ODBC_DRIVER ";"
|
||||
"UID=" MS_SQL_SERVER_UID ";"
|
||||
"PWD=" MS_SQL_SERVER_PWD ";"
|
||||
"DATABASE=" MS_SQL_SERVER_DB ";"
|
||||
"SERVER=" MS_SQL_SERVER_SERVER ";"
|
||||
"PORT=" MS_SQL_SERVER_PORT ";"
|
||||
#ifdef FREE_TDS_VERSION
|
||||
"TDS_Version=" FREE_TDS_VERSION ";"
|
||||
#endif
|
||||
;
|
||||
|
||||
|
||||
ODBCSQLServerTest::ODBCSQLServerTest(const std::string& name):
|
||||
ODBCTest(name, _pSession, _pExecutor, _dsn, _uid, _pwd, _connectString)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
ODBCSQLServerTest::~ODBCSQLServerTest()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void ODBCSQLServerTest::testBareboneODBC()
|
||||
{
|
||||
std::string tableCreateString = "CREATE TABLE Test "
|
||||
"(First VARCHAR(30),"
|
||||
"Second VARCHAR(30),"
|
||||
"Third VARBINARY(30),"
|
||||
"Fourth INTEGER,"
|
||||
"Fifth FLOAT,"
|
||||
"Sixth DATETIME)";
|
||||
|
||||
executor().bareboneODBCTest(dbConnString(), tableCreateString,
|
||||
SQLExecutor::PB_IMMEDIATE, SQLExecutor::DE_MANUAL, true, "CONVERT(VARBINARY(30),?)");
|
||||
executor().bareboneODBCTest(dbConnString(), tableCreateString,
|
||||
SQLExecutor::PB_IMMEDIATE, SQLExecutor::DE_BOUND, true, "CONVERT(VARBINARY(30),?)");
|
||||
executor().bareboneODBCTest(dbConnString(), tableCreateString,
|
||||
SQLExecutor::PB_AT_EXEC, SQLExecutor::DE_MANUAL, true, "CONVERT(VARBINARY(30),?)");
|
||||
executor().bareboneODBCTest(dbConnString(), tableCreateString,
|
||||
SQLExecutor::PB_AT_EXEC, SQLExecutor::DE_BOUND, true, "CONVERT(VARBINARY(30),?)");
|
||||
|
||||
tableCreateString = "CREATE TABLE Test "
|
||||
"(First VARCHAR(30),"
|
||||
"Second INTEGER,"
|
||||
"Third FLOAT)";
|
||||
|
||||
executor().bareboneODBCMultiResultTest(dbConnString(), tableCreateString, SQLExecutor::PB_IMMEDIATE, SQLExecutor::DE_MANUAL);
|
||||
executor().bareboneODBCMultiResultTest(dbConnString(), tableCreateString, SQLExecutor::PB_IMMEDIATE, SQLExecutor::DE_BOUND);
|
||||
executor().bareboneODBCMultiResultTest(dbConnString(), tableCreateString, SQLExecutor::PB_AT_EXEC, SQLExecutor::DE_MANUAL);
|
||||
executor().bareboneODBCMultiResultTest(dbConnString(), tableCreateString, SQLExecutor::PB_AT_EXEC, SQLExecutor::DE_BOUND);
|
||||
}
|
||||
|
||||
|
||||
void ODBCSQLServerTest::testBLOB()
|
||||
{
|
||||
const std::size_t maxFldSize = 250000;
|
||||
session().setProperty("maxFieldSize", Poco::Any(maxFldSize-1));
|
||||
recreatePersonBLOBTable();
|
||||
|
||||
try
|
||||
{
|
||||
executor().blob(maxFldSize, "CONVERT(VARBINARY(MAX),?)");
|
||||
fail ("must fail");
|
||||
}
|
||||
catch (DataException&)
|
||||
{
|
||||
session().setProperty("maxFieldSize", Poco::Any(maxFldSize));
|
||||
}
|
||||
|
||||
for (int i = 0; i < 8;)
|
||||
{
|
||||
recreatePersonBLOBTable();
|
||||
session().setFeature("autoBind", bindValue(i));
|
||||
session().setFeature("autoExtract", bindValue(i+1));
|
||||
executor().blob(maxFldSize, "CONVERT(VARBINARY(MAX),?)");
|
||||
i += 2;
|
||||
}
|
||||
|
||||
recreatePersonBLOBTable();
|
||||
try
|
||||
{
|
||||
executor().blob(maxFldSize+1, "CONVERT(VARBINARY(MAX),?)");
|
||||
fail ("must fail");
|
||||
}
|
||||
catch (DataException&) { }
|
||||
}
|
||||
|
||||
|
||||
void ODBCSQLServerTest::testNull()
|
||||
{
|
||||
// test for NOT NULL violation exception
|
||||
for (int i = 0; i < 8;)
|
||||
{
|
||||
recreateNullsTable("NOT NULL");
|
||||
session().setFeature("autoBind", bindValue(i));
|
||||
session().setFeature("autoExtract", bindValue(i+1));
|
||||
executor().notNulls("23000");
|
||||
i += 2;
|
||||
}
|
||||
|
||||
// test for null insertion
|
||||
for (int i = 0; i < 8;)
|
||||
{
|
||||
recreateNullsTable();
|
||||
session().setFeature("autoBind", bindValue(i));
|
||||
session().setFeature("autoExtract", bindValue(i+1));
|
||||
executor().nulls();
|
||||
i += 2;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ODBCSQLServerTest::testBulk()
|
||||
{
|
||||
if (!_pSession) fail ("Test not available.");
|
||||
|
||||
_pSession->setFeature("autoBind", true);
|
||||
_pSession->setFeature("autoExtract", true);
|
||||
|
||||
recreateMiscTable();
|
||||
_pExecutor->doBulkWithBool<std::vector<int>,
|
||||
std::vector<std::string>,
|
||||
std::vector<CLOB>,
|
||||
std::vector<double>,
|
||||
std::vector<DateTime>,
|
||||
std::vector<bool> >(100, "CONVERT(VARBINARY(30),?)");
|
||||
|
||||
recreateMiscTable();
|
||||
_pExecutor->doBulkWithBool<std::deque<int>,
|
||||
std::deque<std::string>,
|
||||
std::deque<CLOB>,
|
||||
std::deque<double>,
|
||||
std::deque<DateTime>,
|
||||
std::deque<bool> >(100, "CONVERT(VARBINARY(30),?)");
|
||||
|
||||
recreateMiscTable();
|
||||
_pExecutor->doBulkWithBool<std::list<int>,
|
||||
std::list<std::string>,
|
||||
std::list<CLOB>,
|
||||
std::list<double>,
|
||||
std::list<DateTime>,
|
||||
std::list<bool> >(100, "CONVERT(VARBINARY(30),?)");
|
||||
}
|
||||
|
||||
|
||||
void ODBCSQLServerTest::testStoredProcedure()
|
||||
{
|
||||
for (int k = 0; k < 8;)
|
||||
{
|
||||
session().setFeature("autoBind", bindValue(k));
|
||||
session().setFeature("autoExtract", bindValue(k+1));
|
||||
|
||||
dropObject("PROCEDURE", "storedProcedure");
|
||||
|
||||
session() << "CREATE PROCEDURE storedProcedure(@outParam int OUTPUT) AS "
|
||||
"BEGIN "
|
||||
"SET @outParam = -1; "
|
||||
"END;"
|
||||
, now;
|
||||
|
||||
int i = 0;
|
||||
session() << "{call storedProcedure(?)}", out(i), now;
|
||||
assertTrue (-1 == i);
|
||||
dropObject("PROCEDURE", "storedProcedure");
|
||||
|
||||
session() << "CREATE PROCEDURE storedProcedure(@inParam int, @outParam int OUTPUT) AS "
|
||||
"BEGIN "
|
||||
"SET @outParam = @inParam*@inParam; "
|
||||
"END;"
|
||||
, now;
|
||||
|
||||
i = 2;
|
||||
int j = 0;
|
||||
session() << "{call storedProcedure(?, ?)}", in(i), out(j), now;
|
||||
assertTrue (4 == j);
|
||||
dropObject("PROCEDURE", "storedProcedure");
|
||||
|
||||
session() << "CREATE PROCEDURE storedProcedure(@ioParam int OUTPUT) AS "
|
||||
"BEGIN "
|
||||
"SET @ioParam = @ioParam*@ioParam; "
|
||||
"END;"
|
||||
, now;
|
||||
|
||||
i = 2;
|
||||
session() << "{call storedProcedure(?)}", io(i), now;
|
||||
assertTrue (4 == i);
|
||||
dropObject("PROCEDURE", "storedProcedure");
|
||||
|
||||
session() << "CREATE PROCEDURE storedProcedure(@ioParam DATETIME OUTPUT) AS "
|
||||
"BEGIN "
|
||||
" SET @ioParam = @ioParam + 1; "
|
||||
"END;" , now;
|
||||
|
||||
DateTime dt(1965, 6, 18, 5, 35, 1);
|
||||
session() << "{call storedProcedure(?)}", io(dt), now;
|
||||
assertTrue (19 == dt.day());
|
||||
dropObject("PROCEDURE", "storedProcedure");
|
||||
|
||||
k += 2;
|
||||
}
|
||||
/*TODO - currently fails with following error:
|
||||
|
||||
[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid parameter
|
||||
2 (''): Data type 0x23 is a deprecated large object, or LOB, but is marked as output parameter.
|
||||
Deprecated types are not supported as output parameters. Use current large object types instead.
|
||||
|
||||
session().setFeature("autoBind", true);
|
||||
session() << "CREATE PROCEDURE storedProcedure(@inParam VARCHAR(MAX), @outParam VARCHAR(MAX) OUTPUT) AS "
|
||||
"BEGIN "
|
||||
"SET @outParam = @inParam; "
|
||||
"END;"
|
||||
, now;
|
||||
|
||||
std::string inParam = "123";
|
||||
std::string outParam;
|
||||
try{
|
||||
session() << "{call storedProcedure(?, ?)}", in(inParam), out(outParam), now;
|
||||
}catch(StatementException& ex){std::cout << ex.toString();}
|
||||
assertTrue (outParam == inParam);
|
||||
dropObject("PROCEDURE", "storedProcedure");
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
void ODBCSQLServerTest::testCursorStoredProcedure()
|
||||
{
|
||||
for (int k = 0; k < 8;)
|
||||
{
|
||||
session().setFeature("autoBind", bindValue(k));
|
||||
session().setFeature("autoExtract", bindValue(k+1));
|
||||
|
||||
recreatePersonTable();
|
||||
typedef Tuple<std::string, std::string, std::string, int> Person;
|
||||
std::vector<Person> people;
|
||||
people.push_back(Person("Simpson", "Homer", "Springfield", 42));
|
||||
people.push_back(Person("Simpson", "Bart", "Springfield", 12));
|
||||
people.push_back(Person("Simpson", "Lisa", "Springfield", 10));
|
||||
session() << "INSERT INTO Person VALUES (?, ?, ?, ?)", use(people), now;
|
||||
|
||||
dropObject("PROCEDURE", "storedCursorProcedure");
|
||||
session() << "CREATE PROCEDURE storedCursorProcedure(@ageLimit int) AS "
|
||||
"BEGIN "
|
||||
" SELECT * "
|
||||
" FROM Person "
|
||||
" WHERE Age < @ageLimit "
|
||||
" ORDER BY Age DESC; "
|
||||
"END;"
|
||||
, now;
|
||||
|
||||
people.clear();
|
||||
int age = 13;
|
||||
|
||||
session() << "{call storedCursorProcedure(?)}", in(age), into(people), now;
|
||||
|
||||
assertTrue (2 == people.size());
|
||||
assertTrue (Person("Simpson", "Bart", "Springfield", 12) == people[0]);
|
||||
assertTrue (Person("Simpson", "Lisa", "Springfield", 10) == people[1]);
|
||||
|
||||
Statement stmt = ((session() << "{call storedCursorProcedure(?)}", in(age), now));
|
||||
RecordSet rs(stmt);
|
||||
assertTrue (rs["LastName"] == "Simpson");
|
||||
assertTrue (rs["FirstName"] == "Bart");
|
||||
assertTrue (rs["Address"] == "Springfield");
|
||||
assertTrue (rs["Age"] == 12);
|
||||
|
||||
dropObject("TABLE", "Person");
|
||||
dropObject("PROCEDURE", "storedCursorProcedure");
|
||||
|
||||
k += 2;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ODBCSQLServerTest::testStoredProcedureAny()
|
||||
{
|
||||
for (int k = 0; k < 8;)
|
||||
{
|
||||
session().setFeature("autoBind", bindValue(k));
|
||||
session().setFeature("autoExtract", bindValue(k+1));
|
||||
|
||||
Any i = 2;
|
||||
Any j = 0;
|
||||
|
||||
session() << "CREATE PROCEDURE storedProcedure(@inParam int, @outParam int OUTPUT) AS "
|
||||
"BEGIN "
|
||||
"SET @outParam = @inParam*@inParam; "
|
||||
"END;"
|
||||
, now;
|
||||
|
||||
session() << "{call storedProcedure(?, ?)}", in(i), out(j), now;
|
||||
assertTrue (4 == AnyCast<int>(j));
|
||||
session() << "DROP PROCEDURE storedProcedure;", now;
|
||||
|
||||
session() << "CREATE PROCEDURE storedProcedure(@ioParam int OUTPUT) AS "
|
||||
"BEGIN "
|
||||
"SET @ioParam = @ioParam*@ioParam; "
|
||||
"END;"
|
||||
, now;
|
||||
|
||||
i = 2;
|
||||
session() << "{call storedProcedure(?)}", io(i), now;
|
||||
assertTrue (4 == AnyCast<int>(i));
|
||||
dropObject("PROCEDURE", "storedProcedure");
|
||||
|
||||
k += 2;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ODBCSQLServerTest::testStoredProcedureDynamicAny()
|
||||
{
|
||||
for (int k = 0; k < 8;)
|
||||
{
|
||||
session().setFeature("autoBind", bindValue(k));
|
||||
|
||||
DynamicAny i = 2;
|
||||
DynamicAny j = 0;
|
||||
|
||||
session() << "CREATE PROCEDURE storedProcedure(@inParam int, @outParam int OUTPUT) AS "
|
||||
"BEGIN "
|
||||
"SET @outParam = @inParam*@inParam; "
|
||||
"END;"
|
||||
, now;
|
||||
|
||||
session() << "{call storedProcedure(?, ?)}", in(i), out(j), now;
|
||||
assertTrue (4 == j);
|
||||
session() << "DROP PROCEDURE storedProcedure;", now;
|
||||
|
||||
session() << "CREATE PROCEDURE storedProcedure(@ioParam int OUTPUT) AS "
|
||||
"BEGIN "
|
||||
"SET @ioParam = @ioParam*@ioParam; "
|
||||
"END;"
|
||||
, now;
|
||||
|
||||
i = 2;
|
||||
session() << "{call storedProcedure(?)}", io(i), now;
|
||||
assertTrue (4 == i);
|
||||
dropObject("PROCEDURE", "storedProcedure");
|
||||
|
||||
k += 2;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ODBCSQLServerTest::testStoredFunction()
|
||||
{
|
||||
for (int k = 0; k < 8;)
|
||||
{
|
||||
session().setFeature("autoBind", bindValue(k));
|
||||
session().setFeature("autoExtract", bindValue(k+1));
|
||||
|
||||
dropObject("PROCEDURE", "storedFunction");
|
||||
session() << "CREATE PROCEDURE storedFunction AS "
|
||||
"BEGIN "
|
||||
"DECLARE @retVal int;"
|
||||
"SET @retVal = -1;"
|
||||
"RETURN @retVal;"
|
||||
"END;"
|
||||
, now;
|
||||
|
||||
int i = 0;
|
||||
session() << "{? = call storedFunction}", out(i), now;
|
||||
assertTrue (-1 == i);
|
||||
dropObject("PROCEDURE", "storedFunction");
|
||||
|
||||
|
||||
session() << "CREATE PROCEDURE storedFunction(@inParam int) AS "
|
||||
"BEGIN "
|
||||
"RETURN @inParam*@inParam;"
|
||||
"END;"
|
||||
, now;
|
||||
|
||||
i = 2;
|
||||
int result = 0;
|
||||
session() << "{? = call storedFunction(?)}", out(result), in(i), now;
|
||||
assertTrue (4 == result);
|
||||
dropObject("PROCEDURE", "storedFunction");
|
||||
|
||||
|
||||
session() << "CREATE PROCEDURE storedFunction(@inParam int, @outParam int OUTPUT) AS "
|
||||
"BEGIN "
|
||||
"SET @outParam = @inParam*@inParam;"
|
||||
"RETURN @outParam;"
|
||||
"END"
|
||||
, now;
|
||||
|
||||
i = 2;
|
||||
int j = 0;
|
||||
result = 0;
|
||||
session() << "{? = call storedFunction(?, ?)}", out(result), in(i), out(j), now;
|
||||
assertTrue (4 == j);
|
||||
assertTrue (j == result);
|
||||
dropObject("PROCEDURE", "storedFunction");
|
||||
|
||||
|
||||
session() << "CREATE PROCEDURE storedFunction(@param1 int OUTPUT,@param2 int OUTPUT) AS "
|
||||
"BEGIN "
|
||||
"DECLARE @temp int; "
|
||||
"SET @temp = @param1;"
|
||||
"SET @param1 = @param2;"
|
||||
"SET @param2 = @temp;"
|
||||
"RETURN @param1 + @param2; "
|
||||
"END"
|
||||
, now;
|
||||
|
||||
i = 1;
|
||||
j = 2;
|
||||
result = 0;
|
||||
session() << "{? = call storedFunction(?, ?)}", out(result), io(i), io(j), now;
|
||||
assertTrue (1 == j);
|
||||
assertTrue (2 == i);
|
||||
assertTrue (3 == result);
|
||||
|
||||
Tuple<int, int> params(1, 2);
|
||||
assertTrue (1 == params.get<0>());
|
||||
assertTrue (2 == params.get<1>());
|
||||
result = 0;
|
||||
session() << "{? = call storedFunction(?, ?)}", out(result), io(params), now;
|
||||
assertTrue (1 == params.get<1>());
|
||||
assertTrue (2 == params.get<0>());
|
||||
assertTrue (3 == result);
|
||||
|
||||
dropObject("PROCEDURE", "storedFunction");
|
||||
|
||||
k += 2;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ODBCSQLServerTest::dropObject(const std::string& type, const std::string& name)
|
||||
{
|
||||
try
|
||||
{
|
||||
session() << format("DROP %s %s", type, name), now;
|
||||
}
|
||||
catch (StatementException& ex)
|
||||
{
|
||||
bool ignoreError = false;
|
||||
const StatementDiagnostics::FieldVec& flds = ex.diagnostics().fields();
|
||||
StatementDiagnostics::Iterator it = flds.begin();
|
||||
for (; it != flds.end(); ++it)
|
||||
{
|
||||
if (3701 == it->_nativeError)//(table does not exist)
|
||||
{
|
||||
ignoreError = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!ignoreError) throw;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ODBCSQLServerTest::recreateNullableTable()
|
||||
{
|
||||
dropObject("TABLE", "NullableTest");
|
||||
try { *_pSession << "CREATE TABLE NullableTest (EmptyString VARCHAR(30) NULL, EmptyInteger INTEGER NULL, EmptyFloat FLOAT NULL , EmptyDateTime DATETIME NULL)", now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCSQLServerTest::recreatePersonTable()
|
||||
{
|
||||
dropObject("TABLE", "Person");
|
||||
try { session() << "CREATE TABLE Person (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), Age INTEGER)", now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCSQLServerTest::recreatePersonBLOBTable()
|
||||
{
|
||||
dropObject("TABLE", "Person");
|
||||
try { session() << "CREATE TABLE Person (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), Image VARBINARY(MAX))", now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonBLOBTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonBLOBTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCSQLServerTest::recreatePersonDateTimeTable()
|
||||
{
|
||||
dropObject("TABLE", "Person");
|
||||
try { session() << "CREATE TABLE Person (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), Born DATETIME)", now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonDateTimeTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonDateTimeTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCSQLServerTest::recreateIntsTable()
|
||||
{
|
||||
dropObject("TABLE", "Strings");
|
||||
try { session() << "CREATE TABLE Strings (str INTEGER)", now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateIntsTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateIntsTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCSQLServerTest::recreateStringsTable()
|
||||
{
|
||||
dropObject("TABLE", "Strings");
|
||||
try { session() << "CREATE TABLE Strings (str VARCHAR(30))", now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateStringsTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateStringsTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCSQLServerTest::recreateFloatsTable()
|
||||
{
|
||||
dropObject("TABLE", "Strings");
|
||||
try { session() << "CREATE TABLE Strings (str FLOAT)", now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateFloatsTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateFloatsTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCSQLServerTest::recreateTuplesTable()
|
||||
{
|
||||
dropObject("TABLE", "Tuples");
|
||||
try { session() << "CREATE TABLE Tuples "
|
||||
"(int0 INTEGER, int1 INTEGER, int2 INTEGER, int3 INTEGER, int4 INTEGER, int5 INTEGER, int6 INTEGER, "
|
||||
"int7 INTEGER, int8 INTEGER, int9 INTEGER, int10 INTEGER, int11 INTEGER, int12 INTEGER, int13 INTEGER,"
|
||||
"int14 INTEGER, int15 INTEGER, int16 INTEGER, int17 INTEGER, int18 INTEGER, int19 INTEGER)", now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateTuplesTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateTuplesTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCSQLServerTest::recreateVectorTable()
|
||||
{
|
||||
dropObject("TABLE", "Vector");
|
||||
try { session() << "CREATE TABLE Vector (i0 INTEGER)", now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateVectorTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateVectorTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCSQLServerTest::recreateVectorsTable()
|
||||
{
|
||||
dropObject("TABLE", "Vectors");
|
||||
try { session() << "CREATE TABLE Vectors (int0 INTEGER, flt0 FLOAT, str0 VARCHAR(30))", now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateVectorsTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateVectorsTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCSQLServerTest::recreateAnysTable()
|
||||
{
|
||||
dropObject("TABLE", "Anys");
|
||||
try { session() << "CREATE TABLE Anys (int0 INTEGER, flt0 FLOAT, str0 VARCHAR(30))", now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateAnysTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateAnysTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCSQLServerTest::recreateNullsTable(const std::string& notNull)
|
||||
{
|
||||
dropObject("TABLE", "NullTest");
|
||||
try { session() << format("CREATE TABLE NullTest (i INTEGER %s, r FLOAT %s, v VARCHAR(30) %s)",
|
||||
notNull,
|
||||
notNull,
|
||||
notNull), now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateNullsTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateNullsTable()"); }
|
||||
}
|
||||
|
||||
void ODBCSQLServerTest::recreateBoolTable()
|
||||
{
|
||||
dropObject("TABLE", "BoolTest");
|
||||
try { session() << "CREATE TABLE BoolTest (b BIT)", now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateBoolTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateBoolTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCSQLServerTest::recreateMiscTable()
|
||||
{
|
||||
dropObject("TABLE", "MiscTest");
|
||||
try
|
||||
{
|
||||
session() << "CREATE TABLE MiscTest "
|
||||
"(First VARCHAR(30),"
|
||||
"Second VARBINARY(30),"
|
||||
"Third INTEGER,"
|
||||
"Fourth FLOAT,"
|
||||
"Fifth DATETIME,"
|
||||
"Sixth BIT)", now;
|
||||
} catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateMiscTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateMiscTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCSQLServerTest::recreateLogTable()
|
||||
{
|
||||
dropObject("TABLE", "T_POCO_LOG");
|
||||
dropObject("TABLE", "T_POCO_LOG_ARCHIVE");
|
||||
|
||||
try
|
||||
{
|
||||
std::string sql = "CREATE TABLE %s "
|
||||
"(Source VARCHAR(max),"
|
||||
"Name VARCHAR(max),"
|
||||
"ProcessId INTEGER,"
|
||||
"Thread VARCHAR(max), "
|
||||
"ThreadId INTEGER,"
|
||||
"Priority INTEGER,"
|
||||
"Text VARCHAR(max),"
|
||||
"DateTime DATETIME)";
|
||||
|
||||
session() << sql, "T_POCO_LOG", now;
|
||||
session() << sql, "T_POCO_LOG_ARCHIVE", now;
|
||||
|
||||
} catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateLogTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateLogTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCSQLServerTest::recreateUnicodeTable()
|
||||
{
|
||||
#if defined (POCO_ODBC_UNICODE)
|
||||
dropObject("TABLE", "UnicodeTable");
|
||||
try { session() << "CREATE TABLE UnicodeTable (str NVARCHAR(30))", now; }
|
||||
catch (ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail("recreateUnicodeTable()"); }
|
||||
catch (StatementException& se){ std::cout << se.toString() << std::endl; fail("recreateUnicodeTable()"); }
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
CppUnit::Test* ODBCSQLServerTest::suite()
|
||||
{
|
||||
if ((_pSession = init(_driver, _dsn, _uid, _pwd, _connectString, _db)))
|
||||
{
|
||||
std::cout << "*** Connected to [" << _driver << "] test database." << std::endl;
|
||||
|
||||
_pExecutor = new SQLExecutor(_driver + " SQL Executor", _pSession);
|
||||
|
||||
CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("ODBCSQLServerTest");
|
||||
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testBareboneODBC);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testZeroRows);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testSimpleAccess);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testComplexType);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testSimpleAccessVector);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testComplexTypeVector);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testSharedPtrComplexTypeVector);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testAutoPtrComplexTypeVector);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testInsertVector);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testInsertEmptyVector);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testSimpleAccessList);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testComplexTypeList);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testInsertList);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testInsertEmptyList);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testSimpleAccessDeque);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testComplexTypeDeque);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testInsertDeque);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testInsertEmptyDeque);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testAffectedRows);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testInsertSingleBulk);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testInsertSingleBulkVec);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testLimit);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testLimitOnce);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testLimitPrepare);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testLimitZero);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testPrepare);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testBulk);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testBulkPerformance);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testSetSimple);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testSetComplex);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testSetComplexUnique);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testMultiSetSimple);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testMultiSetComplex);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testMapComplex);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testMapComplexUnique);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testMultiMapComplex);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testSelectIntoSingle);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testSelectIntoSingleStep);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testSelectIntoSingleFail);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testLowerLimitOk);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testLowerLimitFail);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testCombinedLimits);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testCombinedIllegalLimits);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testRange);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testIllegalRange);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testSingleSelect);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testEmptyDB);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testBLOB);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testBLOBContainer);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testBLOBStmt);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testDateTime);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testFloat);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testDouble);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testTuple);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testTupleVector);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testStoredProcedure);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testCursorStoredProcedure);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testStoredProcedureAny);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testStoredProcedureDynamicAny);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testStoredFunction);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testInternalExtraction);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testFilter);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testInternalBulkExtraction);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testInternalStorageType);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testNull);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testRowIterator);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testStdVectorBool);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testAsync);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testAny);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testDynamicAny);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testMultipleResults);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testSQLChannel);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testSQLLogger);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testSessionTransaction);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testTransaction);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testTransactor);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testNullable);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testUnicode);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testReconnect);
|
||||
|
||||
return pSuite;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
//
|
||||
// ODBCSQLServerTest.h
|
||||
//
|
||||
// Definition of the ODBCSQLServerTest class.
|
||||
//
|
||||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#ifndef ODBCSQLServerTest_INCLUDED
|
||||
#define ODBCSQLServerTest_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Data/ODBC/ODBC.h"
|
||||
#include "ODBCTest.h"
|
||||
|
||||
|
||||
// uncomment to use native SQL Server ODBC driver
|
||||
// #define POCO_ODBC_USE_SQL_NATIVE
|
||||
|
||||
|
||||
class ODBCSQLServerTest: public ODBCTest
|
||||
/// SQLServer ODBC test class
|
||||
/// Tested:
|
||||
///
|
||||
/// Driver | DB | OS
|
||||
/// --------------------+-----------------------------------+------------------------------------------
|
||||
/// 2000.86.1830.00 | SQL Server Express 9.0.2047 | MS Windows XP Professional x64 v.2003/SP1
|
||||
/// 2005.90.2047.00 | SQL Server Express 9.0.2047 | MS Windows XP Professional x64 v.2003/SP1
|
||||
/// 2009.100.1600.01 | SQL Server Express 10.50.1600.1 | MS Windows XP Professional x64 v.2003/SP1
|
||||
///
|
||||
|
||||
{
|
||||
public:
|
||||
ODBCSQLServerTest(const std::string& name);
|
||||
~ODBCSQLServerTest();
|
||||
|
||||
void testBareboneODBC();
|
||||
|
||||
void testBLOB();
|
||||
void testNull();
|
||||
void testBulk();
|
||||
|
||||
void testStoredProcedure();
|
||||
void testCursorStoredProcedure();
|
||||
void testStoredProcedureAny();
|
||||
void testStoredProcedureDynamicAny();
|
||||
|
||||
void testStoredFunction();
|
||||
|
||||
static CppUnit::Test* suite();
|
||||
|
||||
private:
|
||||
void dropObject(const std::string& type, const std::string& name);
|
||||
void recreateNullableTable();
|
||||
void recreatePersonTable();
|
||||
void recreatePersonBLOBTable();
|
||||
void recreatePersonDateTimeTable();
|
||||
void recreatePersonDateTable() { /* no-op */ };
|
||||
void recreatePersonTimeTable() { /* no-op */ };
|
||||
void recreateStringsTable();
|
||||
void recreateIntsTable();
|
||||
void recreateFloatsTable();
|
||||
void recreateTuplesTable();
|
||||
void recreateVectorTable();
|
||||
void recreateVectorsTable();
|
||||
void recreateAnysTable();
|
||||
void recreateNullsTable(const std::string& notNull = "");
|
||||
void recreateBoolTable();
|
||||
void recreateMiscTable();
|
||||
void recreateLogTable();
|
||||
void recreateUnicodeTable();
|
||||
|
||||
static SessionPtr _pSession;
|
||||
static ExecPtr _pExecutor;
|
||||
static std::string _driver;
|
||||
static std::string _dsn;
|
||||
static std::string _uid;
|
||||
static std::string _pwd;
|
||||
static std::string _db;
|
||||
static std::string _connectString;
|
||||
};
|
||||
|
||||
|
||||
#endif // ODBCSQLServerTest_INCLUDED
|
||||
@@ -0,0 +1,397 @@
|
||||
//
|
||||
// ODBCSQLiteTest.cpp
|
||||
//
|
||||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#include "ODBCSQLiteTest.h"
|
||||
#include "CppUnit/TestCaller.h"
|
||||
#include "CppUnit/TestSuite.h"
|
||||
#include "Poco/String.h"
|
||||
#include "Poco/Format.h"
|
||||
#include "Poco/Exception.h"
|
||||
#include "Poco/Data/LOB.h"
|
||||
#include "Poco/Data/StatementImpl.h"
|
||||
#include "Poco/Data/ODBC/Connector.h"
|
||||
#include "Poco/Data/ODBC/Utility.h"
|
||||
#include "Poco/Data/ODBC/Diagnostics.h"
|
||||
#include "Poco/Data/ODBC/ODBCException.h"
|
||||
#include "Poco/Data/ODBC/ODBCStatementImpl.h"
|
||||
#include <sqltypes.h>
|
||||
#include <iostream>
|
||||
|
||||
|
||||
using namespace Poco::Data::Keywords;
|
||||
using Poco::Data::ODBC::Utility;
|
||||
using Poco::Data::ODBC::ConnectionException;
|
||||
using Poco::Data::ODBC::StatementException;
|
||||
using Poco::Data::ODBC::StatementDiagnostics;
|
||||
using Poco::format;
|
||||
using Poco::NotFoundException;
|
||||
|
||||
|
||||
#define SQLITE_ODBC_DRIVER "SQLite3 ODBC Driver"
|
||||
#define SQLITE_DSN "PocoDataSQLiteTest"
|
||||
#define SQLITE_DB "dummy.db"
|
||||
|
||||
|
||||
ODBCTest::SessionPtr ODBCSQLiteTest::_pSession;
|
||||
ODBCTest::ExecPtr ODBCSQLiteTest::_pExecutor;
|
||||
std::string ODBCSQLiteTest::_driver = SQLITE_ODBC_DRIVER;
|
||||
std::string ODBCSQLiteTest::_dsn = SQLITE_DSN;
|
||||
std::string ODBCSQLiteTest::_uid = "";
|
||||
std::string ODBCSQLiteTest::_pwd = "";
|
||||
std::string ODBCSQLiteTest::_connectString = "Driver=" SQLITE_ODBC_DRIVER
|
||||
";Database=" SQLITE_DB ";";
|
||||
|
||||
|
||||
ODBCSQLiteTest::ODBCSQLiteTest(const std::string& name):
|
||||
ODBCTest(name, _pSession, _pExecutor, _dsn, _uid, _pwd, _connectString)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
ODBCSQLiteTest::~ODBCSQLiteTest()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void ODBCSQLiteTest::testBareboneODBC()
|
||||
{
|
||||
std::string tableCreateString = "CREATE TABLE Test "
|
||||
"(First VARCHAR(30),"
|
||||
"Second VARCHAR(30),"
|
||||
"Third BLOB,"
|
||||
"Fourth INTEGER,"
|
||||
"Fifth REAL,"
|
||||
"Sixth TIMESTAMP)";
|
||||
|
||||
executor().bareboneODBCTest(dbConnString(), tableCreateString, SQLExecutor::PB_IMMEDIATE, SQLExecutor::DE_MANUAL);
|
||||
executor().bareboneODBCTest(dbConnString(), tableCreateString, SQLExecutor::PB_IMMEDIATE, SQLExecutor::DE_BOUND);
|
||||
executor().bareboneODBCTest(dbConnString(), tableCreateString, SQLExecutor::PB_AT_EXEC, SQLExecutor::DE_MANUAL);
|
||||
executor().bareboneODBCTest(dbConnString(), tableCreateString, SQLExecutor::PB_AT_EXEC, SQLExecutor::DE_BOUND);
|
||||
|
||||
tableCreateString = "CREATE TABLE Test "
|
||||
"(First VARCHAR(30),"
|
||||
"Second VARCHAR(30),"
|
||||
"Third BLOB,"
|
||||
"Fourth INTEGER,"
|
||||
"Fifth REAL,"
|
||||
"Sixth DATETIME)";
|
||||
|
||||
executor().bareboneODBCTest(dbConnString(), tableCreateString, SQLExecutor::PB_IMMEDIATE, SQLExecutor::DE_MANUAL);
|
||||
executor().bareboneODBCTest(dbConnString(), tableCreateString, SQLExecutor::PB_IMMEDIATE, SQLExecutor::DE_BOUND);
|
||||
executor().bareboneODBCTest(dbConnString(), tableCreateString, SQLExecutor::PB_AT_EXEC, SQLExecutor::DE_MANUAL);
|
||||
executor().bareboneODBCTest(dbConnString(), tableCreateString, SQLExecutor::PB_AT_EXEC, SQLExecutor::DE_BOUND);
|
||||
|
||||
tableCreateString = "CREATE TABLE Test "
|
||||
"(First VARCHAR(30),"
|
||||
"Second VARCHAR(30),"
|
||||
"Third BLOB,"
|
||||
"Fourth INTEGER,"
|
||||
"Fifth REAL,"
|
||||
"Sixth DATE)";
|
||||
|
||||
executor().bareboneODBCTest(dbConnString(), tableCreateString, SQLExecutor::PB_IMMEDIATE, SQLExecutor::DE_MANUAL);
|
||||
executor().bareboneODBCTest(dbConnString(), tableCreateString, SQLExecutor::PB_IMMEDIATE, SQLExecutor::DE_BOUND);
|
||||
executor().bareboneODBCTest(dbConnString(), tableCreateString, SQLExecutor::PB_AT_EXEC, SQLExecutor::DE_MANUAL);
|
||||
executor().bareboneODBCTest(dbConnString(), tableCreateString, SQLExecutor::PB_AT_EXEC, SQLExecutor::DE_BOUND);
|
||||
}
|
||||
|
||||
|
||||
void ODBCSQLiteTest::testAffectedRows()
|
||||
{
|
||||
if (!_pSession) fail ("Test not available.");
|
||||
|
||||
for (int i = 0; i < 8;)
|
||||
{
|
||||
recreateStringsTable();
|
||||
_pSession->setFeature("autoBind", bindValue(i));
|
||||
_pSession->setFeature("autoExtract", bindValue(i+1));
|
||||
// see SQLiteStatementImpl::affectedRows() documentation for explanation
|
||||
// why "WHERE 1" is necessary here
|
||||
_pExecutor->affectedRows("WHERE 1");
|
||||
i += 2;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ODBCSQLiteTest::testNull()
|
||||
{
|
||||
if (!_pSession) fail ("Test not available.");
|
||||
|
||||
// test for NOT NULL violation exception
|
||||
for (int i = 0; i < 8;)
|
||||
{
|
||||
recreateNullsTable("NOT NULL");
|
||||
session().setFeature("autoBind", bindValue(i));
|
||||
session().setFeature("autoExtract", bindValue(i+1));
|
||||
_pExecutor->notNulls("HY000");
|
||||
i += 2;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ODBCSQLiteTest::dropObject(const std::string& type, const std::string& name)
|
||||
{
|
||||
try
|
||||
{
|
||||
session() << format("DROP %s %s", type, name), now;
|
||||
}
|
||||
catch (StatementException& ex)
|
||||
{
|
||||
bool ignoreError = false;
|
||||
const StatementDiagnostics::FieldVec& flds = ex.diagnostics().fields();
|
||||
StatementDiagnostics::Iterator it = flds.begin();
|
||||
for (; it != flds.end(); ++it)
|
||||
{
|
||||
if (1 == it->_nativeError)//(no such table)
|
||||
{
|
||||
ignoreError = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!ignoreError)
|
||||
{
|
||||
std::cout << ex.toString() << std::endl;
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ODBCSQLiteTest::recreateNullableTable()
|
||||
{
|
||||
dropObject("TABLE", "NullableTest");
|
||||
try { *_pSession << "CREATE TABLE NullableTest (EmptyString VARCHAR(30) NULL, EmptyInteger INTEGER NULL, EmptyFloat REAL NULL , EmptyDateTime TIMESTAMP NULL)", now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCSQLiteTest::recreatePersonTable()
|
||||
{
|
||||
dropObject("TABLE", "Person");
|
||||
try { session() << "CREATE TABLE Person (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), Age INTEGER)", now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCSQLiteTest::recreatePersonBLOBTable()
|
||||
{
|
||||
dropObject("TABLE", "Person");
|
||||
try { session() << "CREATE TABLE Person (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), Image BLOB)", now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonBLOBTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonBLOBTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCSQLiteTest::recreatePersonDateTimeTable()
|
||||
{
|
||||
dropObject("TABLE", "Person");
|
||||
try { session() << "CREATE TABLE Person (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), Born TIMESTAMP)", now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonDateTimeTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonDateTimeTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCSQLiteTest::recreateIntsTable()
|
||||
{
|
||||
dropObject("TABLE", "Strings");
|
||||
try { session() << "CREATE TABLE Strings (str INTEGER)", now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateIntsTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateIntsTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCSQLiteTest::recreateStringsTable()
|
||||
{
|
||||
dropObject("TABLE", "Strings");
|
||||
try { session() << "CREATE TABLE Strings (str VARCHAR(30))", now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateStringsTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateStringsTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCSQLiteTest::recreateFloatsTable()
|
||||
{
|
||||
dropObject("TABLE", "Strings");
|
||||
try { session() << "CREATE TABLE Strings (str REAL)", now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateFloatsTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateFloatsTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCSQLiteTest::recreateTuplesTable()
|
||||
{
|
||||
dropObject("TABLE", "Tuples");
|
||||
try { session() << "CREATE TABLE Tuples "
|
||||
"(int0 INTEGER, int1 INTEGER, int2 INTEGER, int3 INTEGER, int4 INTEGER, int5 INTEGER, int6 INTEGER, "
|
||||
"int7 INTEGER, int8 INTEGER, int9 INTEGER, int10 INTEGER, int11 INTEGER, int12 INTEGER, int13 INTEGER,"
|
||||
"int14 INTEGER, int15 INTEGER, int16 INTEGER, int17 INTEGER, int18 INTEGER, int19 INTEGER)", now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateTuplesTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateTuplesTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCSQLiteTest::recreateVectorsTable()
|
||||
{
|
||||
dropObject("TABLE", "Vectors");
|
||||
try { session() << "CREATE TABLE Vectors (int0 INTEGER, flt0 REAL, str0 VARCHAR)", now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateVectorsTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateVectorsTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCSQLiteTest::recreateAnysTable()
|
||||
{
|
||||
dropObject("TABLE", "Anys");
|
||||
try { session() << "CREATE TABLE Anys (int0 INTEGER, flt0 REAL, str0 VARCHAR)", now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateAnysTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateAnysTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCSQLiteTest::recreateNullsTable(const std::string& notNull)
|
||||
{
|
||||
dropObject("TABLE", "NullTest");
|
||||
try { session() << format("CREATE TABLE NullTest (i INTEGER %s, r REAL %s, v VARCHAR(30) %s)",
|
||||
notNull,
|
||||
notNull,
|
||||
notNull), now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateNullsTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateNullsTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCSQLiteTest::recreateMiscTable()
|
||||
{
|
||||
dropObject("TABLE", "MiscTest");
|
||||
try
|
||||
{
|
||||
// SQLite fails with BLOB bulk operations
|
||||
session() << "CREATE TABLE MiscTest "
|
||||
"(First VARCHAR(30),"
|
||||
//"Second BLOB,"
|
||||
"Third INTEGER,"
|
||||
"Fourth REAL,"
|
||||
"Fifth DATETIME)", now;
|
||||
} catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateMiscTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateMiscTable()"); }
|
||||
}
|
||||
|
||||
|
||||
void ODBCSQLiteTest::recreateLogTable()
|
||||
{
|
||||
dropObject("TABLE", "T_POCO_LOG");
|
||||
dropObject("TABLE", "T_POCO_LOG_ARCHIVE");
|
||||
|
||||
try
|
||||
{
|
||||
std::string sql = "CREATE TABLE %s "
|
||||
"(Source VARCHAR,"
|
||||
"Name VARCHAR,"
|
||||
"ProcessId INTEGER,"
|
||||
"Thread VARCHAR, "
|
||||
"ThreadId INTEGER,"
|
||||
"Priority INTEGER,"
|
||||
"Text VARCHAR,"
|
||||
"DateTime DATETIME)";
|
||||
|
||||
session() << sql, "T_POCO_LOG", now;
|
||||
session() << sql, "T_POCO_LOG_ARCHIVE", now;
|
||||
|
||||
} catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreateLogTable()"); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreateLogTable()"); }
|
||||
}
|
||||
|
||||
|
||||
CppUnit::Test* ODBCSQLiteTest::suite()
|
||||
{
|
||||
if ((_pSession = init(_driver, _dsn, _uid, _pwd, _connectString)))
|
||||
{
|
||||
std::cout << "*** Connected to [" << _driver << "] test database." << std::endl;
|
||||
|
||||
_pExecutor = new SQLExecutor(_driver + " SQL Executor", _pSession);
|
||||
|
||||
CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("ODBCSQLiteTest");
|
||||
|
||||
CppUnit_addTest(pSuite, ODBCSQLiteTest, testBareboneODBC);
|
||||
CppUnit_addTest(pSuite, ODBCSQLiteTest, testZeroRows);
|
||||
CppUnit_addTest(pSuite, ODBCSQLiteTest, testSimpleAccess);
|
||||
CppUnit_addTest(pSuite, ODBCSQLiteTest, testComplexType);
|
||||
CppUnit_addTest(pSuite, ODBCSQLiteTest, testSimpleAccessVector);
|
||||
CppUnit_addTest(pSuite, ODBCSQLiteTest, testComplexTypeVector);
|
||||
CppUnit_addTest(pSuite, ODBCSQLiteTest, testSharedPtrComplexTypeVector);
|
||||
CppUnit_addTest(pSuite, ODBCSQLiteTest, testAutoPtrComplexTypeVector);
|
||||
CppUnit_addTest(pSuite, ODBCSQLiteTest, testInsertVector);
|
||||
CppUnit_addTest(pSuite, ODBCSQLiteTest, testInsertEmptyVector);
|
||||
CppUnit_addTest(pSuite, ODBCSQLiteTest, testSimpleAccessList);
|
||||
CppUnit_addTest(pSuite, ODBCSQLiteTest, testComplexTypeList);
|
||||
CppUnit_addTest(pSuite, ODBCSQLiteTest, testInsertList);
|
||||
CppUnit_addTest(pSuite, ODBCSQLiteTest, testInsertEmptyList);
|
||||
CppUnit_addTest(pSuite, ODBCSQLiteTest, testSimpleAccessDeque);
|
||||
CppUnit_addTest(pSuite, ODBCSQLiteTest, testComplexTypeDeque);
|
||||
CppUnit_addTest(pSuite, ODBCSQLiteTest, testInsertDeque);
|
||||
CppUnit_addTest(pSuite, ODBCSQLiteTest, testInsertEmptyDeque);
|
||||
CppUnit_addTest(pSuite, ODBCSQLiteTest, testAffectedRows);
|
||||
CppUnit_addTest(pSuite, ODBCSQLiteTest, testInsertSingleBulk);
|
||||
CppUnit_addTest(pSuite, ODBCSQLiteTest, testInsertSingleBulkVec);
|
||||
CppUnit_addTest(pSuite, ODBCSQLiteTest, testLimit);
|
||||
CppUnit_addTest(pSuite, ODBCSQLiteTest, testLimitOnce);
|
||||
CppUnit_addTest(pSuite, ODBCSQLiteTest, testLimitPrepare);
|
||||
CppUnit_addTest(pSuite, ODBCSQLiteTest, testLimitZero);
|
||||
CppUnit_addTest(pSuite, ODBCSQLiteTest, testPrepare);
|
||||
CppUnit_addTest(pSuite, ODBCSQLiteTest, testSetSimple);
|
||||
CppUnit_addTest(pSuite, ODBCSQLiteTest, testSetComplex);
|
||||
CppUnit_addTest(pSuite, ODBCSQLiteTest, testSetComplexUnique);
|
||||
CppUnit_addTest(pSuite, ODBCSQLiteTest, testMultiSetSimple);
|
||||
CppUnit_addTest(pSuite, ODBCSQLiteTest, testMultiSetComplex);
|
||||
CppUnit_addTest(pSuite, ODBCSQLiteTest, testMapComplex);
|
||||
CppUnit_addTest(pSuite, ODBCSQLiteTest, testMapComplexUnique);
|
||||
CppUnit_addTest(pSuite, ODBCSQLiteTest, testMultiMapComplex);
|
||||
CppUnit_addTest(pSuite, ODBCSQLiteTest, testSelectIntoSingle);
|
||||
CppUnit_addTest(pSuite, ODBCSQLiteTest, testSelectIntoSingleStep);
|
||||
CppUnit_addTest(pSuite, ODBCSQLiteTest, testSelectIntoSingleFail);
|
||||
CppUnit_addTest(pSuite, ODBCSQLiteTest, testLowerLimitOk);
|
||||
CppUnit_addTest(pSuite, ODBCSQLiteTest, testLowerLimitFail);
|
||||
CppUnit_addTest(pSuite, ODBCSQLiteTest, testCombinedLimits);
|
||||
CppUnit_addTest(pSuite, ODBCSQLiteTest, testCombinedIllegalLimits);
|
||||
CppUnit_addTest(pSuite, ODBCSQLiteTest, testRange);
|
||||
CppUnit_addTest(pSuite, ODBCSQLiteTest, testIllegalRange);
|
||||
CppUnit_addTest(pSuite, ODBCSQLiteTest, testSingleSelect);
|
||||
CppUnit_addTest(pSuite, ODBCSQLiteTest, testEmptyDB);
|
||||
CppUnit_addTest(pSuite, ODBCSQLiteTest, testBLOB);
|
||||
CppUnit_addTest(pSuite, ODBCSQLiteTest, testBLOBContainer);
|
||||
CppUnit_addTest(pSuite, ODBCSQLiteTest, testBLOBStmt);
|
||||
CppUnit_addTest(pSuite, ODBCSQLiteTest, testDateTime);
|
||||
CppUnit_addTest(pSuite, ODBCSQLiteTest, testFloat);
|
||||
CppUnit_addTest(pSuite, ODBCSQLiteTest, testDouble);
|
||||
CppUnit_addTest(pSuite, ODBCSQLiteTest, testTuple);
|
||||
CppUnit_addTest(pSuite, ODBCSQLiteTest, testTupleVector);
|
||||
CppUnit_addTest(pSuite, ODBCSQLiteTest, testInternalExtraction);
|
||||
CppUnit_addTest(pSuite, ODBCSQLiteTest, testFilter);
|
||||
CppUnit_addTest(pSuite, ODBCSQLiteTest, testInternalStorageType);
|
||||
CppUnit_addTest(pSuite, ODBCSQLiteTest, testNull);
|
||||
CppUnit_addTest(pSuite, ODBCSQLiteTest, testRowIterator);
|
||||
CppUnit_addTest(pSuite, ODBCSQLiteTest, testAsync);
|
||||
CppUnit_addTest(pSuite, ODBCSQLiteTest, testAny);
|
||||
CppUnit_addTest(pSuite, ODBCSQLiteTest, testDynamicAny);
|
||||
CppUnit_addTest(pSuite, ODBCSQLiteTest, testSQLChannel);
|
||||
CppUnit_addTest(pSuite, ODBCSQLiteTest, testSQLLogger);
|
||||
CppUnit_addTest(pSuite, ODBCSQLiteTest, testSessionTransaction);
|
||||
CppUnit_addTest(pSuite, ODBCSQLiteTest, testTransaction);
|
||||
CppUnit_addTest(pSuite, ODBCSQLiteTest, testTransactor);
|
||||
CppUnit_addTest(pSuite, ODBCSQLiteTest, testReconnect);
|
||||
|
||||
return pSuite;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
//
|
||||
// ODBCSQLiteTest.h
|
||||
//
|
||||
// Definition of the ODBCSQLiteTest class.
|
||||
//
|
||||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#ifndef ODBCSQLiteTest_INCLUDED
|
||||
#define ODBCSQLiteTest_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Data/ODBC/ODBC.h"
|
||||
#include "ODBCTest.h"
|
||||
|
||||
|
||||
class ODBCSQLiteTest: public ODBCTest
|
||||
/// SQLite3 ODBC test class
|
||||
/// Tested:
|
||||
///
|
||||
/// Driver | DB | OS
|
||||
/// ------------+---------------+------------------------------------------
|
||||
/// 00.70.00.00 | SQLite 3.* | MS Windows XP Professional x64 v.2003/SP1
|
||||
{
|
||||
public:
|
||||
ODBCSQLiteTest(const std::string& name);
|
||||
~ODBCSQLiteTest();
|
||||
|
||||
void testBareboneODBC();
|
||||
void testAffectedRows();
|
||||
void testNull();
|
||||
|
||||
static CppUnit::Test* suite();
|
||||
|
||||
private:
|
||||
void dropObject(const std::string& type, const std::string& name);
|
||||
void recreateNullableTable();
|
||||
void recreatePersonTable();
|
||||
void recreatePersonBLOBTable();
|
||||
void recreatePersonDateTimeTable();
|
||||
void recreateStringsTable();
|
||||
void recreateIntsTable();
|
||||
void recreateFloatsTable();
|
||||
void recreateTuplesTable();
|
||||
void recreateVectorsTable();
|
||||
void recreateAnysTable();
|
||||
void recreateNullsTable(const std::string& notNull = "");
|
||||
void recreateMiscTable();
|
||||
void recreateLogTable();
|
||||
|
||||
static ODBCTest::SessionPtr _pSession;
|
||||
static ODBCTest::ExecPtr _pExecutor;
|
||||
static std::string _driver;
|
||||
static std::string _dsn;
|
||||
static std::string _uid;
|
||||
static std::string _pwd;
|
||||
static std::string _connectString;
|
||||
};
|
||||
|
||||
|
||||
#endif // ODBCSQLiteTest_INCLUDED
|
||||
+1343
File diff suppressed because it is too large
Load Diff
+413
@@ -0,0 +1,413 @@
|
||||
//
|
||||
// ODBCTest.h
|
||||
//
|
||||
// Definition of the ODBCTest class.
|
||||
//
|
||||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#ifndef ODBCTest_INCLUDED
|
||||
#define ODBCTest_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Data/ODBC/ODBC.h"
|
||||
#include "CppUnit/TestCase.h"
|
||||
#include "Poco/Data/Session.h"
|
||||
#include "Poco/Data/ODBC/Utility.h"
|
||||
#include "Poco/SharedPtr.h"
|
||||
#include "Poco/Exception.h"
|
||||
#include "SQLExecutor.h"
|
||||
|
||||
|
||||
#define POCO_ODBC_TEST_DATABASE_SERVER "localhost"
|
||||
|
||||
|
||||
class ODBCTest: public CppUnit::TestCase
|
||||
{
|
||||
public:
|
||||
typedef Poco::SharedPtr<Poco::Data::Session> SessionPtr;
|
||||
typedef Poco::SharedPtr<SQLExecutor> ExecPtr;
|
||||
|
||||
ODBCTest(const std::string& name,
|
||||
SessionPtr pSession,
|
||||
ExecPtr pExecutor,
|
||||
std::string& rDSN,
|
||||
std::string& rUID,
|
||||
std::string& rPwd,
|
||||
std::string& rConnectString);
|
||||
|
||||
~ODBCTest();
|
||||
|
||||
virtual void setUp();
|
||||
virtual void tearDown();
|
||||
|
||||
virtual void testBareboneODBC() = 0;
|
||||
|
||||
virtual void testZeroRows();
|
||||
virtual void testSimpleAccess();
|
||||
virtual void testComplexType();
|
||||
virtual void testComplexTypeTuple();
|
||||
|
||||
virtual void testSimpleAccessVector();
|
||||
virtual void testComplexTypeVector();
|
||||
virtual void testSharedPtrComplexTypeVector();
|
||||
virtual void testAutoPtrComplexTypeVector();
|
||||
virtual void testInsertVector();
|
||||
virtual void testInsertEmptyVector();
|
||||
|
||||
virtual void testSimpleAccessList();
|
||||
virtual void testComplexTypeList();
|
||||
virtual void testInsertList();
|
||||
virtual void testInsertEmptyList();
|
||||
|
||||
virtual void testSimpleAccessDeque();
|
||||
virtual void testComplexTypeDeque();
|
||||
virtual void testInsertDeque();
|
||||
virtual void testInsertEmptyDeque();
|
||||
|
||||
virtual void testAffectedRows();
|
||||
|
||||
virtual void testInsertSingleBulk();
|
||||
virtual void testInsertSingleBulkVec();
|
||||
|
||||
virtual void testLimit();
|
||||
virtual void testLimitOnce();
|
||||
virtual void testLimitPrepare();
|
||||
virtual void testLimitZero();
|
||||
virtual void testPrepare();
|
||||
virtual void testBulk();
|
||||
virtual void testBulkPerformance();
|
||||
|
||||
virtual void testSetSimple();
|
||||
virtual void testSetComplex();
|
||||
virtual void testSetComplexUnique();
|
||||
virtual void testMultiSetSimple();
|
||||
virtual void testMultiSetComplex();
|
||||
virtual void testMapComplex();
|
||||
virtual void testMapComplexUnique();
|
||||
virtual void testMultiMapComplex();
|
||||
virtual void testSelectIntoSingle();
|
||||
virtual void testSelectIntoSingleStep();
|
||||
virtual void testSelectIntoSingleFail();
|
||||
virtual void testLowerLimitOk();
|
||||
virtual void testLowerLimitFail();
|
||||
virtual void testCombinedLimits();
|
||||
virtual void testCombinedIllegalLimits();
|
||||
virtual void testRange();
|
||||
virtual void testIllegalRange();
|
||||
virtual void testSingleSelect();
|
||||
virtual void testEmptyDB();
|
||||
|
||||
virtual void testBLOB();
|
||||
virtual void testBLOBContainer();
|
||||
virtual void testBLOBStmt();
|
||||
|
||||
virtual void testDateTime();
|
||||
virtual void testDate();
|
||||
virtual void testTime();
|
||||
|
||||
virtual void testFloat();
|
||||
virtual void testDouble();
|
||||
|
||||
virtual void testTuple();
|
||||
virtual void testTupleVector();
|
||||
|
||||
virtual void testInternalExtraction();
|
||||
virtual void testFilter();
|
||||
virtual void testInternalBulkExtraction();
|
||||
virtual void testInternalStorageType();
|
||||
|
||||
virtual void testStoredProcedure();
|
||||
virtual void testStoredProcedureAny();
|
||||
virtual void testStoredProcedureDynamicAny();
|
||||
|
||||
virtual void testStoredFunction();
|
||||
virtual void testStoredFunctionAny();
|
||||
virtual void testStoredFunctionDynamicAny();
|
||||
|
||||
virtual void testNull();
|
||||
virtual void testRowIterator();
|
||||
virtual void testStdVectorBool();
|
||||
|
||||
virtual void testAsync();
|
||||
|
||||
virtual void testAny();
|
||||
virtual void testDynamicAny();
|
||||
|
||||
virtual void testMultipleResults();
|
||||
|
||||
virtual void testSQLChannel();
|
||||
virtual void testSQLLogger();
|
||||
|
||||
virtual void testSessionTransaction();
|
||||
virtual void testTransaction();
|
||||
virtual void testTransactor();
|
||||
virtual void testNullable();
|
||||
|
||||
virtual void testUnicode();
|
||||
|
||||
virtual void testReconnect();
|
||||
|
||||
protected:
|
||||
typedef Poco::Data::ODBC::Utility::DriverMap Drivers;
|
||||
|
||||
virtual void dropObject(const std::string& type, const std::string& name);
|
||||
virtual void recreateNullableTable();
|
||||
virtual void recreatePersonTable();
|
||||
virtual void recreatePersonTupleTable();
|
||||
virtual void recreatePersonBLOBTable();
|
||||
virtual void recreatePersonDateTimeTable();
|
||||
virtual void recreatePersonDateTable();
|
||||
virtual void recreatePersonTimeTable();
|
||||
virtual void recreateStringsTable();
|
||||
virtual void recreateIntsTable();
|
||||
virtual void recreateFloatsTable();
|
||||
virtual void recreateTuplesTable();
|
||||
virtual void recreateVectorsTable();
|
||||
virtual void recreateAnysTable();
|
||||
virtual void recreateNullsTable(const std::string& notNull="");
|
||||
virtual void recreateBoolTable();
|
||||
virtual void recreateMiscTable();
|
||||
virtual void recreateLogTable();
|
||||
virtual void recreateUnicodeTable();
|
||||
|
||||
static SessionPtr init(const std::string& driver,
|
||||
std::string& dsn,
|
||||
std::string& uid,
|
||||
std::string& pwd,
|
||||
std::string& dbConnString,
|
||||
const std::string& db = "");
|
||||
|
||||
static bool canConnect(const std::string& driver,
|
||||
std::string& dsn,
|
||||
std::string& uid,
|
||||
std::string& pwd,
|
||||
std::string& dbConnString,
|
||||
const std::string& db = "");
|
||||
|
||||
bool bindValue(int i);
|
||||
|
||||
Poco::Data::Session& session();
|
||||
SQLExecutor& executor();
|
||||
|
||||
const std::string& dsn();
|
||||
const std::string& uid();
|
||||
const std::string& pwd();
|
||||
const std::string& dbConnString();
|
||||
|
||||
private:
|
||||
static Drivers _drivers;
|
||||
static const bool _bindValues[8];
|
||||
SessionPtr _pSession;
|
||||
ExecPtr _pExecutor;
|
||||
std::string& _rDSN;
|
||||
std::string& _rUID;
|
||||
std::string& _rPwd;
|
||||
std::string& _rConnectString;
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// inlines
|
||||
//
|
||||
|
||||
inline void ODBCTest::testStoredProcedure()
|
||||
{
|
||||
throw Poco::NotImplementedException("ODBCTest::testStoredProcedure()");
|
||||
}
|
||||
|
||||
|
||||
inline void ODBCTest::testStoredProcedureAny()
|
||||
{
|
||||
throw Poco::NotImplementedException("ODBCTest::testStoredProcedureAny()");
|
||||
}
|
||||
|
||||
|
||||
inline void ODBCTest::testStoredProcedureDynamicAny()
|
||||
{
|
||||
throw Poco::NotImplementedException("ODBCTest::testStoredProcedureDynamicAny()");
|
||||
}
|
||||
|
||||
|
||||
inline void ODBCTest::testStoredFunction()
|
||||
{
|
||||
throw Poco::NotImplementedException("ODBCTest::testStoredFunction()");
|
||||
}
|
||||
|
||||
|
||||
inline void ODBCTest::testStoredFunctionAny()
|
||||
{
|
||||
throw Poco::NotImplementedException("ODBCTest::testStoredFunctionAny()");
|
||||
}
|
||||
|
||||
|
||||
inline void ODBCTest::testStoredFunctionDynamicAny()
|
||||
{
|
||||
throw Poco::NotImplementedException("ODBCTest::testStoredFunctionDynamicAny()");
|
||||
}
|
||||
|
||||
|
||||
inline void ODBCTest::dropObject(const std::string& type, const std::string& name)
|
||||
{
|
||||
throw Poco::NotImplementedException("ODBCTest::dropObject()");
|
||||
}
|
||||
|
||||
|
||||
inline void ODBCTest::recreateNullableTable()
|
||||
{
|
||||
throw Poco::NotImplementedException("ODBCTest::recreateNullableTable()");
|
||||
}
|
||||
|
||||
|
||||
inline void ODBCTest::recreatePersonTable()
|
||||
{
|
||||
throw Poco::NotImplementedException("ODBCTest::recreatePersonTable()");
|
||||
}
|
||||
|
||||
|
||||
inline void ODBCTest::recreatePersonTupleTable()
|
||||
{
|
||||
throw Poco::NotImplementedException("ODBCTest::recreatePersonTupleTable()");
|
||||
}
|
||||
|
||||
|
||||
inline void ODBCTest::recreatePersonBLOBTable()
|
||||
{
|
||||
throw Poco::NotImplementedException("ODBCTest::recreatePersonBLOBTable()");
|
||||
}
|
||||
|
||||
|
||||
inline void ODBCTest::recreatePersonDateTimeTable()
|
||||
{
|
||||
throw Poco::NotImplementedException("ODBCTest::recreatePersonDateTimeTable()");
|
||||
}
|
||||
|
||||
|
||||
inline void ODBCTest::recreatePersonDateTable()
|
||||
{
|
||||
throw Poco::NotImplementedException("ODBCTest::recreatePersonDateTable()");
|
||||
}
|
||||
|
||||
|
||||
inline void ODBCTest::recreatePersonTimeTable()
|
||||
{
|
||||
throw Poco::NotImplementedException("ODBCTest::recreatePersonTimeTable()");
|
||||
}
|
||||
|
||||
|
||||
inline void ODBCTest::recreateStringsTable()
|
||||
{
|
||||
throw Poco::NotImplementedException("ODBCTest::recreateStringsTable()");
|
||||
}
|
||||
|
||||
|
||||
inline void ODBCTest::recreateIntsTable()
|
||||
{
|
||||
throw Poco::NotImplementedException("ODBCTest::recreateIntsTable()");
|
||||
}
|
||||
|
||||
|
||||
inline void ODBCTest::recreateFloatsTable()
|
||||
{
|
||||
throw Poco::NotImplementedException("ODBCTest::recreateFloatsTable()");
|
||||
}
|
||||
|
||||
|
||||
inline void ODBCTest::recreateTuplesTable()
|
||||
{
|
||||
throw Poco::NotImplementedException("ODBCTest::recreateTuplesTable()");
|
||||
}
|
||||
|
||||
|
||||
inline void ODBCTest::recreateVectorsTable()
|
||||
{
|
||||
throw Poco::NotImplementedException("ODBCTest::recreateVectorsTable()");
|
||||
}
|
||||
|
||||
|
||||
inline void ODBCTest::recreateAnysTable()
|
||||
{
|
||||
throw Poco::NotImplementedException("ODBCTest::recreateAnysTable()");
|
||||
}
|
||||
|
||||
|
||||
inline void ODBCTest::recreateNullsTable(const std::string&)
|
||||
{
|
||||
throw Poco::NotImplementedException("ODBCTest::recreateNullsTable()");
|
||||
}
|
||||
|
||||
|
||||
inline void ODBCTest::recreateBoolTable()
|
||||
{
|
||||
throw Poco::NotImplementedException("ODBCTest::recreateBoolTable()");
|
||||
}
|
||||
|
||||
|
||||
inline void ODBCTest::recreateMiscTable()
|
||||
{
|
||||
throw Poco::NotImplementedException("ODBCTest::recreateMiscTable()");
|
||||
}
|
||||
|
||||
|
||||
inline void ODBCTest::recreateLogTable()
|
||||
{
|
||||
throw Poco::NotImplementedException("ODBCTest::recreateLogTable()");
|
||||
}
|
||||
|
||||
|
||||
inline void ODBCTest::recreateUnicodeTable()
|
||||
{
|
||||
throw Poco::NotImplementedException("ODBCTest::recreateUnicodeTable()");
|
||||
}
|
||||
|
||||
|
||||
inline bool ODBCTest::bindValue(int i)
|
||||
{
|
||||
poco_assert (i < 8);
|
||||
return _bindValues[i];
|
||||
}
|
||||
|
||||
|
||||
inline Poco::Data::Session& ODBCTest::session()
|
||||
{
|
||||
poco_check_ptr (_pSession);
|
||||
return *_pSession;
|
||||
}
|
||||
|
||||
|
||||
inline SQLExecutor& ODBCTest::executor()
|
||||
{
|
||||
poco_check_ptr (_pExecutor);
|
||||
return *_pExecutor;
|
||||
}
|
||||
|
||||
|
||||
inline const std::string& ODBCTest::dsn()
|
||||
{
|
||||
return _rDSN;
|
||||
}
|
||||
|
||||
|
||||
inline const std::string& ODBCTest::uid()
|
||||
{
|
||||
return _rUID;
|
||||
}
|
||||
|
||||
|
||||
inline const std::string& ODBCTest::pwd()
|
||||
{
|
||||
return _rPwd;
|
||||
}
|
||||
|
||||
|
||||
inline const std::string& ODBCTest::dbConnString()
|
||||
{
|
||||
return _rConnectString;
|
||||
}
|
||||
|
||||
|
||||
#endif // ODBCTest_INCLUDED
|
||||
@@ -0,0 +1,59 @@
|
||||
//
|
||||
// ODBCTestSuite.cpp
|
||||
//
|
||||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#include "ODBCTestSuite.h"
|
||||
#include "ODBCDB2Test.h"
|
||||
#include "ODBCMySQLTest.h"
|
||||
#include "ODBCOracleTest.h"
|
||||
#include "ODBCPostgreSQLTest.h"
|
||||
#include "ODBCSQLiteTest.h"
|
||||
#if defined(POCO_OS_FAMILY_WINDOWS)
|
||||
#include "ODBCAccessTest.h"
|
||||
#endif
|
||||
#include "ODBCSQLServerTest.h"
|
||||
|
||||
|
||||
CppUnit::Test* ODBCTestSuite::suite()
|
||||
{
|
||||
CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("ODBCTestSuite");
|
||||
|
||||
// WARNING!
|
||||
// On Win XP Pro, the PostgreSQL connection fails if attempted after DB2 w/ following error:
|
||||
//
|
||||
// sqlState="IM003"
|
||||
// message="Specified driver could not be loaded due to system error 127 (PostgreSQL ANSI)."
|
||||
// nativeError=160
|
||||
// System error 127 is "The specified procedure could not be found."
|
||||
// This problem does not manifest with Mammoth ODBCng PostgreSQL driver.
|
||||
//
|
||||
// Oracle tests do not exit cleanly if Oracle driver is loaded after DB2.
|
||||
//
|
||||
// For the time being, the workaround is to connect to DB2 after connecting to PostgreSQL and Oracle.
|
||||
|
||||
addTest(pSuite, ODBCMySQLTest::suite());
|
||||
addTest(pSuite, ODBCOracleTest::suite());
|
||||
addTest(pSuite, ODBCPostgreSQLTest::suite());
|
||||
addTest(pSuite, ODBCSQLiteTest::suite());
|
||||
addTest(pSuite, ODBCSQLServerTest::suite());
|
||||
addTest(pSuite, ODBCDB2Test::suite());
|
||||
// MS Access driver does not support connection status detection
|
||||
// disabled for the time being
|
||||
#if 0 //defined(POCO_OS_FAMILY_WINDOWS)
|
||||
addTest(pSuite, ODBCAccessTest::suite());
|
||||
#endif
|
||||
|
||||
return pSuite;
|
||||
}
|
||||
|
||||
|
||||
void ODBCTestSuite::addTest(CppUnit::TestSuite* pSuite, CppUnit::Test* pT)
|
||||
{
|
||||
if (pSuite && pT) pSuite->addTest(pT);
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
//
|
||||
// ODBCTestSuite.h
|
||||
//
|
||||
// Definition of the ODBCTestSuite class.
|
||||
//
|
||||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#ifndef ODBCTestSuite_INCLUDED
|
||||
#define ODBCTestSuite_INCLUDED
|
||||
|
||||
|
||||
#include "CppUnit/TestSuite.h"
|
||||
|
||||
|
||||
class ODBCTestSuite
|
||||
{
|
||||
public:
|
||||
static CppUnit::Test* suite();
|
||||
|
||||
private:
|
||||
static void addTest(CppUnit::TestSuite* pSuite, CppUnit::Test* pT);
|
||||
};
|
||||
|
||||
|
||||
#endif // ODBCTestSuite_INCLUDED
|
||||
+4013
File diff suppressed because it is too large
Load Diff
+528
@@ -0,0 +1,528 @@
|
||||
//
|
||||
// SQLExecutor.h
|
||||
//
|
||||
// Definition of the SQLExecutor class.
|
||||
//
|
||||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#ifndef SQLExecutor_INCLUDED
|
||||
#define SQLExecutor_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Data/ODBC/ODBC.h"
|
||||
#include "Poco/Data/ODBC/Utility.h"
|
||||
#include "Poco/Data/ODBC/ODBCException.h"
|
||||
#include "Poco/Data/Session.h"
|
||||
#include "Poco/Data/BulkExtraction.h"
|
||||
#include "Poco/Data/BulkBinding.h"
|
||||
#include "Poco/NumberFormatter.h"
|
||||
#include "Poco/String.h"
|
||||
#include "Poco/Exception.h"
|
||||
#include <iostream>
|
||||
|
||||
|
||||
#define poco_odbc_check_env(r, h) \
|
||||
if (!SQL_SUCCEEDED(r)) \
|
||||
{ \
|
||||
Poco::Data::ODBC::EnvironmentException ee(h); \
|
||||
std::cout << ee.toString() << std::endl; \
|
||||
} \
|
||||
assert (SQL_SUCCEEDED(r))
|
||||
|
||||
|
||||
#define poco_odbc_check_dbc(r, h) \
|
||||
if (!SQL_SUCCEEDED(r)) \
|
||||
{ \
|
||||
Poco::Data::ODBC::ConnectionException ce(h); \
|
||||
std::cout << ce.toString() << std::endl; \
|
||||
} \
|
||||
assert (SQL_SUCCEEDED(r))
|
||||
|
||||
|
||||
#define poco_odbc_check_stmt(r, h) \
|
||||
if (!SQL_SUCCEEDED(r)) \
|
||||
{ \
|
||||
Poco::Data::ODBC::StatementException se(h); \
|
||||
std::cout << se.toString() << std::endl; \
|
||||
} \
|
||||
assert (SQL_SUCCEEDED(r))
|
||||
|
||||
|
||||
#define poco_odbc_check_desc(r, h) \
|
||||
if (!SQL_SUCCEEDED(r)) \
|
||||
{ \
|
||||
Poco::Data::ODBC::DescriptorException de(h); \
|
||||
std::cout << de.toString() << std::endl; \
|
||||
} \
|
||||
assert (SQL_SUCCEEDED(r))
|
||||
|
||||
|
||||
#define poco_data_using_statements using Poco::Data::Keywords::now; \
|
||||
using Poco::Data::Keywords::into; \
|
||||
using Poco::Data::Keywords::use; \
|
||||
using Poco::Data::Keywords::bulk; \
|
||||
using Poco::Data::Keywords::limit; \
|
||||
using Poco::Data::CLOB; \
|
||||
using Poco::Data::ODBC::ConnectionException; \
|
||||
using Poco::Data::ODBC::StatementException
|
||||
|
||||
|
||||
class SQLExecutor: public CppUnit::TestCase
|
||||
{
|
||||
public:
|
||||
enum DataBinding
|
||||
{
|
||||
PB_IMMEDIATE,
|
||||
PB_AT_EXEC
|
||||
};
|
||||
|
||||
enum DataExtraction
|
||||
{
|
||||
DE_MANUAL,
|
||||
DE_BOUND
|
||||
};
|
||||
|
||||
SQLExecutor(const std::string& name, Poco::Data::Session* _pSession);
|
||||
~SQLExecutor();
|
||||
|
||||
void execute(const std::string& sql);
|
||||
/// Execute a query.
|
||||
|
||||
void bareboneODBCTest(const std::string& dbConnString,
|
||||
const std::string& tableCreateString,
|
||||
DataBinding bindMode,
|
||||
DataExtraction extractMode,
|
||||
bool doTime=true,
|
||||
const std::string& blobPlaceholder="?");
|
||||
|
||||
void bareboneODBCMultiResultTest(const std::string& dbConnString,
|
||||
const std::string& tableCreateString,
|
||||
SQLExecutor::DataBinding bindMode,
|
||||
SQLExecutor::DataExtraction extractMode,
|
||||
const std::string& insert = MULTI_INSERT,
|
||||
const std::string& select = MULTI_SELECT);
|
||||
/// The above two functions use "bare bone" ODBC API calls
|
||||
/// (i.e. calls are not "wrapped" in PocoData framework structures).
|
||||
/// The purpose of the functions is to verify that a driver behaves
|
||||
/// correctly as well as to determine its capabilities
|
||||
/// (e.g. SQLGetData() restrictions relaxation policy, if any).
|
||||
/// If these test pass, subsequent tests failures are likely ours.
|
||||
|
||||
void zeroRows();
|
||||
void simpleAccess();
|
||||
void complexType();
|
||||
void complexTypeTuple();
|
||||
|
||||
void simpleAccessVector();
|
||||
void complexTypeVector();
|
||||
void sharedPtrComplexTypeVector();
|
||||
void autoPtrComplexTypeVector();
|
||||
void insertVector();
|
||||
void insertEmptyVector();
|
||||
|
||||
void simpleAccessList();
|
||||
void complexTypeList();
|
||||
void insertList();
|
||||
void insertEmptyList();
|
||||
|
||||
void simpleAccessDeque();
|
||||
void complexTypeDeque();
|
||||
void insertDeque();
|
||||
void insertEmptyDeque();
|
||||
|
||||
void affectedRows(const std::string& whereClause = "");
|
||||
|
||||
void insertSingleBulk();
|
||||
void insertSingleBulkVec();
|
||||
|
||||
void limits();
|
||||
void limitOnce();
|
||||
void limitPrepare();
|
||||
void limitZero();
|
||||
void prepare();
|
||||
|
||||
template <typename C1, typename C2, typename C3, typename C4, typename C5, typename C6>
|
||||
void doBulkWithBool(Poco::UInt32 size, const std::string& blobPlaceholder="?")
|
||||
{
|
||||
poco_data_using_statements;
|
||||
|
||||
std::string funct = "doBulkWithBool()";
|
||||
C1 ints;
|
||||
C2 strings;
|
||||
C3 blobs;
|
||||
C4 floats;
|
||||
C5 dateTimes(size);
|
||||
C6 bools;
|
||||
|
||||
for (int i = 0; i < size; ++i)
|
||||
{
|
||||
ints.push_back(i);
|
||||
strings.push_back(std::string("xyz" + Poco::NumberFormatter::format(i)));
|
||||
blobs.push_back(std::string("abc") + Poco::NumberFormatter::format(i));
|
||||
floats.push_back(i + .5);
|
||||
bools.push_back(0 == i % 2);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
session() <<
|
||||
Poco::format("INSERT INTO MiscTest VALUES (?,%s,?,?,?,?)", blobPlaceholder),
|
||||
use(strings),
|
||||
use(blobs),
|
||||
use(ints),
|
||||
use(floats),
|
||||
use(dateTimes),
|
||||
use(bools), now;
|
||||
} catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||
|
||||
try { session() << "DELETE FROM MiscTest", now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||
|
||||
try
|
||||
{
|
||||
session() <<
|
||||
Poco::format("INSERT INTO MiscTest VALUES (?,%s,?,?,?,?)", blobPlaceholder),
|
||||
use(strings, bulk),
|
||||
use(blobs, bulk),
|
||||
use(ints, bulk),
|
||||
use(floats, bulk),
|
||||
use(dateTimes, bulk),
|
||||
use(bools, bulk), now;
|
||||
} catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||
|
||||
ints.clear();
|
||||
strings.clear();
|
||||
blobs.clear();
|
||||
floats.clear();
|
||||
dateTimes.clear();
|
||||
bools.clear();
|
||||
|
||||
try
|
||||
{
|
||||
session() << "SELECT * FROM MiscTest ORDER BY Third",
|
||||
into(strings),
|
||||
into(blobs),
|
||||
into(ints),
|
||||
into(floats),
|
||||
into(dateTimes),
|
||||
into(bools),
|
||||
now;
|
||||
} catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||
|
||||
std::string number = Poco::NumberFormatter::format(size - 1);
|
||||
assert (size == ints.size());
|
||||
assert (0 == ints.front());
|
||||
assert (size - 1 == ints.back());
|
||||
assert (std::string("xyz0") == strings.front());
|
||||
assert (std::string("xyz") + number == strings.back());
|
||||
assert (CLOB("abc0") == blobs.front());
|
||||
CLOB blob("abc");
|
||||
blob.appendRaw(number.c_str(), number.size());
|
||||
assert (blob == blobs.back());
|
||||
assert (.5 == floats.front());
|
||||
assert (floats.size() - 1 + .5 == floats.back());
|
||||
assert (bools.front());
|
||||
assert (((0 == ((bools.size() - 1) % 2)) == bools.back()));
|
||||
|
||||
ints.clear();
|
||||
|
||||
try
|
||||
{
|
||||
session() << "SELECT First FROM MiscTest", into(ints, bulk(size)), limit(size+1), now;
|
||||
fail ("must fail");
|
||||
}
|
||||
catch(Poco::InvalidArgumentException&){ }
|
||||
|
||||
try
|
||||
{
|
||||
session() << "SELECT First FROM MiscTest", into(ints), bulk(size), now;
|
||||
fail ("must fail");
|
||||
}
|
||||
catch(Poco::InvalidAccessException&){ }
|
||||
|
||||
ints.clear();
|
||||
strings.clear();
|
||||
strings.resize(size);
|
||||
blobs.clear();
|
||||
floats.clear();
|
||||
floats.resize(size);
|
||||
dateTimes.clear();
|
||||
bools.clear();
|
||||
bools.resize(size);
|
||||
|
||||
try
|
||||
{
|
||||
session() << "SELECT First, Second, Third, Fourth, Fifth, Sixth FROM MiscTest ORDER BY Third",
|
||||
into(strings, bulk),
|
||||
into(blobs, bulk(size)),
|
||||
into(ints, bulk(size)),
|
||||
into(floats, bulk),
|
||||
into(dateTimes, bulk(size)),
|
||||
into(bools, bulk),
|
||||
now;
|
||||
} catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||
|
||||
assert (size == ints.size());
|
||||
assert (0 == ints.front());
|
||||
assert (size - 1 == ints.back());
|
||||
assert (std::string("xyz0") == strings.front());
|
||||
assert (std::string("xyz") + number == strings.back());
|
||||
assert (CLOB("abc0") == blobs.front());
|
||||
blob.assignRaw("abc", 3);
|
||||
blob.appendRaw(number.c_str(), number.size());
|
||||
assert (blob == blobs.back());
|
||||
assert (.5 == floats.front());
|
||||
assert (floats.size() - 1 + .5 == floats.back());
|
||||
assert (bools.front());
|
||||
assert (((0 == ((bools.size() - 1) % 2)) == bools.back()));
|
||||
}
|
||||
|
||||
void doBulkPerformance(Poco::UInt32 size);
|
||||
|
||||
template <typename C1, typename C2, typename C3, typename C4, typename C5>
|
||||
void doBulk(Poco::UInt32 size)
|
||||
{
|
||||
poco_data_using_statements;
|
||||
|
||||
std::string funct = "doBulk()";
|
||||
C1 ints;
|
||||
C2 strings;
|
||||
C3 blobs;
|
||||
C4 floats;
|
||||
C5 dateTimes(size);
|
||||
|
||||
for (int i = 0; i < size; ++i)
|
||||
{
|
||||
ints.push_back(i);
|
||||
strings.push_back(std::string("xyz" + Poco::NumberFormatter::format(i)));
|
||||
blobs.push_back(std::string("abc") + Poco::NumberFormatter::format(i));
|
||||
floats.push_back(i + .5);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
session() << "INSERT INTO MiscTest VALUES (?,?,?,?,?)",
|
||||
use(strings),
|
||||
use(blobs),
|
||||
use(ints),
|
||||
use(floats),
|
||||
use(dateTimes), now;
|
||||
} catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||
|
||||
try { session() << "DELETE FROM MiscTest", now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||
|
||||
try
|
||||
{
|
||||
session() << "INSERT INTO MiscTest VALUES (?,?,?,?,?)",
|
||||
use(strings, bulk),
|
||||
use(blobs, bulk),
|
||||
use(ints, bulk),
|
||||
use(floats, bulk),
|
||||
use(dateTimes, bulk), now;
|
||||
} catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||
|
||||
ints.clear();
|
||||
strings.clear();
|
||||
blobs.clear();
|
||||
floats.clear();
|
||||
dateTimes.clear();
|
||||
|
||||
try
|
||||
{
|
||||
session() << "SELECT * FROM MiscTest ORDER BY First",
|
||||
into(strings),
|
||||
into(blobs),
|
||||
into(ints),
|
||||
into(floats),
|
||||
into(dateTimes),
|
||||
now;
|
||||
} catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||
|
||||
std::string number = Poco::NumberFormatter::format(size - 1);
|
||||
assert (size == ints.size());
|
||||
assert (0 == ints.front());
|
||||
assert (size - 1 == ints.back());
|
||||
assert (std::string("xyz0") == strings.front());
|
||||
assert (std::string("xyz") + number == strings.back());
|
||||
assert (CLOB("abc0") == blobs.front());
|
||||
CLOB blob("abc");
|
||||
blob.appendRaw(number.c_str(), number.size());
|
||||
assert (blob == blobs.back());
|
||||
assert (.5 == floats.front());
|
||||
assert (floats.size() - 1 + .5 == floats.back());
|
||||
|
||||
ints.clear();
|
||||
|
||||
try
|
||||
{
|
||||
session() << "SELECT First FROM MiscTest", into(ints, bulk(size)), limit(size+1), now;
|
||||
fail ("must fail");
|
||||
}
|
||||
catch(Poco::InvalidArgumentException&){ }
|
||||
|
||||
try
|
||||
{
|
||||
session() << "SELECT First FROM MiscTest", into(ints), bulk(size), now;
|
||||
fail ("must fail");
|
||||
}
|
||||
catch(Poco::InvalidAccessException&){ }
|
||||
|
||||
ints.clear();
|
||||
strings.clear();
|
||||
blobs.clear();
|
||||
floats.clear();
|
||||
dateTimes.clear();
|
||||
|
||||
try
|
||||
{
|
||||
session() << "SELECT * FROM MiscTest ORDER BY First",
|
||||
into(strings, bulk(size)),
|
||||
into(blobs, bulk(size)),
|
||||
into(ints, bulk(size)),
|
||||
into(floats, bulk(size)),
|
||||
into(dateTimes, bulk(size)),
|
||||
now;
|
||||
} catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||
|
||||
assert (size == ints.size());
|
||||
assert (0 == ints.front());
|
||||
assert (size - 1 == ints.back());
|
||||
assert (std::string("xyz0") == strings.front());
|
||||
assert (std::string("xyz") + number == strings.back());
|
||||
assert (CLOB("abc0") == blobs.front());
|
||||
blob.assignRaw("abc", 3);
|
||||
blob.appendRaw(number.c_str(), number.size());
|
||||
assert (blob == blobs.back());
|
||||
assert (.5 == floats.front());
|
||||
assert (floats.size() - 1 + .5 == floats.back());
|
||||
}
|
||||
|
||||
void setSimple();
|
||||
void setComplex();
|
||||
void setComplexUnique();
|
||||
void multiSetSimple();
|
||||
void multiSetComplex();
|
||||
void mapComplex();
|
||||
void mapComplexUnique();
|
||||
void multiMapComplex();
|
||||
void selectIntoSingle();
|
||||
void selectIntoSingleStep();
|
||||
void selectIntoSingleFail();
|
||||
void lowerLimitOk();
|
||||
void lowerLimitFail();
|
||||
void combinedLimits();
|
||||
void combinedIllegalLimits();
|
||||
void ranges();
|
||||
void illegalRange();
|
||||
void singleSelect();
|
||||
void emptyDB();
|
||||
|
||||
void blob(int bigSize = 1024, const std::string& blobPlaceholder = "?");
|
||||
|
||||
template <typename C1, typename C2>
|
||||
void blobContainer(int size)
|
||||
{
|
||||
poco_data_using_statements;
|
||||
|
||||
std::string funct = "blobContainer()";
|
||||
C1 lastName(size, "lastname");
|
||||
C1 firstName(size, "firstname");
|
||||
C1 address(size, "Address");
|
||||
C2 img(size, CLOB("0123456789", 10));
|
||||
int count = 0;
|
||||
try { session() << "INSERT INTO Person VALUES (?,?,?,?)", use(lastName), use(firstName), use(address), use(img), now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||
try { session() << "SELECT COUNT(*) FROM Person", into(count), now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||
assert (count == size);
|
||||
|
||||
C2 res;
|
||||
try { session() << "SELECT Image FROM Person", into(res), now; }
|
||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||
assert (res.size() == img.size());
|
||||
assert (res == img);
|
||||
}
|
||||
|
||||
void blobStmt();
|
||||
|
||||
void dateTime();
|
||||
void date();
|
||||
void time();
|
||||
void floats();
|
||||
void doubles();
|
||||
void tuples();
|
||||
void tupleVector();
|
||||
|
||||
void internalExtraction();
|
||||
void filter(const std::string& query =
|
||||
"SELECT * FROM Vectors ORDER BY int0 ASC",
|
||||
const std::string& intFldName = "int0");
|
||||
|
||||
void internalBulkExtraction();
|
||||
void internalBulkExtractionUTF16();
|
||||
void internalStorageType();
|
||||
void nulls();
|
||||
void notNulls(const std::string& sqlState = "23502");
|
||||
void rowIterator();
|
||||
void stdVectorBool();
|
||||
|
||||
void asynchronous(int rowCount = 500);
|
||||
|
||||
void any();
|
||||
void dynamicAny();
|
||||
|
||||
void multipleResults(const std::string& sql =
|
||||
"SELECT * FROM Person WHERE Age = ?; "
|
||||
"SELECT Age FROM Person WHERE FirstName = 'Bart'; "
|
||||
"SELECT * FROM Person WHERE Age = ? OR Age = ? ORDER BY Age;");
|
||||
|
||||
void sqlChannel(const std::string& connect);
|
||||
void sqlLogger(const std::string& connect);
|
||||
|
||||
void sessionTransaction(const std::string& connect);
|
||||
void transaction(const std::string& connect);
|
||||
void transactor();
|
||||
void nullable();
|
||||
|
||||
void unicode(const std::string& dbConnString);
|
||||
|
||||
void reconnect();
|
||||
|
||||
private:
|
||||
static const std::string MULTI_INSERT;
|
||||
static const std::string MULTI_SELECT;
|
||||
|
||||
void setTransactionIsolation(Poco::Data::Session& session, Poco::UInt32 ti);
|
||||
|
||||
Poco::Data::Session& session();
|
||||
Poco::Data::Session* _pSession;
|
||||
};
|
||||
|
||||
|
||||
inline Poco::Data::Session& SQLExecutor::session()
|
||||
{
|
||||
poco_check_ptr (_pSession);
|
||||
return *_pSession;
|
||||
}
|
||||
|
||||
|
||||
#endif // SQLExecutor_INCLUDED
|
||||
@@ -0,0 +1,31 @@
|
||||
//
|
||||
// WinDriver.cpp
|
||||
//
|
||||
// Windows test driver for Poco ODBC.
|
||||
//
|
||||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#include "WinTestRunner/WinTestRunner.h"
|
||||
#include "ODBCTestSuite.h"
|
||||
#include "Poco/Data/ODBC/Connector.h"
|
||||
|
||||
|
||||
class TestDriver: public CppUnit::WinTestRunnerApp
|
||||
{
|
||||
void TestMain()
|
||||
{
|
||||
Poco::Data::ODBC::Connector::registerConnector();
|
||||
|
||||
CppUnit::WinTestRunner runner;
|
||||
runner.addTest(ODBCTestSuite::suite());
|
||||
runner.run();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
TestDriver theDriver;
|
||||
BIN
Binary file not shown.
Reference in New Issue
Block a user