Solved

GetStoredProcCommand not declared

Posted on 2007-03-27
3
668 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 143

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 143

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
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 combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

617 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