Calling a Stored Procedure

Results 1 to 2 of 2

Thread: Calling a Stored Procedure

  1. #1
    Join Date
    Dec 1969

    Default Calling a Stored Procedure

    I have a SQL DB called "Portal" with a Stored Procedure called "AllowAcess".<BR><BR>It accepts a parameter ("CM01" for example) and based on information in the database returns a "1" or a "0".<BR><BR>I want to call this stored procedure during my page load event and then build the page differently based on the result.<BR><BR>I am embarrassed to say that I am having no luck calling the stored procedure.<BR><BR>I keep thinking this should be fairly simple but I am having no luck.<BR><BR>Thanks in advance,<BR><BR>Chris

  2. #2
    Join Date
    Dec 1969

    Default Ummm Chris...

    I&#039;m afraid that you&#039;ll have to show some of your code on this one! The web is *littered* with examples of how to return a single value from a sproc... where are you going wrong?<BR><BR>Check out the documentation for the Command.ExecuteScalar() method.<BR><BR>As for building the page *differently* my only answer there is that it depends on what you mean by differently. The answer could range from loading a different UserControl to displaying a different Panel.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts