Click here to Skip to main content
15,920,836 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Variable Length Function parameter list Pin
Todd Smith7-Jan-02 11:47
Todd Smith7-Jan-02 11:47 
GeneralRe: Variable Length Function parameter list Pin
Tim Smith7-Jan-02 11:58
Tim Smith7-Jan-02 11:58 
GeneralRe: Variable Length Function parameter list Pin
Todd Smith7-Jan-02 12:33
Todd Smith7-Jan-02 12:33 
GeneralRe: Variable Length Function parameter list Pin
Nish Nishant7-Jan-02 18:34
sitebuilderNish Nishant7-Jan-02 18:34 
Generalchanging read-only CEdit background color Pin
Kuniva7-Jan-02 9:36
Kuniva7-Jan-02 9:36 
GeneralRe: changing read-only CEdit background color Pin
Joaquín M López Muñoz7-Jan-02 10:19
Joaquín M López Muñoz7-Jan-02 10:19 
GeneralRe: changing read-only CEdit background color Pin
Tim Deveaux7-Jan-02 10:30
Tim Deveaux7-Jan-02 10:30 
GeneralStored procedure ADO Pin
youssef7-Jan-02 8:35
youssef7-Jan-02 8:35 
Subject: Stored procedure ADO

Hi,

I working with Stored Procedure with a SQL Database.

I use a procedure for writing to the database 2 paramaters (a STRING and a INTEGER).

My procedure working with the STRING but not when I writing a INTEGER. It is probably in my code at pParam1.
If anyone can help me for this is great.

My code :


_ConnectionPtr pConn("ADODB.Connection");
_ParameterPtr pParam2,pParam1;

CString strFileName = "JK010104";
int iBetacart = 1;
pConn->Open("provider=sqloledb.1;database=ARCHIVES_TVI;server=100.100.100.100;uid=Me;pwd=xxx;network=dbmssocn","","",adConnectUnspecified);
_CommandPtr pCmd("ADODB.Command");
pCmd->ActiveConnection = pConn;
//Cmd->CommandText = "StartFileNum";
pCmd->CommandText = "ResetFileNum";
// pCmd->CommandText = "EndSuccesFileNum";

pCmd->CommandTimeout = 20;
pCmd->CommandType = adCmdStoredProc;
// _RecordsetPtr pRst("ADODB.Recordset");
// pRst = pCmd->Execute(NULL, NULL, adCmdStoredProc);

pParam2 = pCmd->CreateParameter ( _bstr_t ("File_Name"), adVarChar,
adParamInput, strFileName.GetLength (), (_bstr_t) strFileName);

pCmd->Parameters->Append ( pParam2);


Param1 = pCmd->CreateParameter ( _bstr_t ("AutomatNr"), adInteger,
adParamInput, sizeof (int), _variant_t ( long (iBetacart)));

pCmd->Parameters->Append ( pParam1);

_RecordsetPtr pRecordset;
pRecordset.CreateInstance(__uuidof(Recordset));
pRecordset = pCmd->Execute(NULL, NULL, adCmdStoredProc);

youssef



GeneralSetMenuItemBitmaps() and GetSystemMetrics() Pin
7-Jan-02 8:25
suss7-Jan-02 8:25 
GeneralCTime, strftime, Format, %z/%Z Pin
Tomasso7-Jan-02 6:44
Tomasso7-Jan-02 6:44 
GeneralRe: CTime, strftime, Format, %z/%Z Pin
Mike Eriksson8-Jan-02 0:03
Mike Eriksson8-Jan-02 0:03 
GeneralWebBrowser-Control: FileDownload-Event Pin
7-Jan-02 5:46
suss7-Jan-02 5:46 
GeneralUNICODE file I/O Pin
7-Jan-02 5:15
suss7-Jan-02 5:15 
GeneralRe: UNICODE file I/O Pin
7-Jan-02 5:55
suss7-Jan-02 5:55 
GeneralEmbed objects with custom icons in a CRichEditCtrl Pin
7-Jan-02 3:45
suss7-Jan-02 3:45 
GeneralAdding buttons Pin
Rickard Andersson207-Jan-02 3:07
Rickard Andersson207-Jan-02 3:07 
GeneralHelp with CRectTracker Pin
Eugene Pustovoyt7-Jan-02 2:02
Eugene Pustovoyt7-Jan-02 2:02 
GeneralRe: Help with CRectTracker Pin
Roger Allen7-Jan-02 4:43
Roger Allen7-Jan-02 4:43 
GeneralRe: Help with CRectTracker Pin
Eugene Pustovoyt7-Jan-02 19:29
Eugene Pustovoyt7-Jan-02 19:29 
GeneralRe: Help with CRectTracker Pin
7-Jan-02 17:24
suss7-Jan-02 17:24 
GeneralRe: Help with CRectTracker Pin
Eugene Pustovoyt7-Jan-02 19:34
Eugene Pustovoyt7-Jan-02 19:34 
GeneralReverse engineering Pin
Jon Newman7-Jan-02 1:19
Jon Newman7-Jan-02 1:19 
GeneralRe: Reverse engineering Pin
Jon Sagara7-Jan-02 1:32
Jon Sagara7-Jan-02 1:32 
GeneralRe: Reverse engineering Pin
Tim Smith7-Jan-02 1:58
Tim Smith7-Jan-02 1:58 
QuestionUpdate for Microsoft eMbedded Tools 3.0? Pin
Jasmyn7-Jan-02 0:28
Jasmyn7-Jan-02 0:28 

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.