Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / July 2006

Tip: Looking for answers? Try searching our database.

error C2065: ¡°adCmdProc¡± : non-declared identifier

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Joseph Lu - 20 Jul 2006 02:32 GMT
Hi all,
   When I use the below line code to execute a stored procedure , I got a
error as described below:

       My code line :
               pMyConnect->Execute("EXEC sp_test"
,&RecordsAffected,adCmdProc);
       Error :
               error C2065: ¡°adCmdProc¡± : non-declared identifier

   Could any body tell me why?

Thanks in advance!

Joseph
Joseph Lu - 20 Jul 2006 02:40 GMT
All my code as listed as below:

 _ConnectionPtr pMyConnect=NULL;
 HRESULT hr=pMyConnect.CreateInstance(__uuidof(Connection));
 if(FAILED(hr))return;

 _bstr_t strConnect="Provider=SQLOLEDB; Server=127.0.0.1;Database=webtest;
uid=sa; pwd=;";
 //connecting to the database server now:
 try{
   pMyConnect->Open(strConnect,"","",adModeShareDenyNone);
   _variant_t RecordsAffected;

   pMyConnect->Execute("EXEC sp_test" ,&RecordsAffected,2);
 }
 catch (_com_error &e)
 {
   AfxMessageBox(e.Description(), MB_OK ©¦ MB_ICONWARNING);
   if(pMyConnect->State())
    pMyConnect->Close();
 }

> Hi all,
>    When I use the below line code to execute a stored procedure , I got a
[quoted text clipped - 11 lines]
>
> Joseph
Joseph Lu - 20 Jul 2006 02:49 GMT
Well , I got it ,it should be adCmdStoredProc, not adCmdProc:-)

> All my code as listed as below:
>
[quoted text clipped - 33 lines]
>>
>> Joseph

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.