c# Connection
c# Connection
net to sql
server------------------------------------------------
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Security;
using System.Text;
using System.Threading.Tasks;
using Microsoft.VisualBasic;
using System.Data.SqlClient;
using System.Data;
using System.Data.Odbc;
using System.Net.Mail;
string sInsQuery;
string sInsQueryMySQL;
if (myConn.State == ConnectionState.Closed)
myConn.Open();
sInsQuery = "USP_Sample";
int i, j;
Array[] RefNo = new Array[2001];
i = 0;
using (SqlDataReader myReader = MyCmd.ExecuteReader())
{
while ((myReader.Read()))
{
// RefNo(i) = myReader(0)
Response.Write(myReader(i));
i = i + 1;
}
}
MyCmd.Dispose();
myConn.Close();
myConn.Dispose();
}
}
-------------------------sp------------
Alter proc usp_sample
As
Begin
Select 'Suresh Testing' As Output
End
DESKTOP-LD5FTH3\sqlexpress
anjaliux
anjalius