Article View: borland.public.cppbuilder.database.ado
Article #4153Re: Stored Proc run time
From: bill stevenson
Date: Fri, 29 Mar 2002 09:32
Date: Fri, 29 Mar 2002 09:32
29 lines
2098 bytes
2098 bytes
"Dave" <dave@nospam.com> wrote in message news:3c7d6f10$1_1@dnews...
> When placing the stored proc control on a form and using the following
code
> it doesnt work.
>
> spData->ConnectionString = p_DBConn;
> spData->ProcedureName = "ap_tblForm_INS;1";
> spData->Parameters->ParamByName("@ins_company_id")->Value = p_coyid;
> spData->Parameters->ParamByName("@ins_data")->Value = p_data;
> spData->Parameters->ParamByName("@ins_formType_id")->Value = 1;
> spData->ExecProc();
>
> However if I fill in the connection string and procedure name at design
time
> it works fine...
>
> TIA
>
>
use ADOCommand component,the ADOCommand ingores the parameters.like this:
> ADOCommand1->ConnectionString = p_DBConn;
> ADOCommand1->ProcedureName = "ap_tblForm_INS";//not ap_tblForm_INS;1
ADOCommand1->Parameters->Refresh();
> ADOCommand1->Parameters->ParamByName("@ins_company_id")->Value = p_coyid;
> ADOCommand1->Parameters->ParamByName("@ins_data")->Value = p_data;
> ADOCommand1->Parameters->ParamByName("@ins_formType_id")->Value = 1;
> ADOCommand1->ExecProc();
may you success!
Technical Details
Message-ID:
<3ca43412$1_2@dnews>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!supernews.com!207.217.77.43.MISMATCH!newsfeed1.earthlink.net!newsfeed.earthlink.net!news.maxwell.syr.edu!out.nntp.be!propagator-SanJose!in.nntp.be!newsfeed01.tsnz.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnewsReferences:
<3c7d6f10$1_1@dnews>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10698b,9f213c997df0c8ad X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2002-03-29 01:35:52 PST Reply-To: "bill stevenson" <lzh975@sina.com> From: "bill stevenson" <lzh975@sohu.com> Newsgroups: borland.public.cppbuilder.database.ado References: <3c7d6f10$1_1@dnews> Subject: Re: Stored Proc run time Date: Fri, 29 Mar 2002 17:32:28 +0800 Lines: 31 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2919.6700 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700 NNTP-Posting-Host: 61.144.147.102 Message-ID: <3ca43412$1_2@dnews> X-Trace: dnews 1017394194 61.144.147.102 (29 Mar 2002 01:29:54 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!supernews.com!207.217.77.43.MISMATCH!newsfeed1.earthlink.net!newsfeed.earthlink.net!news.maxwell.syr.edu!out.nntp.be!propagator-SanJose!in.nntp.be!newsfeed01.tsnz.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews