x-frame-options 可防止嶔入有三種模式如下: · DENY Deny all attempts to frame the page · SAMEORIGIN The page can be framed by another page only if it belongs to the same origin as the page being framed · ALLOW-FROM origin Developers can specify a list of trusted origins in the origin attribute. Only pages on origin are permitted to load this page inside an iframe
.net的connector 錯誤訊息 Authentication with old password no longer supported, use 4.1 style passwords. MysqL Connector/NET 6.6.x (as of 6.6.2) dropped support for old password style authentication (it was deprecated due to being insecure and there were documented ways to attack it). .net的connector 已經拋棄了舊的密碼方式, 只支援新的密碼方式. 所以導致.net 新舊格式不一,所以連不上
distinct 用法 Dim dt As Data.DataTable = TableSource() Dim SColumn() As String = {"column1", "column2"} Dim dt2 As Data.DataTable = dt.DefaultView.ToTable( True , SColumn) dt2 結果為distinct 後的結果 DataTable複製數筆DataRow到另外一個DataTable Dim dt As Data.DataTable = TableSource() Dim dtRow() As Data.DataRow = dt.Select("ID=10" ) Dim dtTemp As Data.DataTable = dt.Clone() If dtRow.Length > 0 Then For j As Integer = 0 To dtRow.Length - 1 dtTemp.ImportRow(dtRow(j)) Next End If dtTemp結果為Select後的結果 這時候不可以使用 dtTemp.Rows.Add(dtRow(j)) 會出現"這個資料列已經屬於其他資料表"的錯誤
Unable to retrieve stored procedure metadata for routine 'BindSiteTree'. Either grant SELECT privilege to mysql.proc for this user or use "check parameters=false" with your connection string. 將連線字串加上check parameters=false,即可解決 應該有回傳的欄位值對應的錯誤。 應詳細找出!
使用Parameters 去做like的查詢 一直無法working 以下是錯誤示範 Using Cmd As New MySqlCommand Cmd.CommandText = "Select * From TableName Where Column like %?KeyWord%" Cmd.Parameters.Add(New MySqlParameter("?KeyWord", keyWord)) ...(略) End Using Using Cmd As New MySqlCommand Cmd.CommandText = "Select * From TableName Where Column like '%?KeyWord%'" Cmd.Parameters.Add(New MySqlParameter("?KeyWord", keyWord)) ...(略) End Using 試了好久,查了資料,以下這個寫法才能正常運作, 但我不知道是不是很好的答案 Using Cmd As New MySqlCommand Cmd.CommandText = "Select * From TableName Where Column like ?KeyWord" Cmd.Parameters.Add(New MySqlParameter("?KeyWord", "%" & keyWord & "%")) ...(略) End Using 如果有其他比較好的答案 煩請留言給我了 謝謝
"(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?" Public Shared Function RegURL(ByVal strParam As String) As Boolean Dim r As Regex = New Regex("(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?") Dim m As Match = r.Match(strParam) If m.Success And m.Length = Len(strParam) Then Return True Else Return False End If End Function