Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

GetStoredProcCommand not declared

Posted on 2007-03-27
3
Medium Priority
?
672 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 2000 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

Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

Question has a verified solution.

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

The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

670 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