Hi,You gave one syntax know,that is not working, Again I have some error...So,I discribed my problem here again ....
In that function I return one string value,I want to display the string value in another project by calling the dll of this.How can I display..?
Could you tell the code is correct or not for creating the db connection ?
publicstring FuncAuthentication(string txtusername)
{
string conn ="server=IDC-DEVELOPMENT ;uid=sa;pwd=password;database=SCBNotis";
string comm = "Select ADMINUSERID from ADMIN where ADMINUSERID='admin'";
SqlDataAdapter da =new SqlDataAdapter(comm,conn);
DataSet ds = new DataSet();
da.Fill(ds,"ADMIN");
DataTable dt = ds.Tables[0];
DataView dv;
dv = ds.Tables[0].DefaultView;
foreach(DataRow dr in dt.Rows)
{
txtusername=(dr [ "ADMINUSERID" ].ToString ( ));
}
return txtusername.ToString();
}