// 例如
Common.popUp({
Title: "....",
Message: "......."
.....
onOKClick: function() {
// handle onclick ok button event
},
onCancelClick: function() {
// handle onclick cancel button event
}
});
建置
想使用 SQL Server的全文檢索功能,先去[控制台][系統管理工具][服務]看以下兩項服務是否有啟動:
1. SQL Full-Text Filter Daemon Launcher(MSSQLSERVER):建立 fdhost.exe處理序的服務,這是主控處理全文檢索索引之文字資料的斷詞工具與篩選的必要項目。
2. SQL Server Agent(MSSQLSERVER):透過 SQL Server Agent作業的排程,啟動全文檢索-索引母體的擴展,累加資料表母體擴展。
如果沒有啟動第一項服務(SQL Full-Text...),直接進行 Select全文查詢,會出現錯誤訊息如下:
SQL Server在與全文篩選器的後台程序宿主(FDHOST)的進程通信時遇到錯誤0x80070218。
請確保 FDHOST進程正在運行。若要重新啟動FDHOST進程,請運行 sp_fulltext_service 'restart_all_fdhosts' 的命令或重新啟動 SQL Server實例。
參考網址:
http://blog.xuite.net/sugopili/computerblog/76684376-SQL+Server%E5%85%A8%E6%96%87%E6%AA%A2%E7%B4%A2%E5%B0%8F%E6%8A%80%E5%B7%A7
使用 & 設定
設定
看網址
使用
設定全文檢索並以建立索引後,就可以透過條件 WHERE CONTAINS(欄位,搜尋的字)的方式,
來做全文檢索的查詢方式,下面範例程式碼, 依序介紹平常使用Like及全文檢索下CONTAINS用法。
參考網址:
http://www.dotblogs.com.tw/dotjum/archive/2009/08/01/9796.aspx
參考網址:http://msdn.microsoft.com/zh-tw/library/ms229862(v=vs.100).aspx#findingthecorrectversion
Aspnet_regsql.exe 安裝在 Microsoft .NET Framework 目錄中。 如果電腦正在並存執行多個 .NET Framework 版本,就可能會安裝此工具的多個版本。 下表將針對不同的 .NET Framework 版本列出此工具的安裝位置。
.NET Framework 的版本 |
Aspnet_regsql.exe 檔案的位置 |
---|---|
.NET Framework 2.0 版、3.0 版和 3.5 版 (32 位元系統) |
%windir%\Microsoft.NET\Framework\v2.0.50727 |
.NET Framework 2.0 版、3.0 版和 3.5 版 (64 位元系統) |
%windir%\Microsoft.NET\Framework64\v2.0.50727 |
.NET Framework 4 版 (32 位元系統) |
%windir%\Microsoft.NET\Framework\v4.0.30319 |
.NET Framework 4 版 (64 位元系統) |
%windir%\Microsoft.NET\Framework64\v4.0.30319 |
Sub SendMail_godaddy(ByVal Subject As String, ByVal Body As String, ByVal FromMail As String, ByVal ToMail As String)
Dim objMail As New System.Web.Mail.MailMessage()
objMail.From = FromMail
objMail.To = ToMail
objMail.Subject = Subject
objMail.BodyFormat = Mail.MailFormat.Html
objMail.Priority = Mail.MailPriority.High
objMail.Body = Body
System.Web.Mail.SmtpMail.SmtpServer = UW.Mail.SMTP_SERVER_NAME
System.Web.Mail.SmtpMail.Send(objMail)
End Sub
Sub SendMail_gmail(ByVal Subject As String, ByVal Body As String, ByVal FromMail As String, ByVal ToMail As String)
Dim msg As New System.Net.Mail.MailMessage
Dim client As New System.Net.Mail.SmtpClient
Try
msg.Subject = Subject
msg.Body = Body
msg.From = New System.Net.Mail.MailAddress(FromMail)
msg.To.Add(ToMail)
msg.IsBodyHtml = True
client.Host = "smtp.gmail.com"
Dim basicauthenticationinfo As System.Net.NetworkCredential = New System.Net.NetworkCredential("username@gmail.com", "password")
client.Port = Int32.Parse("587")
client.EnableSsl = True
client.UseDefaultCredentials = False
client.Credentials = basicauthenticationinfo
client.DeliveryMethod = Net.Mail.SmtpDeliveryMethod.Network
client.Send(msg)
Catch ex As Exception
UW.WU.DebugWriteLine(ex.ToString, True, True)
End Try
End Sub
'更新
If UW.WU.IsNonEmptyFromQueryStringOrForm("Refresh") Then
System.Web.HttpContext.Current.Cache.Remove(CacheName)
End If
'快取部分
If obj Is Nothing Then
Dim SQL As String = ""
SQL = "select * from Product with (nolock)"
obj = UW.SQL.DTFromSQL(SQL)
Dim AC As New AggregateCacheDependency
Dim DepArray() As CacheDependency = { _
New SqlCacheDependency(UW.SQL.sqlCacheDependencyName, "Product"), _
New SqlCacheDependency(UW.SQL.sqlCacheDependencyName, "Product_Category") _
}
AC.Add(DepArray)
Dim FD As New CacheDependency(UW.Template.TemplateRoot & "2013UI\Product\DirectBuyAllProduct.html")
AC.Add(FD)
System.Web.HttpContext.Current.Cache.Insert(CacheName, obj, AC)
End If