mirror of
https://github.com/pocoproject/poco.git
synced 2025-03-04 19:13:30 +01:00
added explicit connector registration
This commit is contained in:
parent
bcf2f40627
commit
d5a08a8564
@ -32,6 +32,9 @@ struct Person
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
// register SQLite connector
|
||||
Poco::Data::SQLite::Connector::registerConnector();
|
||||
|
||||
// create a session
|
||||
Session session("SQLite", "sample.db");
|
||||
|
||||
|
@ -30,6 +30,9 @@ using Poco::Data::RecordSet;
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
// register SQLite connector
|
||||
Poco::Data::SQLite::Connector::registerConnector();
|
||||
|
||||
// create a session
|
||||
Session session("SQLite", "sample.db");
|
||||
|
||||
|
@ -30,6 +30,9 @@ int main(int argc, char** argv)
|
||||
typedef Poco::Tuple<std::string, std::string, int> Person;
|
||||
typedef std::vector<Person> People;
|
||||
|
||||
// register SQLite connector
|
||||
Poco::Data::SQLite::Connector::registerConnector();
|
||||
|
||||
// create a session
|
||||
Session session("SQLite", "sample.db");
|
||||
|
||||
|
@ -83,6 +83,9 @@ public:
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
// register SQLite connector
|
||||
Poco::Data::SQLite::Connector::registerConnector();
|
||||
|
||||
// create a session
|
||||
Session session("SQLite", "sample.db");
|
||||
|
||||
|
@ -37,8 +37,10 @@
|
||||
#include "Poco/Data/RowFormatter.h"
|
||||
#include "Poco/Data/RecordSet.h"
|
||||
#include "Poco/Data/SQLite/Notifier.h"
|
||||
#include "Poco/Data/SQLite/Connector.h"
|
||||
#include <iostream>
|
||||
|
||||
|
||||
using Poco::delegate;
|
||||
using Poco::Timespan;
|
||||
using Poco::Exception;
|
||||
@ -368,6 +370,9 @@ void doShell(DBEventHandler& dbEventHandler)
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
// register SQLite connector
|
||||
Poco::Data::SQLite::Connector::registerConnector();
|
||||
|
||||
// HTTPServer instance
|
||||
RequestHandlerFactory* pFactory = new RequestHandlerFactory;
|
||||
HTTPServer srv(pFactory, 9980);
|
||||
|
Loading…
x
Reference in New Issue
Block a user