K Kevin Spencer Aug 9, 2004 #2 System.Data.SqlClient NameSpace. -- HTH, Kevin Spencer ..Net Developer Microsoft MVP Big things are made up of lots of little things.
System.Data.SqlClient NameSpace. -- HTH, Kevin Spencer ..Net Developer Microsoft MVP Big things are made up of lots of little things.
M Mark Aug 9, 2004 #3 //This code inserts, updates or deletes a record(s) in a table using a stored procedure with a single parameter. //It would need to be modified for a Select statement that retrieved records. SqlConnection sqlConn = new SqlConnection("your connection string goes here"); sqlConn.Open(); SqlCommand sqlComm = new SqlCommand("Your_stored_procedure_name", sqlConn); SqlParameter prm1 = new SqlParameter("@my_prm",varchar,10); prm1.value = "neat"; sqlComm.Parameters.Add(prm1); sqlComm.CommandType = CommandType.StoredProcedure; Int32 intNumberOfRecordsAffected = sqlComm.ExecuteNonQuery(); sqlConn.Close(); Hope this helps. Mark www.dovetaildatabases.com
//This code inserts, updates or deletes a record(s) in a table using a stored procedure with a single parameter. //It would need to be modified for a Select statement that retrieved records. SqlConnection sqlConn = new SqlConnection("your connection string goes here"); sqlConn.Open(); SqlCommand sqlComm = new SqlCommand("Your_stored_procedure_name", sqlConn); SqlParameter prm1 = new SqlParameter("@my_prm",varchar,10); prm1.value = "neat"; sqlComm.Parameters.Add(prm1); sqlComm.CommandType = CommandType.StoredProcedure; Int32 intNumberOfRecordsAffected = sqlComm.ExecuteNonQuery(); sqlConn.Close(); Hope this helps. Mark www.dovetaildatabases.com
D David Lozzi Aug 9, 2004 #4 Could I have a little more information? Like an example or a MS reference?
D David Lozzi Aug 9, 2004 #6 If i put System.Data.SqlClient. infront of it, it works fine. How can I 'declare' this for the entire doc?
If i put System.Data.SqlClient. infront of it, it works fine. How can I 'declare' this for the entire doc?
M Mark Aug 9, 2004 #7 Assuming we're talking C# here, you can include the following line at the top of your code-behind: using System.Data; using System.Data.SqlClient; mark www.dovetaildatabases.com
Assuming we're talking C# here, you can include the following line at the top of your code-behind: using System.Data; using System.Data.SqlClient; mark www.dovetaildatabases.com
K Kevin Spencer Aug 9, 2004 #8 Here is a link to the freely-downloadable and complete Microsoft .Net SDK, which has plenty of references, articles, tutorials, and samples: http://www.microsoft.com/downloads/...A6-3647-4070-9F41-A333C6B9181D&displaylang=en That's the best I can give you without a more detailed request. -- HTH, Kevin Spencer ..Net Developer Microsoft MVP Big things are made up of lots of little things.
Here is a link to the freely-downloadable and complete Microsoft .Net SDK, which has plenty of references, articles, tutorials, and samples: http://www.microsoft.com/downloads/...A6-3647-4070-9F41-A333C6B9181D&displaylang=en That's the best I can give you without a more detailed request. -- HTH, Kevin Spencer ..Net Developer Microsoft MVP Big things are made up of lots of little things.