fetch data | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

fetch data

I connected into MSSQL 2005 express.
I used
_ConnectionPtr conn("ADODB.Connection");
and Open method.
I never used it before.
How to issue sql statement and fetch some data.
Could you provide link ?
I forget to tell you,that
I m using Visual C++ 6.0
You will get quick and right answer in c++ forum,
else google for using c++ to connect to SQL server
I tried and got lot of references how to do it in VB or .net<br />Please ,help somebody<br />Again<br />I have Visual C++ 6.0 app.<br />I created connection<br />CString strConn =_T("Provider=SQLNCLI;Initial Catalog=MOGOWIN;User Id=USER<img src=’/community/emoticons/emotion-4.gif’ alt=’;P’ />assword=’password’;Data Source=localhost\express"); <br />bstr_t bstrConn;<br /> <br />_ConnectionPtr conn("ADODB.Connection");<br /><br />bstrConn=strConn; <br />conn-&gt;Open(bstrConn, _T(""), _T(""), 0)<br /><br />this code works.<br />How issue sql statement and fetch data?<br />Thanks