Click here to Skip to main content
15,902,114 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: The problem is... Pin
David Crow7-Sep-05 4:48
David Crow7-Sep-05 4:48 
GeneralRe: The problem is... Pin
rbbhosale8-Sep-05 19:46
rbbhosale8-Sep-05 19:46 
QuestionHow to Store and retrieve Bitmap Image data from CByteArray Pin
snprani5-Sep-05 22:21
snprani5-Sep-05 22:21 
QuestionFile I/O Pin
Stanciu Vlad5-Sep-05 22:20
Stanciu Vlad5-Sep-05 22:20 
AnswerRe: File I/O Pin
Neagoe Gabriel5-Sep-05 22:34
Neagoe Gabriel5-Sep-05 22:34 
GeneralRe: File I/O Pin
Stanciu Vlad5-Sep-05 22:43
Stanciu Vlad5-Sep-05 22:43 
AnswerRe: File I/O Pin
David Crow6-Sep-05 4:48
David Crow6-Sep-05 4:48 
QuestionError when calling stored procedure from CRecordset Pin
Nandiator5-Sep-05 21:48
Nandiator5-Sep-05 21:48 
Hello,

I am using MFC to call a stored procedure written in Oracle PL/SQL, but when I make
the call I get the next error in Spanish:
"No se enlazaron columnas antes de llamar a SQLFetchScroll o
SQLExtendedFetch", which more or less in English means:
"No rows were binded before calling SQLFetchScroll or SQLExtendedFetch".

I am using a CRecordset derived class to access the stored procedure. I am
unable to find the error.


THE STORED PROCEDURE'S HEADER:

Sp_Int_Ot_Ordendetrabajoalta ( lineatrabajo NUMBER, lv_orden NUMBER, usuario
VARCHAR2, idvehiculo NUMBER, fechamax1 VARCHAR2, resumen VARCHAR2, detalle
VARCHAR2,
coderp VARCHAR2, numtrabrecibidos NUMBER, lv_CODOT VARCHAR2, retorno OUT
INTEGER)


THE .H FOR THE CRECORDSET DERIVED CLASS (Visual Studio 6 comments removed)

class CRecSP : public CRecordset
{
public:
CRecSP(CDatabase* pDatabase = NULL);
DECLARE_DYNAMIC(CRecSP)
CString m_szSQL;
long m_RETORNO;
virtual CString GetDefaultConnect();
virtual CString GetDefaultSQL();
virtual void DoFieldExchange(CFieldExchange* pFX);
};


THE .CPP FOR THE CLASS (VS6 comments removed)

IMPLEMENT_DYNAMIC(CRecSP, CRecordset)
CRecSP::CRecSP(CDatabase* pdb) : CRecordset(pdb)
{
m_RETORNO = 0;
m_nParams = 1;
m_nDefaultType = snapshot;
}

CString CRecSP::GetDefaultConnect()
{
return _T( DB_CONNECTION_STRING );
}

CString CRecSP::GetDefaultSQL()
{
return m_szSQL;
}

void CRecSP::DoFieldExchange(CFieldExchange* pFX)
{
pFX->SetFieldType(CFieldExchange::outputParam);
RFX_Long(pFX, _T("[retorno]"), m_RETORNO );
}


USING THE CRECORDSET DERIVED CLASS: (Vars read from EditBoxes as CStrings
and formatted in the SQL)

CRecSP *rec = new CRecSP(&db);

szSQL.Format( "{CALL
FGROT2005.SP_INT_OT_ORDENDETRABAJOALTA(%s,%s,'%s',%s,'%s','%s','%s','%s',%s,'%s',?)}",
szLinea, szOrden, "USER", szIdVeh, szFechaMax, szResumen,
szDetalle, "ERP", "0", szCodOT
);

rec->m_szSQL = szSQL;

//rec->Open( CRecordset::forwardOnly,szSQL,CRecordset::readOnly );
rec->Open( );
iError = rec->m_RETORNO;
rec->Close();


-- modified at 3:49 Tuesday 6th September, 2005
QuestionAdding CStringArray data into another CStringArray...help.. Pin
babyspidy5-Sep-05 20:59
babyspidy5-Sep-05 20:59 
AnswerRe: Adding CStringArray data into another CStringArray...help.. Pin
Neagoe Gabriel5-Sep-05 21:56
Neagoe Gabriel5-Sep-05 21:56 
AnswerRe: Adding CStringArray data into another CStringArray...help.. Pin
kakan5-Sep-05 22:00
professionalkakan5-Sep-05 22:00 
GeneralRe: Adding CStringArray data into another CStringArray...help.. Pin
babyspidy5-Sep-05 22:44
babyspidy5-Sep-05 22:44 
GeneralRe: Adding CStringArray data into another CStringArray...help.. Pin
babyspidy5-Sep-05 23:00
babyspidy5-Sep-05 23:00 
QuestionMemory requirement in CListCtrl Pin
rbbhosale5-Sep-05 20:52
rbbhosale5-Sep-05 20:52 
AnswerRe: Memory requirement in CListCtrl Pin
Neagoe Gabriel5-Sep-05 21:26
Neagoe Gabriel5-Sep-05 21:26 
AnswerRe: Memory requirement in CListCtrl Pin
David Crow6-Sep-05 4:55
David Crow6-Sep-05 4:55 
GeneralRe: Memory requirement in CListCtrl Pin
rbbhosale8-Sep-05 19:18
rbbhosale8-Sep-05 19:18 
GeneralRe: Memory requirement in CListCtrl Pin
David Crow9-Sep-05 2:39
David Crow9-Sep-05 2:39 
Questionproblem with"temporary storage of images" Pin
a_david1235-Sep-05 20:49
a_david1235-Sep-05 20:49 
AnswerRe: problem with"temporary storage of images" Pin
khan++5-Sep-05 21:07
khan++5-Sep-05 21:07 
AnswerRe: problem with"temporary storage of images" Pin
The Code Machine6-Sep-05 7:42
The Code Machine6-Sep-05 7:42 
QuestionGetting Color Of Control Pin
Identity Undisclosed5-Sep-05 20:42
Identity Undisclosed5-Sep-05 20:42 
AnswerRe: Getting Color Of Control Pin
G Haranadh5-Sep-05 21:14
G Haranadh5-Sep-05 21:14 
GeneralRe: Getting Color Of Control Pin
Identity Undisclosed6-Sep-05 0:18
Identity Undisclosed6-Sep-05 0:18 
AnswerRe: Getting Color Of Control Pin
ThatsAlok5-Sep-05 23:17
ThatsAlok5-Sep-05 23:17 

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.