Click here to Skip to main content
15,896,063 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: my problem code here Pin
vc-programmer-1-Feb-05 23:28
vc-programmer-1-Feb-05 23:28 
GeneralRe: my problem code here Pin
Ravi Bhavnani2-Feb-05 2:52
professionalRavi Bhavnani2-Feb-05 2:52 
GeneralRe: my problem code here Pin
Bob Ciora2-Feb-05 13:05
Bob Ciora2-Feb-05 13:05 
GeneralRe: CStringArray Pin
vc-programmer-2-Feb-05 16:46
vc-programmer-2-Feb-05 16:46 
GeneralRe: CStringArray Pin
Ravi Bhavnani3-Feb-05 2:35
professionalRavi Bhavnani3-Feb-05 2:35 
GeneralADO Pin
yingkou1-Feb-05 15:50
yingkou1-Feb-05 15:50 
GeneralRe: ADO Pin
BlackDice2-Feb-05 3:10
BlackDice2-Feb-05 3:10 
GeneralRe: ADO Pin
yingkou2-Feb-05 13:53
yingkou2-Feb-05 13:53 
thanks for your help,but I want to use this method without importing ado.dll:

CString m_strConnect.Format("Provider=OraOLEDB.Oracle.1;Password=user_password;Persist Security Info=True;User ID=user_id;Data Source=user_DATASource;");
_RecordsetPtr m_prs;
_ConnectionPtr m_pConnection;
HRESULT hr = S_OK;
try
{
hr = m_prs.CreateInstance(__uuidof(Recordset));
if(FAILED(hr))
{
AfxMessageBox("记录集对象建立失败!",MB_ICONINFORMATION);
return ;
}
BeginWaitCursor();
m_strSQL = "select * from tableA";
hr = m_prs->Open(_bstr_t(m_strSQL),(IDispatch*)m_pConnection,adOpenStatic ,adLockReadOnly,adCmdText);
if(FAILED(hr))
{
AfxMessageBox("数据库查询失败!",MB_ICONINFORMATION);
return ;
}
EndWaitCursor();
}
catch(_com_error e)
{
CString errormessage;
errormessage.Format("错误信息:%s",(char*)(e.Description()));
AfxMessageBox(errormessage, MB_ICONINFORMATION);
return;
}
catch (CException err)
{
err.ReportError();
return;
}
catch(...)
{
AfxMessageBox("未知错误!",MB_ICONINFORMATION);
return;
}

compiles show errors:_ConnectionPtr not definition
Generalspin control for opengl Pin
cell511-Feb-05 14:42
cell511-Feb-05 14:42 
Generalspin control for opengl Pin
cell511-Feb-05 14:39
cell511-Feb-05 14:39 
QuestionHow to turn off hard disk immediately? Pin
ErisonWu1-Feb-05 14:09
ErisonWu1-Feb-05 14:09 
AnswerRe: How to turn off hard disk immediately? Pin
David Crow2-Feb-05 2:55
David Crow2-Feb-05 2:55 
GeneralRe: How to turn off hard disk immediately? Pin
ErisonWu2-Feb-05 14:48
ErisonWu2-Feb-05 14:48 
GeneralRe: How to turn off hard disk immediately? Pin
David Crow3-Feb-05 2:39
David Crow3-Feb-05 2:39 
GeneralA Simple Q on Returning Values from a Dialog Pin
LighthouseJ1-Feb-05 13:53
LighthouseJ1-Feb-05 13:53 
GeneralRe: A Simple Q on Returning Values from a Dialog Pin
Ryan Binns1-Feb-05 18:01
Ryan Binns1-Feb-05 18:01 
GeneralRe: A Simple Q on Returning Values from a Dialog Pin
LighthouseJ1-Feb-05 18:24
LighthouseJ1-Feb-05 18:24 
GeneralRe: A Simple Q on Returning Values from a Dialog Pin
David Crow2-Feb-05 3:04
David Crow2-Feb-05 3:04 
GeneralRe: A Simple Q on Returning Values from a Dialog Pin
LighthouseJ2-Feb-05 3:32
LighthouseJ2-Feb-05 3:32 
QuestionHow to tell when a socket is closed? Pin
shultas1-Feb-05 12:53
shultas1-Feb-05 12:53 
AnswerRe: How to tell when a socket is closed? Pin
Paul Belikian1-Feb-05 13:52
Paul Belikian1-Feb-05 13:52 
GeneralRe: How to tell when a socket is closed? Pin
shultas1-Feb-05 14:08
shultas1-Feb-05 14:08 
GeneralRe: How to tell when a socket is closed? Pin
Ravi Bhavnani2-Feb-05 2:56
professionalRavi Bhavnani2-Feb-05 2:56 
AnswerRe: How to tell when a socket is closed? Pin
markkuk2-Feb-05 1:00
markkuk2-Feb-05 1:00 
Generaltoolbar problem Pin
a3331-Feb-05 12:23
a3331-Feb-05 12:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.