15 мая 2023 года "Исходники.РУ" отмечают своё 23-летие!
Поздравляем всех причастных и неравнодушных с этим событием!
И огромное спасибо всем, кто был и остаётся с нами все эти годы!

Главная Форум Журнал Wiki DRKB Discuz!ML Помощь проекту


Please help on Recordset-Stored Procedure

RADHAA -- cargoone@giasmd01.vsnl.net.in
Thursday, February 27, 1997

Environment: VC++ 4.1, Win95

Hai  Friends
I kindly ask u the following questiones.

In my project i want to use Stored procedure, So to do that i tried to use
CRecordset directly (before that i created CDatabase pointer) to execute the
procedure, that returns some result set.
Here I am able to the same when i derive a class from CRecordSet using
ClassWizard.But my need is, I want to do it directly from the CRecordset
intance. 

Can u please help me out .....

Till u guys return i will be working on it.

Thank u

RADX



Andrew Borden -- borden@ms.com
Thursday, February 27, 1997

[Mini-digest: 2 responses]

I don't have the exact sytax in from of me but it goes something like this;
(at this minute I'm typing on SunOS)


If you supply an sql string (which could be a stored proc invocation with
pararmeters) when you open the recordset, then GetDefaultSQL() doesn't get
called...


i.e.
given CDatabase* pdb;
CString sqlstring;

CMyrecordset* prec = new CMyrecordset(pdb);

if(prec.Open(sqlstring))
{

...
...


I'm typeing this from memory, if it's off or if you need sample code, let me
know and I'll dust off a few bytes and send them to you.

-Andrew Borden

On Feb 27,  4:27pm, RADHAA wrote:
> Subject: Please help on Recordset-Stored Procedure
> Environment: VC++ 4.1, Win95
>
> Hai  Friends
> I kindly ask u the following questiones.
>
> In my project i want to use Stored procedure, So to do that i tried to use
> CRecordset directly (before that i created CDatabase pointer) to execute the
> procedure, that returns some result set.
> Here I am able to the same when i derive a class from CRecordSet using
> ClassWizard.But my need is, I want to do it directly from the CRecordset
> intance.
>
> Can u please help me out .....
>
> Till u guys return i will be working on it.
>
> Thank u
>
> RADX
>-- End of excerpt from RADHAA


-----From: "Doug Brubacher" 

     "Mfc for yourself" (www.mushroomsoft.com) has an article titled:
        Using MFC and ODBC for Stored Procedures
     
     Although I am not working on this type of appl, I thought it probably 
     would be worth a look.
     
     Regards,
     
     Doug Brubacher
     Doug_Brubacher@compuware.com





Become an MFC-L member | Вернуться в корень Архива |