Click here to Skip to main content
15,915,508 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionhow to obtain info stored in the resource Pin
belzu6-Sep-01 4:42
belzu6-Sep-01 4:42 
AnswerRe: how to obtain info stored in the resource Pin
Michael Dunn6-Sep-01 6:17
sitebuilderMichael Dunn6-Sep-01 6:17 
GeneralRe: how to obtain info stored in the resource Pin
belzu6-Sep-01 11:14
belzu6-Sep-01 11:14 
GeneralRe: how to obtain info stored in the resource Pin
Michael Dunn6-Sep-01 15:31
sitebuilderMichael Dunn6-Sep-01 15:31 
GeneralRe: how to obtain info stored in the resource Pin
belzu7-Sep-01 4:48
belzu7-Sep-01 4:48 
Generalkeyboard input in a CDialog Pin
6-Sep-01 4:17
suss6-Sep-01 4:17 
GeneralRe: keyboard input in a CDialog Pin
Tomasz Sowinski6-Sep-01 4:28
Tomasz Sowinski6-Sep-01 4:28 
GeneralRecreate Stored Procedure inside ADO Pin
Bigge6-Sep-01 3:56
Bigge6-Sep-01 3:56 
Hi there!!

I want to recreate a stored procedure when i pass it to the SQL server with ADO.
I found a example at MSDN, but its to much code. I wonder if there are any easier way to do this?



MSDN example:
_bstr_t bstrCreate ( L"create proc sp_AdoTest( @InParam int, "


L"@OutParam int OUTPUT ) "
L"as "
L"select @OutParam = @InParam + 10 "
L"SELECT * FROM Authors WHERE "
L"State <> 'CA' "
L"return @OutParam +10" );


_bstr_t bstrDrop ( L"if exists "


L"(select * from sysobjects where "
L"id = object_id('dbo.sp_AdoTest') and "
L"sysstat & 0xf = 4)"
L"drop procedure dbo.sp_AdoTest" );


_bstr_t bstrSP ( L"sp_Adotest" );


Conn1.CreateInstance( __uuidof( ADODB::Connection ) );
Conn1->ConnectionString = bstrConnect;
Conn1->Open( bstrEmpty, bstrEmpty, bstrEmpty, -1 );


// Drop procedure, if it exists & recreate it.
Conn1->Execute( bstrDrop, &vtEmpty, ADODB::adCmdText);
Conn1->Execute( bstrCreate, &vtEmpty, ADODB::adCmdText);


Thank all folks out there who taking the time to help me!!
GeneralRe: Recreate Stored Procedure inside ADO Pin
Carlos Antollini6-Sep-01 5:06
Carlos Antollini6-Sep-01 5:06 
GeneralRe: Recreate Stored Procedure inside ADO Pin
Bigge6-Sep-01 10:21
Bigge6-Sep-01 10:21 
GeneralRe: Recreate Stored Procedure inside ADO Pin
Not Active6-Sep-01 10:42
mentorNot Active6-Sep-01 10:42 
GeneralRe: Recreate Stored Procedure inside ADO Pin
11-Mar-02 9:00
suss11-Mar-02 9:00 
GeneralRe: Recreate Stored Procedure inside ADO Pin
Carlos Antollini11-Mar-02 10:30
Carlos Antollini11-Mar-02 10:30 
GeneralRe: Recreate Stored Procedure inside ADO Pin
11-Mar-02 16:30
suss11-Mar-02 16:30 
GeneralProgress bar in status bar Pin
Ganesh Ramaswamy6-Sep-01 3:51
Ganesh Ramaswamy6-Sep-01 3:51 
GeneralUploading a file from Apple Mac through browser Pin
balgovindpandey6-Sep-01 1:50
balgovindpandey6-Sep-01 1:50 
GeneralRe: Uploading a file from Apple Mac through browser Pin
Anders Molin6-Sep-01 2:17
professionalAnders Molin6-Sep-01 2:17 
GeneralRe: Uploading a file from Apple Mac through browser Pin
6-Sep-01 7:19
suss6-Sep-01 7:19 
GeneralStrange problems with a VC++ 6 Installation Pin
6-Sep-01 1:44
suss6-Sep-01 1:44 
GeneralRe: Strange problems with a VC++ 6 Installation Pin
Tim Deveaux6-Sep-01 11:15
Tim Deveaux6-Sep-01 11:15 
GeneralClosing all open files Pin
-=[{Jçç}||7.ê.Q]=-5-Sep-01 23:32
-=[{Jçç}||7.ê.Q]=-5-Sep-01 23:32 
Generaluse in lib file in dll file . please help !!! Pin
5-Sep-01 23:13
suss5-Sep-01 23:13 
GeneralRe: use in lib file in dll file . please help !!! Pin
Tomasz Sowinski6-Sep-01 2:13
Tomasz Sowinski6-Sep-01 2:13 
GeneralSo What Can I to do ??? Please HELP !!! Pin
6-Sep-01 8:33
suss6-Sep-01 8:33 
GeneralInitialize a COleDateTime object Pin
Gérald Mercet5-Sep-01 23:07
Gérald Mercet5-Sep-01 23:07 

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.