Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

user login via web services

$
0
0

I am new to the web services and  i want to get records from database SQL Server, against SELECT * from Detailed WHERE Email ='" + Email + "' and Password='" + Password + "' "

Here is my code but when i debug my webservices it gives me error i Have wasted lot of time on it but i didn't get any idea how to sort out this problem

 [WebMethod]
    public DataSet getUserProfile(string Email, string Password)
    {

        SqlConnection NewCon;
        NewCon = Class1.GetConnection();
        NewCon.Open();
        SqlCommand cmd = new SqlCommand("SELECT * from Detailed WHERE Email ='" + Email + "' and Password='" + Password + "' ", NewCon);
        SqlDataAdapter da = new SqlDataAdapter(cmd);
        //            SqlDataReader dr= new  SqlDataReader();
        DataSet ds = new DataSet();
        da.Fill(ds);
        NewCon.Close();
        return ds;
    } 


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>