Click here to Skip to main content
15,884,598 members
Articles / Programming Languages / JScript .NET

Stored Procedure Invocation Code Generator for VB, C# and JScript.NET

Rate me:
Please Sign up or sign in to vote.
4.92/5 (24 votes)
14 Jun 20038 min read 387K   3.4K   133  
Stored Procedure Invocation Code Generator for VB, C# and JScript.NET
using System;
using System.Data.SqlClient;

namespace SPInvoke
{
	/// <summary>
	/// Summary description for Class1.
	/// </summary>
	class Class1
	{
		/// <summary>
		/// The main entry point for the application.
		/// </summary>
		[STAThread]
		static void Main(string[] args)
		{
			string connString = "Data source=localhost;Initial catalog=Northwind;Integrated Security=true";
			
			using (SqlConnection conn = new SqlConnection(connString))
			{
				conn.Open();

				GetCustomerOrderHistory.Result result = GetCustomerOrderHistory.Invoke(conn, "PERIC");

				foreach(Order order in result.Rows)
					Console.WriteLine(order.ProductName.Value + " : " + order.Total.Value);
			}
		}
	}
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Switzerland Switzerland
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions