Quantcast
Channel: CodeGuru Forums - Visual C++ Programming
Viewing all articles
Browse latest Browse all 3027

MYSQL VC++ Connection Dealy

$
0
0
Hi,

I'm using VS2012 with MYSQL SERVER 5.6 and ODBC 5.2.
How can i reduce the connection delay?
My code,
Code:

        CDatabase database;
        CString sDsn;       
        sDsn.Format("Driver={MySQL ODBC 5.2 ANSI Driver};Server=127.0.0.1;Database=Test;User=root;Password=client;Option=4;");
        TRY
        {       
                // Open the database               
                database.Open(NULL,false,false,sDsn,false);
                //Execute the Insert, Delete & Update query
                database.Close();               
        }
        CATCH(CDBException, e)
        {
                // If a database exception occured, show error msg
                AfxMessageBox("Database error: "+e->m_strError);
        }
        END_CATCH;


Viewing all articles
Browse latest Browse all 3027

Latest Images

Trending Articles



Latest Images