1.
Some of the automated biochemical queries
Query statements can be customized
2. Custom query Procedure Calls
Use [Mydb]go/*** * * * object:storedprocedure [dbo]. [Proclogin] Script date:08/14/2017 19:18:31 * * * * **/SET ansi_nulls ongoset quoted_identifier Ongo--=============================================--Author: <author,,name>--Create Date: <create Date,,> ;--Description: <description,,>--=============================================ALTER PROCEDURE [dbo]. [Proclogin] @userName varchar (50), @password varchar (50) Asbegin--SET NOCOUNT on added to prevent extra result sets from--interfering with SELECT statements. SET NOCOUNT on; --Insert statements forprocedure here SELECT* FROM [user] WHERE user_name = @userName and password =@passwordEND
Call
Sqlconneteion conn = new SqlConnection ("Database Information"); SqlCommand command = new SqlCommand ("Stored Procedure name", conn) command. CommandType = CommandType.StoreProcedure.command.Parameter is. ADD (New SqlParameter ("@userName", UserName)); Sqlreader dr = Command.ExecuteReader ()
One line read read not to return false
Get the value of the place parameter
SqlParameter count = new SqlParameter ("@count", 0);
Count. Direction = System.Data.ParameterDirection.Output;
Command. Parameters.Add (count);
int a= count.value ();
. NET Operational Database