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, | |
![]() | |
PODBC () | |
Constructor. | |
~PODBC () | |
Deconstructor. | |
Table | LoadTable (PString table) |
Load a specified Table/Stored Query or | |
PBoolean | Query (PString Query) |
Added Information to the DataSource. | |
PBoolean | DataSource (DataSources Source, ConnectData Data) |
DataSource | |
virtual PBoolean | Connect (LPCTSTR svSource) |
General Connect Function Custom connection strings should call this to connect Don't ask why its LPCTSTR! | |
PBoolean | Connect_DB2 (PFilePath DBPath) |
Connect to IBM DB2 DataSource. | |
PBoolean | Connect_XLS (PFilePath XLSPath, PString DefDir="") |
Connect to MS Office excel spreadsheet. | |
PBoolean | Connect_TXT (PFilePath TXTPath) |
Connect to an ascii text or cvs file. | |
PBoolean | Connect_FOX (PFilePath DBPath, PString User="", PString Pass="", PString Type="DBF", PBoolean Exclusive=false) |
Connect to a Foxpro dataSource. | |
PBoolean | Connect_MDB (PFilePath MDBPath, PString User="", PString Pass="", PBoolean Exclusive=false) |
Connect to a MS Access *.mdb DataSource. | |
PBoolean | Connect_PDOX (PDirectory DBPath, PDirectory DefaultDir, int version=5) |
Connect to a paradox database datastore. | |
PBoolean | Connect_Oracle (PString Server, PString User="", PString Pass="") |
Connect to an Oracle Datasource. | |
PBoolean | Connect_DBASE (PDirectory DBPath) |
Connect to a DBase DataStore. | |
PBoolean | Connect_MSSQL (PString User="", PString Pass="", PString Host="(local)", PBoolean Trusted=true, MSSQLProtocols Proto=MSSQLNamedPipes) |
Connect to a MS SQL Server. | |
PBoolean | Connect_mySQL (PString User="", PString Pass="", PString Host="localhost", int Port=3306, int Option=0) |
Connect to a mySQL Server. | |
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. | |
PBoolean | Connect_postgreSQL (PString DB, PString User, PString Pass, PString Host, int Port=5432, int Option=0) |
Connect to a postgreSQL Server. | |
void | Disconnect () |
General Disconnect from DataSource. | |
PStringArray | TableList (PString option="") |
Retrieve a List of Tables in the Datasource | |
PBoolean | NeedLongDataLen () |
Check whether their is a limit to Datalength | |
virtual void | OnSQLError (PString RetCode, PString RetString) |
OnSQL Error. | |
void | SetPrecision (int Digit) |
Set the Number of Decimal places to | |
void | SetTimeFormat (PTime::TimeFormat tformat) |
Set the Time Display Format. | |
operator HDBC () | |
Operator Handle DataBase Connection. | |
![]() | |
virtual | ~PObject () |
virtual PObject * | Clone () const |
Create a copy of the class on the heap. | |
virtual PINDEX | HashFunction () const |
This function yields a hash value required by the PDictionary class. | |
virtual Comparison | Compare (const PObject &obj) const |
Compare the two objects and return their relative rank. | |
virtual Comparison | CompareObjectMemoryDirect (const PObject &obj) const |
Determine the byte wise comparison of two objects. | |
bool | operator== (const PObject &obj) const |
Compare the two objects. | |
bool | operator!= (const PObject &obj) const |
Compare the two objects. | |
bool | operator< (const PObject &obj) const |
Compare the two objects. | |
bool | operator> (const PObject &obj) const |
Compare the two objects. | |
bool | operator<= (const PObject &obj) const |
Compare the two objects. | |
bool | operator>= (const PObject &obj) const |
Compare the two objects. | |
virtual const char * | GetClass (unsigned ancestor=0) const |
Get the current dynamic type of the object instance. | |
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. | |
virtual void | PrintOn (ostream &strm) const |
Output the contents of the object to the stream. | |
virtual void | ReadFrom (istream &strm) |
Input the contents of the object from the stream. |
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... | |
![]() | |
static Comparison | InternalCompareObjectMemoryDirect (const PObject *obj1, const PObject *obj2, PINDEX size) |
Internal function caled from CompareObjectMemoryDirect() | |
static const char * | Class () |
Get the name of the class as a C string. | |
![]() | |
PODBC::DataSources | dbase |
![]() | |
PObject () | |
Constructor for PObject, made protected so cannot ever create one on its own. | |
![]() | |
SQLRETURN | m_nReturn |
Database Type connected to. | |
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,