aapp56
13 years ago
看不懂ASP.NET for C#啦~~
latest #37
掰噗~
13 years ago
有這種事!?
EvanLater
13 years ago
不是就一些物件這樣?
aapp56
13 years ago
習慣PHP再看它 根本沒頭緒
立即下載
EvanLater
13 years ago
這轉變倒是蠻大的 (誤
EvanLater
13 years ago
所以你可以嘗試把PHP寫成跟asp.net一樣是物件的方法 XD
aapp56
13 years ago
資料庫那塊 VB6 可以用 ADODB.Connect ...等物件去連線 突然看C# 要昏了
EvanLater
13 years ago
不是換的東西而已嗎 = ="
aapp56
13 years ago
沒碰過 突然叫我寫出來我需要學習 (LOL)
EvanLater
13 years ago
Google大神 XD
aapp56
13 years ago
只是網站上的文章多半以VB.NET為主
EvanLater
13 years ago
同是.net架構改變並不多喔
page
13 years ago
~"~
aapp56
13 years ago
你會嗎 教我
EvanLater
13 years ago
=口= 我都是直接寫CODE 不拉物件的 你確定嗎 XD
aapp56
13 years ago
其實我在想 你寫CODE可能我更容易看懂 物件我真ㄉ看吳
aapp56
13 years ago
其實你只要給我看如何從MDF資料庫檔查詢(SELECT) 多筆資料我就懂了
EvanLater
13 years ago
SqlConnection cnn; public static String connStr ="Data Source=140.133.64.201;Initial Catalog=DBNAME;User ID=sa;Password=sapb1" ;
EvanLater
13 years ago
cnn = new SqlConnection(Global.connStr);\
EvanLater
13 years ago
cnn.Open();
EvanLater
13 years ago
SqlCommand cmd = new SqlCommand(); cmd.CommandText = "insert into."; cmd.Connection = Global.cnn;
EvanLater
13 years ago
cmd.ExecuteNonQuery(); Global.cnn.Close();
EvanLater
13 years ago
有回傳的要寫成 sdr = cmd.ExecuteReader(); while (sdr.Read())
EvanLater
13 years ago
{xxxx.getString(1);等 }
aapp56
13 years ago
感謝你 我看懂了~~~ sdr.Read() 旗時就很像mysql_fetch_assoc這個函數
EvanLater
13 years ago
YES
EvanLater
13 years ago
不過裡面請注意型態 不然隨時會爆炸
EvanLater
13 years ago
根據型態有相關函數 sdr.getString(x)
EvanLater
13 years ago
sdr.getInt32(x)
EvanLater
13 years ago
x = 哪個欄位
EvanLater
13 years ago
比較像 fetch_row
aapp56
13 years ago
讀取欄位值是用
aapp56
13 years ago
恩恩
aapp56
13 years ago
你不是高雄人?? 怎跑去台北/
EvanLater
13 years ago
work \
aapp56
13 years ago
好啦 早點睡啦~~感謝妳啦 解決我得疑惑
EvanLater
13 years ago
p
EvanLater
13 years ago
恩 OK
back to top