Solved

GetStoredProcCommand not declared

Posted on 2007-03-27
3
658 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
ID: 18802249
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
ID: 18802420


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]
ID: 18802687
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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

770 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