mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-27 02:53:10 +01:00
final Data changes
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# Makefile
|
||||
#
|
||||
# $Id: //poco/Main/Data/samples/Makefile#1 $
|
||||
# $Id: //poco/Main/Data/samples/Makefile#2 $
|
||||
#
|
||||
# Makefile for Poco Data Samples
|
||||
#
|
||||
@@ -12,3 +12,4 @@ projects:
|
||||
$(MAKE) -C Binding $(MAKECMDGOALS)
|
||||
$(MAKE) -C TypeHandler $(MAKECMDGOALS)
|
||||
$(MAKE) -C RecordSet $(MAKECMDGOALS)
|
||||
$(MAKE) -C Tuple $(MAKECMDGOALS)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// RecordSet.cpp
|
||||
//
|
||||
// $Id: //poco/Main/Data/samples/RecordSet/src/RecordSet.cpp#1 $
|
||||
// $Id: //poco/Main/Data/samples/RecordSet/src/RecordSet.cpp#2 $
|
||||
//
|
||||
// This sample demonstrates the Data library.
|
||||
//
|
||||
@@ -59,13 +59,19 @@ int main(int argc, char** argv)
|
||||
select << "SELECT * FROM Person";
|
||||
select.execute();
|
||||
|
||||
// create a RecordSet and iterate over it
|
||||
// create a RecordSet
|
||||
RecordSet rs(select);
|
||||
std::size_t cols = rs.columnCount();
|
||||
// print all column names
|
||||
for (std::size_t col = 0; col < cols; ++col)
|
||||
{
|
||||
std::cout << rs.columnName(col) << std::endl;
|
||||
}
|
||||
// iterate over all rows and columns
|
||||
bool more = rs.moveFirst();
|
||||
while (more)
|
||||
{
|
||||
for (std::size_t col = 1; col <= cols; ++col)
|
||||
for (std::size_t col = 0; col < cols; ++col)
|
||||
{
|
||||
std::cout << rs[col].convert<std::string>() << " ";
|
||||
}
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
#
|
||||
# Makefile
|
||||
#
|
||||
# $Id: //poco/Main/Data/samples/Tuple/Makefile#1 $
|
||||
# $Id: //poco/Main/Data/samples/Tuple/Makefile#2 $
|
||||
#
|
||||
# Makefile for Poco Data Tuple sample
|
||||
#
|
||||
|
||||
include $(POCO_BASE)/build/rules/global
|
||||
|
||||
objects = Binding
|
||||
objects = Tuple
|
||||
|
||||
target = Tuple
|
||||
target_version = 1
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.10"
|
||||
Name="Binding"
|
||||
ProjectGUID="{F2972327-DCA7-49BB-B55D-66C554CF1205}"
|
||||
Name="Tuple"
|
||||
ProjectGUID="{08C81227-3322-4DBD-A83F-55CCC933A5F7}"
|
||||
Keyword="Win32Proj">
|
||||
<Platforms>
|
||||
<Platform
|
||||
@@ -37,11 +37,11 @@
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
OutputFile="bin/Bindingd.exe"
|
||||
OutputFile="bin/Tupled.exe"
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories="..\..\..\lib"
|
||||
GenerateDebugInformation="TRUE"
|
||||
ProgramDatabaseFile="bin/Bindingd.pdb"
|
||||
ProgramDatabaseFile="bin/Tupled.pdb"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
@@ -96,7 +96,7 @@
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
OutputFile="bin/Binding.exe"
|
||||
OutputFile="bin/Tuple.exe"
|
||||
LinkIncremental="1"
|
||||
AdditionalLibraryDirectories="..\..\..\lib"
|
||||
GenerateDebugInformation="FALSE"
|
||||
@@ -138,7 +138,7 @@
|
||||
Name="Source Files"
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath=".\src\Binding.cpp">
|
||||
RelativePath=".\src\Tuple.cpp">
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="Tuple"
|
||||
ProjectGUID="{79D784CB-663C-444E-BCB2-1A1166D19DFB}"
|
||||
ProjectGUID="{08C81227-3322-4DBD-A83F-55CCC933A5F7}"
|
||||
Keyword="Win32Proj"
|
||||
>
|
||||
<Platforms>
|
||||
|
||||
@@ -11,6 +11,10 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RecordSet", "RecordSet\Reco
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Tuple", "Tuple\Tuple_vs71.vcproj", "{08C81227-3322-4DBD-A83F-55CCC933A5F7}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfiguration) = preSolution
|
||||
debug_shared = debug_shared
|
||||
@@ -29,6 +33,10 @@ Global
|
||||
{56F66D36-F11E-4AA1-AD37-4518A253059D}.debug_shared.Build.0 = debug_shared|Win32
|
||||
{56F66D36-F11E-4AA1-AD37-4518A253059D}.release_shared.ActiveCfg = release_shared|Win32
|
||||
{56F66D36-F11E-4AA1-AD37-4518A253059D}.release_shared.Build.0 = release_shared|Win32
|
||||
{08C81227-3322-4DBD-A83F-55CCC933A5F7}.debug_shared.ActiveCfg = debug_shared|Win32
|
||||
{08C81227-3322-4DBD-A83F-55CCC933A5F7}.debug_shared.Build.0 = debug_shared|Win32
|
||||
{08C81227-3322-4DBD-A83F-55CCC933A5F7}.release_shared.ActiveCfg = release_shared|Win32
|
||||
{08C81227-3322-4DBD-A83F-55CCC933A5F7}.release_shared.Build.0 = release_shared|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
EndGlobalSection
|
||||
|
||||
Reference in New Issue
Block a user