Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4624790
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T03:10:45+00:00 2026-05-22T03:10:45+00:00

This is the function which i wrote in DataAccess Layer, I am using WCF

  • 0

This is the function which i wrote in DataAccess Layer, I am using WCF concepts also..
here i’ve to insert some values into RequisitionTable and i’ve to pass that Id returned from that table into another table..

In database table i specified RequisitionID column as primarykey and auto increment by 1.
in storedProcedure i declared RequisitionID as @RequisitionID int OUT

public RequisitionDTO createRequisition(RequisitionDTO requisitionDTO)
{

Logging.logDebug("RequisitionDA: createRequisition initiated");
DataTable requisitionDataTable = new DataTable();
try
{
  Database dataBase = CommonDB.getApplicationDatabase();
  //Insert and Store Id into variable 'i'  
  int i= dataBase.ExecuteNonQuery("SP_requisitionInsert",
     requisitionDTO.FirstName, requisitionDTO.MiddleName,    
     requisitionDTO.LastName,requisitionDTO.Address);
  int RequisitionID = Convert.ToInt16(i);

}
catch(exception e)
{
  //
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T03:10:46+00:00Added an answer on May 22, 2026 at 3:10 am

    I’m guessing this is the Enterprise Library Data Access Application Block.

    I can’t find Database.ExecuteNonQuery documentation online, but from my offline help:

    Executes the storedProcedureName using the given parameterValues and returns the number of rows affected

    (Italics in original, bold added by me)

    I think you need to use one of the other overloads where you explicitly provide a command object, to which you’ve attached explicit parameter objects, including a parameter @RequisitionID set to output.

    That’s assuming your SP is correctly assigning SCOPE_IDENTITY() to this parameter before returning, as others have suggested.


    I’ve also found an article entitled Executing a Command and Accessing Output Parameters, which was written as part of the online docs for Enterprise Library, but you’ll notice that unlike other parts of MSDN, it doesn’t link to documentation for the individual methods, nor is there a “reference” part of the Enterprise Library – it’s almost like they don’t want people to find their documentation.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is a Windows Forms application. I have a function which captures some mouse
I have this function: RegisterGlobalHotKey(Keys.F6, MOD_SHIFT | MOD_CONTROL); which call an API to register
Say I've got this array: MyArray(0)=aaa MyArray(1)=bbb MyArray(2)=aaa Is there a .net function which
I have this jQuery which works fine $(li[id^='shop_id']).click( function () { alert(I clicked on
I'm trying to do this (which produces an unexpected T_VARIABLE error): public function createShipment($startZip,
I have a bash script file which starts with a function definition, like this:
This function appears to be a way to access all sorts of system values.
I've got a Jquery function that I wrote which blacks out the screen after
i have been working on a small demo and i wrote a function which
i wrote a nice plugin which transforms IMG to canvas jQuery.fn.img2canvas = function() {

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.