sqlStatement value

  • Thread starter Thread starter ReidarT
  • Start date Start date
R

ReidarT

I have an sql-statement
this.daKioskSelect.CommandText = "SELECT Count(KioskID) AS AntallKiosk FROM
Kiosk WHERE KioskID ='" + strKioskID + "'";
How do I get the AntallKiosk into a textbox on a webform?
Like I did with ADO
rs.AntallKiosk.value

regards
reidarT
 
hi

i dont know what your daKioskSelect is

if daKioskSelect is a dataadapter
DataSet ds=new DataSet ();
daKioskSelect.Fill(ds);
ds.Tables[0].Rows[0][0].ToString () will give the value

if daKioskSelect is an Sqlcommand
Int32 count = (int32) daKioskSelect .ExecuteScalar();

regards
Ansil
 
Back
Top