| Author: DotnetSachin 29 May 2007 | Member Level: Gold | Rating: Points: 2 |
Dear Samul,
Pls use the following code in VB.NET:
cnDatabase = New SqlConnection(strConnectionString)
cnDatabase.Open()
Dim cmdQuery As SqlCommand = New SqlCommand(spName, cnDatabase) cmdQuery.CommandType = CommandType.StoredProcedure
Dim prmQuery As SqlParameter = cmdQuery.Parameters.Add(pName, pDataType) prmQuery.Value = pValue cmdQuery.ExecuteNonQuery() cnMRPDatabase.Close()
in SQL Server, you create the store procedure you want and pass its name, parameters and values of those parameters in the above code.
Regards, Sachin
|