<%@ LANGUAGE = VBScript CodePage = 936%>
<%

'=========================================ʼݿÿʼ=============================================
Response.Buffer = True
Session.LCID = 2052 '## йLCID

Dim SqlNowString
Dim Conn,Db,MyDbPath
'޸һ======================ݿ1ΪSQLݿ⣬0ΪAccessݿ===========================
Const IsSqlDataBase = 0
MyDbPath = "/"


If IsSqlDataBase = 1 Then

'޸ö=====================================SQLݿ============================================

'sqlݿӲݿ(SqlDatabaseName)û(SqlPassword)û(SqlUsername)

'(SqlLocalName)localIP

	Const SqlDatabaseName = ""
	Const SqlPassword = ""
	Const SqlUsername = ""
	Const SqlLocalName = "(local)"
'============================================================================================================
	SqlNowString = "GetDate()"
	Sqlwildcard="%"
Else
'޸========================Accessݿ======================================================

	Db = "data.mdb"

'============================================================================================================

	SqlNowString = "Now()"
	Sqlwildcard="%"

End If
Const IsDeBug = 1

Sub ConnectionDatabase
	Dim ConnStr
	If IsSqlDataBase = 1 Then
		ConnStr = "Provider = Sqloledb; User ID = " & SqlUsername & "; Password = " & SqlPassword & "; Initial Catalog = " & SqlDatabaseName & "; Data Source = " & SqlLocalName & ";"
	Else
		ConnStr = "Provider = Microsoft.Jet.OLEDB.4.0;Data Source = " & Server.MapPath(MyDbPath & db)
	End If
	On Error Resume Next
	Set conn =CreateObject("ADODB.Connection")
	conn.open ConnStr
	If Err Then
		err.Clear
		Set Conn = Nothing
		Response.Write "[err]ݿӳִ[/err]" 'ʧϢ
		Response.End
	End If
End Sub
Sub CloseDatabase

	On Error Resume Next
	If IsObject(Conn) Then
		Conn.Close
	end if
	Set Conn = Nothing

End Sub
'========================================ʼݿý==============================================

'======================================================================

DIM title 

'========================================ETͨPOSTʽݲ==============================================
title=REQUEST.Form("title")

'==========================================Уʼ================================================
'
'ҪԻȡĲݽеĸУ
'
'==========================================У================================================


'========================================ݿвѯǷظ==========================================
ConnectionDatabase

On Error Resume Next
DIM rs,str
str="select count(*) as total from yourtable where title='"&title&"'"
rs=conn.execute(str)  
if rs("total")>0 then  
	Response.Write "[yes]" '=========================[yes]ظ־============================
else  
 
	response.Write "[no]"  '=========================[no]ǲظ־===========================
end if
rs.close
set rs=nothing
CloseDatabase


%>