Solved

GetStoredProcCommand not declared

Posted on 2007-03-27
3
648 Views
Last Modified: 2011-10-03
cmd =GetStoredProcCommand("PARAM_TWD.dbo.usp_GetDivisions")


C:\SourceControl_mcupryk\InHouseDev\APPS\MKT0003 - CustomerList\src\CustomerList\App_Code\BOL\Division.vb(260,0): error BC30456: 'GetStoredProcCommand' is not a member of 'CustomerList.DAL.DBAccess'.

Error      8      Name 'GetStoredProcCommand' is not declared.      C:\SourceControl_mcupryk\InHouseDev\APPS\MKT0003 - CustomerList\src\CustomerList\App_Code\BOL\Division.vb      260      23      http://localhost/CustomerList/


0
Comment
Question by:mathieu_cupryk
  • 2
3 Comments
 
LVL 142

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
Comment Utility
GetStoredProcCommand() is to be used like this:

Database db = DatabaseFactory.CreateDatabase();
cmd = db.GetStoredProcCommand("PARAM_TWD.dbo.usp_GetDivisions")
0
 

Author Comment

by:mathieu_cupryk
Comment Utility


Error      7      Expression is not a method.      C:\SourceControl_mcupryk\InHouseDev\APPS\MKT0003 - CustomerList\src\CustomerList\App_Code\BOL\Division.vb      261      17      http://localhost/CustomerList/


Error      9      Name 'db' is not declared.      C:\SourceControl_mcupryk\InHouseDev\APPS\MKT0003 - CustomerList\src\CustomerList\App_Code\BOL\Division.vb      262      23      http://localhost/CustomerList/


 Dim Database As DAL.DBAccess = New DAL.DBAccess
 'We get the divisions
                Database(db = DatabaseFactory.CreateDatabase())
                cmd = db.GetStoredProcCommand("PARAM_TWD.dbo.usp_GetDivisions")

                'Temporarilly put the results in a dataset so we can check for valid data
                tmpds = db.ExecuteDataSet(cmd)
         
0
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
Comment Utility
Glad I could help.
as you did not post which programming language you worked with, I wrongly assumed C# and not vb.net, although I should have seen that from the error message :-(
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now