yinxing.!!-不斷學習...

          老老實實做人,認認真真做事..走自己的路,讓別人打的去吧.~

            BlogJava :: 首頁 :: 聯系 :: 聚合  :: 管理
            5 Posts :: 5 Stories :: 2 Comments :: 0 Trackbacks
          string Conn="server=.;database=Test;Integrated Security=SSPI";
          ???SqlConnection con=new SqlConnection(Conn);
          ???con.Open();
          ???this.Label1.Text=con.State.ToString();
          ???con.Close();
          ------------------------------------------------------------------------------------------------------
          下面這段代碼是返回特定的ID號的:)
          string Conn="server=.;database=Test;Integrated Security=SSPI";
          ???SqlConnection con=new SqlConnection(Conn);
          ???con.Open();
          ???SqlCommand cmd=new SqlCommand("select UserID from Test where UserName='yinxing'",con);
          ???int d=(int)cmd.ExecuteScalar();
          ???this.Label1.Text="yinxing 的ID號是:"+d.ToString();
          ???con.Close();
          posted on 2006-11-13 16:51 yinxing 閱讀(180) 評論(0)  編輯  收藏

          只有注冊用戶登錄后才能發表評論。


          網站導航:
           
          主站蜘蛛池模板: 罗源县| 长葛市| 贵港市| 广丰县| 陆河县| 萝北县| 屯昌县| 兰溪市| 马龙县| 宁晋县| 正定县| 河东区| 五大连池市| 石景山区| 乌兰察布市| 荔浦县| 贵州省| 南宫市| 朝阳市| 任丘市| 甘南县| 洛浦县| 内江市| 万载县| 都安| 东方市| 武乡县| 寻甸| 濮阳市| 陇西县| 荆州市| 新源县| 平罗县| 仙居县| 英德市| 曲水县| 鄂托克旗| 房产| 吉林市| 分宜县| 舞阳县|