数据库表中有一项photoUrl,就是路径
SqlCommand cmd = new SqlCommand("selecet photoUrl from photo where photoID=" + id, con);
这样可以得到路径,我想用一个字符串保存路径,请问该怎么做,谢谢~
SqlCommand cmd = new SqlCommand("selecet photoUrl from photo where photoID=" + id, con);
这样可以得到路径,我想用一个字符串保存路径,请问该怎么做,谢谢~
SqlDataReader mydr=cmd.ExecuteReader();
string url=mydr["photoUrl"].Tostring();
mydr.Close();
con.Close();
this.conn.Open();
SqlCommand cmd = new SqlCommand();
cmd.Connection = this.conn;
cmd.CommandText = "select * from s_option where option_id=" + ID.ToString();
SqlDataAdapter sqlDA = new SqlDataAdapter(cmd);
sqlDA.Fill(ds);
this.conn.Close();
return ds.Tables[0];