SQLDataadapter and Stored Procedures


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: SQLDataadapter and Stored Procedures

  1. #1
    Join Date
    Oct 2005
    Posts
    14

    SQLDataadapter and Stored Procedures

    I want to configure an sqldataadapter to use an existing stored procedure. The problem is that this stored procedure needs input parameters for the sql. How can I pass the necessary paramaters into the stored procedure before filling the dataset?

  2. #2
    Join Date
    Nov 2005
    Location
    Jaipur
    Posts
    14

    Talking Re:SQLDataadapter and Stored Procedures

    SqlDataAdapter adapter = new SqlDataAdapter("GetProductDesc",
    conn);
    adapter.SelectCommand.CommandType = CommandType.StoredProcedure;
    SqlParameter parm = adapter.SelectCommand.Parameters.Add(
    "@ProdID", SqlDbType.Int);
    parm.Value = 10;


    for more info read:
    http://msdn.microsoft.com/library/de...netchapt12.asp
    thanks
    raj

Similar Threads

  1. Replies: 4
    Last Post: 12-12-2005, 11:47 AM
  2. Replies: 0
    Last Post: 09-04-2002, 02:10 PM
  3. Replies: 1
    Last Post: 08-05-2002, 02:39 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center