Click here to Skip to main content
15,900,108 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
GeneralRe: Best way to convert from std::wstring to std::string? Pin
David O'Neil10-Jan-11 11:20
professionalDavid O'Neil10-Jan-11 11:20 
GeneralRe: Best way to convert from std::wstring to std::string? Pin
jk chan14-Jan-11 4:46
jk chan14-Jan-11 4:46 
GeneralRe: Best way to convert from std::wstring to std::string? Pin
«_Superman_»14-Jan-11 7:05
professional«_Superman_»14-Jan-11 7:05 
QuestionWhat is meant by "STL Relational Database" programming? Pin
Xpnctoc7-Jan-11 5:04
Xpnctoc7-Jan-11 5:04 
AnswerRe: What is meant by "STL Relational Database" programming? Pin
Richard MacCutchan7-Jan-11 5:33
mveRichard MacCutchan7-Jan-11 5:33 
GeneralRe: What is meant by "STL Relational Database" programming? Pin
Xpnctoc7-Jan-11 5:40
Xpnctoc7-Jan-11 5:40 
Questiondialog not modal Pin
MrKBA6-Jan-11 0:19
MrKBA6-Jan-11 0:19 
AnswerRe: dialog not modal Pin
Cool_Dev6-Jan-11 3:58
Cool_Dev6-Jan-11 3:58 
GeneralRe: dialog not modal Pin
MrKBA6-Jan-11 21:49
MrKBA6-Jan-11 21:49 
QuestionChanging the style of a DateTimePicker Pin
Jim Crafton5-Jan-11 4:35
Jim Crafton5-Jan-11 4:35 
AnswerRe: Changing the style of a DateTimePicker Pin
User 74293387-Jan-11 12:17
professionalUser 74293387-Jan-11 12:17 
GeneralRe: Changing the style of a DateTimePicker Pin
Jim Crafton7-Jan-11 14:36
Jim Crafton7-Jan-11 14:36 
QuestionNeed to pass private member of a Class as a argument to function of another class and get modified there Pin
ptr_Electron4-Jan-11 21:38
ptr_Electron4-Jan-11 21:38 
AnswerRe: Need to pass private member of a Class as a argument to function of another class and get modified there Pin
Nuri Ismail4-Jan-11 21:49
Nuri Ismail4-Jan-11 21:49 
QuestionHow to get the delagate value via property Pin
ptr_Electron4-Jan-11 1:09
ptr_Electron4-Jan-11 1:09 
AnswerRe: How to get the delagate value via property Pin
Espen Harlinn4-Jan-11 11:01
professionalEspen Harlinn4-Jan-11 11:01 
QuestionFinding index of an array element?? Pin
Raza56801-Jan-11 16:25
Raza56801-Jan-11 16:25 
AnswerRe: Finding index of an array element?? Pin
Nuri Ismail3-Jan-11 1:57
Nuri Ismail3-Jan-11 1:57 
AnswerRe: Finding index of an array element?? Pin
jk chan4-Jan-11 5:46
jk chan4-Jan-11 5:46 
QuestionBasic string help -- Did I step into the Twilight Zone? Pin
Xpnctoc29-Dec-10 11:13
Xpnctoc29-Dec-10 11:13 
AnswerRe: Basic string help -- Did I step into the Twilight Zone? Pin
jk chan29-Dec-10 21:08
jk chan29-Dec-10 21:08 
AnswerRe: Basic string help -- Did I step into the Twilight Zone? Pin
Stephen Hewitt30-Dec-10 3:14
Stephen Hewitt30-Dec-10 3:14 
AnswerRe: Basic string help -- Did I step into the Twilight Zone? Pin
Xpnctoc30-Dec-10 6:14
Xpnctoc30-Dec-10 6:14 
QuestionCCommand execute stored procedure is failed! Pin
sergey-ka28-Dec-10 4:08
sergey-ka28-Dec-10 4:08 
Hi all!

I'am use ms sql server 2000 and msvs 2005 (visual c++)

Need to execute stored procedure in c++ client code.

On line
err = cmd.MoveFirst();
it's failed, because m_spRowset is NULL,
BUT then I remove line
update dbo.States set Name = '@' where StateId = 3 from stored procedure - it's OK?

What's wrong here?

Thanks for help!

sp code:
<br />
go<br />
alter procedure trans_GetList<br />
as<br />
begin<br />
update dbo.States set Name = '@' where StateId = 3<br />
<br />
select StateId from dbo.States<br />
end<br />
go<br />


c++ code:
<br />
CDataSource con;<br />
<br />
HRESULT err;<br />
    <br />
err = con.OpenFromInitializationString(L"...");<br />
   <br />
CSession session;<br />
<br />
err = session.Open(con);<br />
<br />
CCommand < CDynamicParameterAccessor, CBulkRowset, CMultipleResults > cmd;<br />
		<br />
err = cmd.Create(session, L"exec dbo.trans_GetList");<br />
err = cmd.Prepare();<br />
<br />
void *bufCmd = 0;<br />
<br />
err = cmd.BindParameters(&cmd.m_hParameterAccessor, cmd.m_spCommand, &bufCmd);<br />
err = cmd.Open(0, 0);	<br />
err = cmd.MoveFirst(); //Here is failed - m_spRowset is NULL<br />
<br />
while(err == S_OK)<br />
{<br />
   ...<br />
   err = cmd.MoveNext();<br />
}<br />
<br />
session.Close();<br />
con.Close();<br />

AnswerRe: CCommand execute stored procedure is failed! Pin
jerry_ch3-Oct-11 20:42
jerry_ch3-Oct-11 20:42 

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.