討論串[問題] 請較各位大大這段程式碼有什麼問題
共 5 篇文章
首頁
上一頁
1
下一頁
尾頁

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者wooddstockk (QQ)時間18年前 (2008/05/22 23:53), 編輯資訊
0
0
0
內容預覽:
SqlConnection myConnection;. string connStr;. connStr = "Server=localhost;database=prawn;uid=123;pwd=456";. myConnection = new SqlConnection(connStr);
(還有133個字)

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者regionbbs (小朱)時間18年前 (2008/05/21 12:53), 編輯資訊
0
0
0
內容預覽:
有一種東西叫做 try/cacth:. try. {. // your code. }. catch (Exception ex). {. // show your error message from ex.Message. // or, handle this error if you want

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者james732 (紫雁)時間18年前 (2008/05/21 11:28), 編輯資訊
0
0
0
內容預覽:
有一個可能性. 你的資料表所設定的是數值形態(int或double). 但是 labelLongitude.Text 是一個 string. 因此 INSERT 會失敗. 如果是 int 的話,可以用 Values(int.Parse(labelLongitude.Text)....). 如果是 d

推噓4(4推 0噓 5→)留言9則,0人參與, 最新作者lemarulie (另一個我)時間18年前 (2008/05/21 00:33), 編輯資訊
0
0
0
內容預覽:
小弟在每一行debug後發現問題應該在於這行. myCommand = new SqlCommand("Insert Into mytest(ll,mm). Values(labelLongitude.Text,labelAltitude.Text)");. ^^^^^^^^^^^^^^^^^^^^
(還有208個字)

推噓2(2推 0噓 5→)留言7則,0人參與, 最新作者lemarulie (另一個我)時間18年前 (2008/05/20 23:39), 編輯資訊
0
0
0
內容預覽:
程式碼如下. SqlConnection myConnection;. string connStr;. connStr = "Server=localhost ;database=prawn ;uid=123. ;pwd=456 ";. myConnection = new SqlConnecti
(還有350個字)
首頁
上一頁
1
下一頁
尾頁