Mysql Select * from Table
-
Hi All i am useing _ConnectionPtr and _RecordsetPtr for connection and get information from mysql databases.i have a problem to get values when i am useing "Select * from table".How can i get table information.
_ConnectionPtr pConn = NULL;
// Define string variables for ADO connection
_bstr_t strCon("Driver={MySQL ODBC 5.1 Driver};Database="";User=root; Password=root;Option=3;");HRESULT hr = S\_OK; //Initialize the COM Library CoInitialize(NULL); hr = pConn.CreateInstance((\_\_uuidof(Connection))); if(FAILED(hr)) { AfxMessageBox("Error instantiating Connection object\\n"); } hr = pConn->Open(strCon,"root","root",0); if(FAILED(hr)) { AfxMessageBox("Error Opening Database object using ADO \_ConnectionPtr \\n"); } ::\_RecordsetPtr rs; rs = pConn->Execute(\_bstr\_t("use Databases"), 0, adCmdText); rs = pConn->Execute(\_bstr\_t("Select \* from tatblename"), 0, adCmdText);
Plz help me
-
Hi All i am useing _ConnectionPtr and _RecordsetPtr for connection and get information from mysql databases.i have a problem to get values when i am useing "Select * from table".How can i get table information.
_ConnectionPtr pConn = NULL;
// Define string variables for ADO connection
_bstr_t strCon("Driver={MySQL ODBC 5.1 Driver};Database="";User=root; Password=root;Option=3;");HRESULT hr = S\_OK; //Initialize the COM Library CoInitialize(NULL); hr = pConn.CreateInstance((\_\_uuidof(Connection))); if(FAILED(hr)) { AfxMessageBox("Error instantiating Connection object\\n"); } hr = pConn->Open(strCon,"root","root",0); if(FAILED(hr)) { AfxMessageBox("Error Opening Database object using ADO \_ConnectionPtr \\n"); } ::\_RecordsetPtr rs; rs = pConn->Execute(\_bstr\_t("use Databases"), 0, adCmdText); rs = pConn->Execute(\_bstr\_t("Select \* from tatblename"), 0, adCmdText);
Plz help me
I don't know who in the living frock is marking your questions as "Good" (apparently none of your questions are that awesome to be marked as a good questions). I've noticed this a few times and I wonder if you have a split personality (another login) to "help yourself"? Remember - the ones likely to provide you an useful answer do not care about if or not the query is marked as good.
It is a crappy thing, but it's life -^ Carlo Pallini
-
I don't know who in the living frock is marking your questions as "Good" (apparently none of your questions are that awesome to be marked as a good questions). I've noticed this a few times and I wonder if you have a split personality (another login) to "help yourself"? Remember - the ones likely to provide you an useful answer do not care about if or not the query is marked as good.
It is a crappy thing, but it's life -^ Carlo Pallini
-
It was only a doubt that I had, so I expressed it instead of keeping it on my mind. Not that I'm blaming you for anything, and I'm glad you've clarified it.
It is a crappy thing, but it's life -^ Carlo Pallini
-
It was only a doubt that I had, so I expressed it instead of keeping it on my mind. Not that I'm blaming you for anything, and I'm glad you've clarified it.
It is a crappy thing, but it's life -^ Carlo Pallini
-
Hi All i am useing _ConnectionPtr and _RecordsetPtr for connection and get information from mysql databases.i have a problem to get values when i am useing "Select * from table".How can i get table information.
_ConnectionPtr pConn = NULL;
// Define string variables for ADO connection
_bstr_t strCon("Driver={MySQL ODBC 5.1 Driver};Database="";User=root; Password=root;Option=3;");HRESULT hr = S\_OK; //Initialize the COM Library CoInitialize(NULL); hr = pConn.CreateInstance((\_\_uuidof(Connection))); if(FAILED(hr)) { AfxMessageBox("Error instantiating Connection object\\n"); } hr = pConn->Open(strCon,"root","root",0); if(FAILED(hr)) { AfxMessageBox("Error Opening Database object using ADO \_ConnectionPtr \\n"); } ::\_RecordsetPtr rs; rs = pConn->Execute(\_bstr\_t("use Databases"), 0, adCmdText); rs = pConn->Execute(\_bstr\_t("Select \* from tatblename"), 0, adCmdText);
Plz help me
Davitor wrote:
i have a problem to get values when i am useing "Select * from table".
Are we supposed to guess at this problem?
Davitor wrote:
::_RecordsetPtr rs;
Do you need to call
CreateInstance()
on thers
object before using it?"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons