PTLib
Version 2.10.10
|
DSN (Data Source Name) Connection. More...
#include <podbc.h>
Public Member Functions | |
Constructor/Deconstructor | |
PDSNConnection () | |
~PDSNConnection () | |
Connection/Disconnect | |
PBoolean | Connect (PString Source, PString Username, PString Password) |
Connect to the MDAC using a pre-existing MDAC Defined DataSource This is different than calling PODBC::DataSource in that the Data Source is known defined externally within MDAC, More... | |
![]() | |
PODBC () | |
Constructor. More... | |
~PODBC () | |
Deconstructor. More... | |
Table | LoadTable (PString table) |
Load a specified Table/Stored Query or General 'SELECT' SQL Query. More... | |
PBoolean | Query (PString Query) |
Added Information to the DataSource. More... | |
PBoolean | DataSource (DataSources Source, ConnectData Data) |
DataSource This is the main function to call to contact a DataSource. More... | |
virtual PBoolean | Connect (LPCTSTR svSource) |
General Connect Function Custom connection strings should call this to connect Don't ask why its LPCTSTR! More... | |
PBoolean | Connect_DB2 (PFilePath DBPath) |
Connect to IBM DB2 DataSource. More... | |
PBoolean | Connect_XLS (PFilePath XLSPath, PString DefDir="") |
Connect to MS Office excel spreadsheet. More... | |
PBoolean | Connect_TXT (PFilePath TXTPath) |
Connect to an ascii text or cvs file. More... | |
PBoolean | Connect_FOX (PFilePath DBPath, PString User="", PString Pass="", PString Type="DBF", PBoolean Exclusive=false) |
Connect to a Foxpro dataSource. More... | |
PBoolean | Connect_MDB (PFilePath MDBPath, PString User="", PString Pass="", PBoolean Exclusive=false) |
Connect to a MS Access *.mdb DataSource. More... | |
PBoolean | Connect_PDOX (PDirectory DBPath, PDirectory DefaultDir, int version=5) |
Connect to a paradox database datastore. More... | |
PBoolean | Connect_Oracle (PString Server, PString User="", PString Pass="") |
Connect to an Oracle Datasource. More... | |
PBoolean | Connect_DBASE (PDirectory DBPath) |
Connect to a DBase DataStore. More... | |
PBoolean | Connect_MSSQL (PString User="", PString Pass="", PString Host="(local)", PBoolean Trusted=true, MSSQLProtocols Proto=MSSQLNamedPipes) |
Connect to a MS SQL Server. More... | |
PBoolean | Connect_mySQL (PString User="", PString Pass="", PString Host="localhost", int Port=3306, int Option=0) |
Connect to a mySQL Server. More... | |
PBoolean | ConnectDB_mySQL (PString DB, PString User="", PString Pass="", PString Host="localhost", int Port=3306, int Option=0) |
Connect to a mySQL Server's specified DataBase. More... | |
PBoolean | Connect_postgreSQL (PString DB, PString User, PString Pass, PString Host, int Port=5432, int Option=0) |
Connect to a postgreSQL Server. More... | |
void | Disconnect () |
General Disconnect from DataSource. More... | |
PStringArray | TableList (PString option="") |
Retrieve a List of Tables in the Datasource use the option field to specify the type of data to access. More... | |
PBoolean | NeedLongDataLen () |
Check whether their is a limit to Datalength when obtaining Long Data More... | |
virtual void | OnSQLError (PString RetCode, PString RetString) |
OnSQL Error. More... | |
void | SetPrecision (int Digit) |
Set the Number of Decimal places to round to By Default it is 4. More... | |
void | SetTimeFormat (PTime::TimeFormat tformat) |
Set the Time Display Format. More... | |
operator HDBC () | |
Operator Handle DataBase Connection. More... | |
![]() | |
virtual | ~PObject () |
virtual PObject * | Clone () const |
Create a copy of the class on the heap. More... | |
virtual PINDEX | HashFunction () const |
This function yields a hash value required by the PDictionary class. More... | |
virtual Comparison | Compare (const PObject &obj) const |
Compare the two objects and return their relative rank. More... | |
virtual Comparison | CompareObjectMemoryDirect (const PObject &obj) const |
Determine the byte wise comparison of two objects. More... | |
bool | operator== (const PObject &obj) const |
Compare the two objects. More... | |
bool | operator!= (const PObject &obj) const |
Compare the two objects. More... | |
bool | operator< (const PObject &obj) const |
Compare the two objects. More... | |
bool | operator> (const PObject &obj) const |
Compare the two objects. More... | |
bool | operator<= (const PObject &obj) const |
Compare the two objects. More... | |
bool | operator>= (const PObject &obj) const |
Compare the two objects. More... | |
virtual const char * | GetClass (unsigned ancestor=0) const |
Get the current dynamic type of the object instance. More... | |
PBoolean | IsClass (const char *cls) const |
virtual PBoolean | InternalIsDescendant (const char *clsName) const |
Determine if the dynamic type of the current instance is a descendent of the specified class. More... | |
virtual void | PrintOn (ostream &strm) const |
Output the contents of the object to the stream. More... | |
virtual void | ReadFrom (istream &strm) |
Input the contents of the object from the stream. More... | |
Additional Inherited Members | |
![]() | |
enum | FieldTypes { LongVarChar =-1, Binary =-2, VarBinary =-3, LongVarBinary =-4, BigInt =-5, TinyInt =-6, Bit =-7, Guid =-11, Unknown = 0, Char = 1, Numeric = 2, Decimal = 3, Integer = 4, SmallInt = 5, Float = 6, Real = 7, Double = 8, DateTime = 9, VarChar =12, Date =91, Time =92, TimeStamp =93 } |
Raw SQL data type codes Refer <sql.h> SQL_* This list is not inclusive. More... | |
enum | PwType { oPString, oBOOL, ochar, oshort, oint, olong, odouble, oPBYTEArray, oPInt64, oPTime, oPGUID } |
Converted Pwlib Field Types. More... | |
enum | DataSources { mySQL, MSSQL, Oracle, IBM_DB2, DBASE, Paradox, Excel, Ascii, Foxpro, MSAccess, postgreSQL } |
Datasources that are supported by this implementation used in the PODBC::DataSource Function. More... | |
enum | MSSQLProtocols { MSSQLNamedPipes, MSSQLWinSock, MSSQLIPX, MSSQLBanyan, MSSQLRPC } |
MSSQL protocols.If your interested? More... | |
![]() | |
enum | Comparison { LessThan = -1, EqualTo = 0, GreaterThan = 1 } |
Result of the comparison operation performed by the Compare() function. More... | |
![]() | |
static Comparison | InternalCompareObjectMemoryDirect (const PObject *obj1, const PObject *obj2, PINDEX size) |
Internal function caled from CompareObjectMemoryDirect() More... | |
static const char * | Class () |
Get the name of the class as a C string. More... | |
![]() | |
PODBC::DataSources | dbase |
![]() | |
PObject () | |
Constructor for PObject, made protected so cannot ever create one on its own. More... | |
![]() | |
SQLRETURN | m_nReturn |
Database Type connected to. More... | |
HENV | m_hEnv |
HDBC | m_hDBC |
DSN (Data Source Name) Connection.
The connection settings have been preconfiured in the MDAC (Microsoft Data Access Component) and is called using those Preset Settings. Calling the PDSNConnection::Connect has the same effect and is a replaceable for PODBC::DataSource,
PDSNConnection::PDSNConnection | ( | ) |
PDSNConnection::~PDSNConnection | ( | ) |
Connect to the MDAC using a pre-existing MDAC Defined DataSource
This is different than calling PODBC::DataSource in that the Data Source is known defined externally within MDAC,