Re: [ASP ] 應用程式中發生伺服器錯誤
回版大「connectionstring中的帳號等於 sql_server中的嗎」
去重新設定sql server裡的test資料庫
test資料庫的使用者,除了dbo,另一個就是rain
在新增連接的時候,登入id、password時都沒錯,也順利連線
但不知為啥~執行的結果仍是「rain的登入失敗」
看了ConnectionString,少了password的部份
自己補上password,執行後的結果變成
---------------------------------------------------------------------------
例外詳細資訊:
System.Data.SqlClient.SqlException: 行 1: 'value' 附近的語法不正確。
原始程式錯誤:
行 62:
SqlCommand1.CommandText = "insert into test(class,test_time,title,
summary,article,author)value('" & class_text & "',getdate(),'" &
txt1.\
Text &
"','" & txt2.Text & "','" & txt3.Text & "','" & txt4.Text & "')"
行 63:
行 64:
SqlCommand1.ExecuteNonQuery()
行 65:
行 66:
Response.Write("SQL指令---" & SqlCommand1.CommandText & "<hr>")
---------------------------------------------------------------------------
真不好意思~麻煩版大了
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 203.73.237.109
推
06/04 13:10, , 1F
06/04 13:10, 1F
推
06/04 13:49, , 2F
06/04 13:49, 2F
→
06/04 14:45, , 3F
06/04 14:45, 3F
推
06/04 14:48, , 4F
06/04 14:48, 4F
推
06/04 15:00, , 5F
06/04 15:00, 5F
→
06/04 15:09, , 6F
06/04 15:09, 6F
→
06/04 15:09, , 7F
06/04 15:09, 7F
討論串 (同標題文章)
完整討論串 (本文為第 2 之 2 篇):
Visual_Basic 近期熱門文章
PTT數位生活區 即時熱門文章