List:Commits« Previous MessageNext Message »
From:pharvey Date:April 22 2006 4:12am
Subject:Connector/ODBC 5 commit: r98 - MYODBCIns/include
View as plain text  
Modified:
   MYODBCIns/include/MYODBCIns.h
   MYODBCIns/include/MYODBCInsDataSource.h
   MYODBCIns/include/MYODBCInsDriver.h
Log:


Modified: MYODBCIns/include/MYODBCIns.h
===================================================================
--- MYODBCIns/include/MYODBCIns.h	2006-04-22 00:31:57 UTC (rev 97)
+++ MYODBCIns/include/MYODBCIns.h	2006-04-22 04:12:10 UTC (rev 98)
@@ -170,19 +170,70 @@
     /*!
         \brief  Deregisters a driver.
 
-                This deregisters
+                This deregisters a driver. The way that this works is;
+                - decrements usage count
+                - if usage count is 0 then remove driver registration info from ODBC sys
info
+
+                This does not remove any files - that should be done after the usage
count is 0
+                and the driver registration info has been removed from ODBC sys info.
+
+                This uses SQLRemoveDriver().
     */
     static bool doDeregisterDriver( const QString &stringName, bool bRemoveDSNs =
false, DWORD *pnUsageCount = NULL );
+
+    /*!
+        \brief  Inserts a new data source into the ODBC sys info.
+    */
     static bool doInsertDataSource( const QString &stringName, const QString
&stringAttributes, MYODBCInsDataSource::DATASOURCE_SCOPE nScope );
+
+    /*!
+        \brief  Updates an existing data source in the ODBC sys info.
+    */
     static bool doUpdateDataSource( const QString &stringName, const QString
&stringAttributes, MYODBCInsDataSource::DATASOURCE_SCOPE nScope );
+
+    /*!
+        \brief  Deletes an existing data source from the ODBC sys info.
+    */
     static bool doDeleteDataSource( const QString &stringName,
MYODBCInsDataSource::DATASOURCE_SCOPE nScope );
 
+    /*!
+        \brief  Use this to check if there are installer errors.
+    */
     static bool isError();
+
+    /*!
+        \brief  Use this to check if a data source name exists in the ODBC sys info.
+    */
     static bool isExistsDataSourceName( const QString &stringName,
MYODBCInsDataSource::DATASOURCE_SCOPE nScope );
 
 protected:
+    /*!
+        \brief  Use this to check if a character is a keyword/value pair delimiter or a 
+                end-of-string marker.
+    */
     static bool isDelim( const QString &stringKeywordValues, int nScanChar, DELIM
*pnDelim );
+
+    /*!
+        \brief  Use this to check if a character is a keyword/value pair delimiter.
+
+                The delimiter is typically a ';' or a '\0' but in some cases it can be
either. If it
+                is either (DELIM_BOTH) then this function will try to switch the *pnDelim
to the
+                actual delimiter character detected.
+
+        \note   Auto detection is not fool proof and as such the use of DELIM_BOTH is not
recommended.
+    */
     static bool isDelimKeywordValue( const QChar &charChar, DELIM *pnDelim );
+
+    /*!
+        \brief  Use this to check if a character is a end-of-string marker for a
keyword/value string.
+
+                The delimiter (end-of-string marker) is always a '\0' but for DELIM_NULL
you would find
+                two '\0' chars (one for the keryword/value pair delimiter and another for
a end-of-string).
+
+                In the case of a ';' (DELIM_SEMI) delimited keyword/value pair - the last
';' may be 
+                omitted. This means that the end-of-string marker (in this case a single
'\0') can act as 
+                both a keyword/value pair delimiter and as the end-of-string marker.
+    */
     static bool isDelimKeywordValues( const QString &stringKeywordValues, int
nScanChar, DELIM nDelim );
 };
 

Modified: MYODBCIns/include/MYODBCInsDataSource.h
===================================================================
--- MYODBCIns/include/MYODBCInsDataSource.h	2006-04-22 00:31:57 UTC (rev 97)
+++ MYODBCIns/include/MYODBCInsDataSource.h	2006-04-22 04:12:10 UTC (rev 98)
@@ -52,8 +52,9 @@
                                            "SERVER=localhost;DATABASE=db;UID=myid", 
                                            DATASOURCE_SCOPE_USER );
             // later... edit DSN
-            MYODBCInsDataSource ds( DATASOURCE_MODE_DSN_VIEW );
+            MYODBCInsDataSource ds;
 
+            ds.setMode( DATASOURCE_MODE_DSN_VIEW );
             ds.doRead( "MyDSN", DATASOURCE_SCOPE_USER );
             da.setDATABASE( "test" );
             da.doWrite( DATASOURCE_SCOPE_USER );

Modified: MYODBCIns/include/MYODBCInsDriver.h
===================================================================
--- MYODBCIns/include/MYODBCInsDriver.h	2006-04-22 00:31:57 UTC (rev 97)
+++ MYODBCIns/include/MYODBCInsDriver.h	2006-04-22 04:12:10 UTC (rev 98)
@@ -48,7 +48,7 @@
             MYODBCIns::doRegisterDriver( "MySQL Connector/ODBC v5", 
                                          "DRIVER=myodbc5.dll;SETUP=myodbc5S.dll" ); 
             // later... get the name of the SETUP library
-            MYODBCInsDriver d();
+            MYODBCInsDriver d;
 
             ds.doRead( "MySQL Connector/ODBC v5" );
             stringSetup = da.getSETUP();

Thread
Connector/ODBC 5 commit: r98 - MYODBCIns/includepharvey22 Apr