亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? rdbms-asp2.asp

?? RDBMS with flash and asp
?? ASP
字號:
<%@ Language=VBScript %>
<!--#include file="adovbs.inc" -->
<%

Private Function IDExists(Table,KeyField, KeyID)
	'Check to see if id field exists 
	'Would only need to be called for Microsoft Access - see comment below in each nodetype processor
	rs1.Open "select " & KeyField & " from " & Table & " where " & Keyfield & "=" & KeyID,cnn
	If rs1.RecordCount = 0 Then
		IDExists = False
	else
		IDExists = True
	End If
	If rs1.State = adStateOpen Then rs1.Close
End Function
	'Distributed configured for Microsoft Access
	CONST DBRETURNSERROR = False	' For Microsoft Access and others that do not return an error through
									'  ADO when an update or delete is called for a key value that doesn't exist.
'	CONST DBRETURNSERROR = True		' For Microsoft SQL Server and others that do return the above error.
	CONST DBRETURNSIDENTITY = False	' For Microsoft Access and others that can't return an identity field
									'  for a newly inserted record with an identity (or autonumber) field.
'	CONST DBRETURNSIDENTITY = True 	' For Microsoft SQL Server and others that return an identity during
									' an Insert, when asked nicely.

	'SETUP DB CONNECTION - General stuff.
	
	Set cnn = Server.CreateObject("ADODB.Connection")
	Set rs1 = Server.CreateObject("ADODB.RecordSet")
	cnn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("rdbms-asp2.mdb") & ";"
   	cnn.CursorLocation = adUseClient
    rs1.CursorLocation = adUseClient
    rs1.CacheSize = 500
    rs1.CursorType = adOpenStatic
    rs1.MaxRecords = 30000
    rs1.PageSize = 25

	'INPUT SECTION
		'Requires the incoming request to be a POST XML
		'Document with 2 nodes inside the documentElement:
		'<request>
		'	<func>SaveContacts</func>
		'	<update_packet id="xxxxxx">
		'		your update packet here........
		'	</update_packet>
		'</request>
		if Request("test")="1" then
			XMLRequest = false
			func = Request("func")
		else
			XMLRequest = true
			Set docReceived = CreateObject("MSXML2.DOMDocument") 
			docReceived.async = False 
			docReceived.load Request 
			Set RequestRoot = docReceived.documentElement
			func =	RequestRoot.getElementsByTagName("func")(0).text
		end if

	'Setup XML Response 
		'The response is an XML Document "results_packet" that is bound directly back from the connector
		'"results" property to the Resolver "updateResults" property. As long as the deltaPacket is bound
		'"in/out" from the dataSet to the resolver, it will be passed directly back to the dataSet and any 
		'inserted records will be updated with their new id value and other operations will be confirmed.
		dim ResultsPacket,dqt,dtd,ResultsPacketElement
		dqt = chr(34)
		Set ResultsPacket = Server.Createobject("MSXML.DOMDocument")
		Set dtd = ResultsPacket.createProcessingInstruction("xml", "version=" & dqt & "1.0" & dqt )
		ResultsPacket.appendChild dtd
		Set ResultsPacketElement = ResultsPacket.createElement("results_packet")
		ResultsPacket.appendChild ResultsPacketElement

	'PROCESSING SECTION
	select case func
	case "GetContacts":
		rs1.Open "select * from Contacts order by name",cnn
		  Do Until rs1.EOF
			set recElement = ResultsPacket.createElement("rec")
			for i = 0 to rs1.Fields.Count - 1
			  recElement.setAttribute rs1(i).name, rs1(i).value
			  ResultsPacket.lastChild.appendChild recElement
			next
			rs1.MoveNext
		  Loop
		  rs1.close
	case "SaveContacts"
			'GET UPDATEPACKET FROM REQUEST XML
			'assign the updatePacket text to it's own XML Document For processing.
			Set UpdatePacket = CreateObject("MSXML2.DOMDocument") 
			UpdatePacket.async = False 
			UpdatePacket.loadXML RequestRoot.getElementsByTagName("updatePacket")(0).text
			Set UP = UpdatePacket.documentElement

			'PROCESS UPDATEPACKET
			'Get appropriate data out of document node (transID,NullValue)
			Table = UP.getAttribute("tableName")
			NullValue = UP.getAttribute("nullValue")
			'Set TransID in root of our resultsPacket - must match updatePacket so DS will process properly.
			ResultsPacketElement.SetAttribute "transID",UP.getAttribute("transID")
			SQLs = ""
			
			'PROCESS ALL "UPDATE" NODES
			Set UpdateNodes = UP.getElementsByTagName("update")
			For Each UpdateNode In UpdateNodes
				'CREATE OPERATION RESULT NODE
					Set OpElement = ResultsPacket.createElement("operation")
					OpElement.SetAttribute "op","update"
					OpElement.SetAttribute "id",UpdateNode.getAttribute("id")

				Set UpdateFields = UpdateNode.getElementsByTagName("field")
				'Must iterate through fields once to get the key id -
				' No guarantee what order fields are in (key field not always the first one)
				For each UpdateField in UpdateFields
					If UpdateField.getAttribute("key") = "true" Then
						KeyField = UpdateField.getAttribute("name")
						KeyID = UpdateField.getAttribute("oldValue")
						Exit For
					End If
				Next
				
				'Check to see if id field exists, abort ADO call if it doesn't
				Dim SendCall
				If DBRETURNSERROR then
					SendCall = True
				Else
					If IDExists(Table,KeyField,KeyID) Then 
						SendCall = True
					Else
						OpElement.setAttribute "msg",KeyField & " " & KeyID & " does not exist"
						SendCall = False
					End If
				End If
				
				'Second time through For all non-key fields (fields to be updated)
				If SendCall then
					For each UpdateField in UpdateFields
						If UpdateField.getAttribute("key") = "false" Then
							fieldname = UpdateField.getAttribute("name")
							fieldtype = UpdateField.getAttribute("type")
							newfieldvalue = UpdateField.getAttribute("newValue")
							If fieldtype <> "Integer" and fieldtype <> "Number" Then
								newfieldvalue = "'" & newfieldvalue & "'"
							End If
							sql = "update " & Table & " Set " & fieldname & "=" & newfieldvalue & " where " & KeyField & "=" & KeyID
							On Error Resume Next
							cnn.Execute sql
							If cnn.Errors.Count > 0  Then
								OpElement.SetAttribute "msg",cnn.Errors(0).Description & "/" & sql
								cnn.Errors.Clear
							End If
							On Error Goto 0
						End If
					Next
				End If
	
				'Add Result Element to ResultsPacket
					ResultsPacket.lastChild.appendChild OpElement
			Next

			'PROCESS ALL "DELETE" NODES
			Set DeleteNodes = UP.getElementsByTagName("delete")
			For Each DeleteNode In DeleteNodes
				'CREATE OPERATION RESULT NODE
					Set OpElement = ResultsPacket.createElement("operation")
					OpElement.SetAttribute "op","delete"
					OpElement.SetAttribute "id",DeleteNode.getAttribute("id")

				'FIND KEY FIELD SO WE CAN BUILD SQL STMT
				Set DeleteFields = DeleteNode.getElementsByTagName("field")
				For each DeleteField in DeleteFields
					If DeleteField.getAttribute("key") = "true" Then
						KeyField = DeleteField.getAttribute("name")
						KeyID = DeleteField.getAttribute("oldValue")
						Exit For
					End If
				Next
				
				'Microsoft Access doesn't report an error when a delete is called for a keyvalue that 
				'doesn't exist, but since it's already gone from our Flash dataset, we'll just let it
				'think that it worked. Other types of errors will still be reported, and dbs that do return
				'errors are handled fine.
				
				'Delete from DB
					sql = "delete from " & Table & " where " & KeyField & "=" & KeyID
					On Error Resume Next
					cnn.Execute sql
					If cnn.Errors.Count > 0 Then
						OpElement.SetAttribute "msg",cnn.Errors(0).Description & "/" & sql
						cnn.Errors.Clear
					End If
					On Error Goto 0

				'Add Result Element to ResultsPacket
					ResultsPacket.lastChild.appendChild OpElement
			Next

			'PROCESS ALL "INSERT" NODES
			Set InsertNodes = UP.getElementsByTagName("insert")
			For Each InsertNode In InsertNodes
				'CREATE OPERATION RESULT NODE
					Set OpElement = ResultsPacket.createElement("operation")
					OpElement.SetAttribute "op","insert"
					OpElement.SetAttribute "id",InsertNode.getAttribute("id")

				'Gather fields to build SQL stmt
				Set InsertFields = InsertNode.getElementsByTagName("field")
				FieldsStr = ""
				ValuesStr = ""
				For each InsertField in InsertFields
					fieldname = InsertField.getAttribute("name")
					fieldtype = InsertField.getAttribute("type")
					If InsertField.getAttribute("key") = "false" Then
						'NON-KEY FIELD, INCLUDE IN INSERT STMT
						newfieldvalue = InsertField.getAttribute("newValue")
						If fieldtype = "Integer" or fieldtype = "Number" Then
							ValStr = newfieldvalue
						Else
							ValStr = "'" & newfieldvalue & "'"
						End If
						If len(ValuesStr) > 0 Then
							ValuesStr = ValuesStr & "," & ValStr
						Else
							ValuesStr = ValStr
						End If
						If len(FieldsStr) > 0 Then
							FieldsStr = FieldsStr & "," & InsertField.getAttribute("name")
						Else
							FieldsStr = InsertField.getAttribute("name")
						End If
					Else
						'KEY FIELD
						KeyField = fieldname
					End If
				Next

				'INSERT TO DB
					Identity = ""
					If DBRETURNSIDENTITY Then
						On Error Resume Next
						rs1.Open sql,cnn
						If cnn.Errors.Count > 0 Then
							OpElement.SetAttribute "msg",cnn.Errors(0).Description & "/" & sql
							cnn.Errors.Clear
						End If
						If rs1.State = adStateOpen Then
							rs1.Close
						End If
					Else
						'These statements will work with Micorsoft Access - unFortunately, you can't return the identity value
						'so you have to do a quick select statement - could cause data collisions in multi-user environment
						sql = "insert into " & Table & " (" & FieldsStr & ") values(" & ValuesStr & ")"
						On Error Resume Next
						cnn.Execute sql
						If cnn.Errors.Count > 0 Then
							OpElement.SetAttribute "msg",cnn.Errors(0).Description & "/" & sql
							cnn.Errors.Clear
						Else
						End If
					End If
					
					On Error Goto 0

				'IDENTIFY NEW KEY VALUE FOR THIS NEW RECORD
					If Not DBRETURNSIDENTITY Then
						'FOR ACCESS, GET LAST KEYFIELD IN DB - NOT GOOD FOR MULTIUSER ENVIRONMENT, ALL WE CAN DO FOR NOW
							rs1.open "select top 1 " & KeyField & " from " & Table & " order by " & KeyField & " desc",cnn
							Identity = rs1(KeyField)
							rs1.close
					End If

					If Len(Identity) > 0 Then
						'PUT IDENTITY IN FIELD NODE
						Set IDElement = ResultsPacket.createElement("field")
						IDElement.SetAttribute "name",KeyField
						IDElement.SetAttribute "curValue",Identity
						OpElement.appendChild IDElement
					End If

				'Add Result Element to ResultsPacket
					ResultsPacket.lastChild.appendChild OpElement
			Next
	End select

	response.write ResultsPacket.xml

	'CLEANUP DATABASE CONNECTION	
	cnn.close
	Set rs1 = nothing
	Set cnn = nothing
%>

	

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美视频中文一区二区三区在线观看| gogogo免费视频观看亚洲一| 亚洲精品国产高清久久伦理二区| 中文幕一区二区三区久久蜜桃| 久久嫩草精品久久久精品| 日韩欧美亚洲一区二区| 欧美xfplay| 久久久国产精品不卡| 欧美激情一区在线| 中文字幕 久热精品 视频在线| 欧美国产成人在线| 亚洲天堂中文字幕| 亚洲电影视频在线| 免费在线观看一区二区三区| 黄一区二区三区| 成人免费高清视频在线观看| 91视频免费观看| 欧美在线观看视频一区二区| 7777精品伊人久久久大香线蕉完整版 | 国产欧美视频一区二区| 中文字幕av在线一区二区三区| 亚洲免费观看在线观看| 亚洲高清不卡在线观看| 久久99精品久久久久久久久久久久| 韩国av一区二区三区| 色综合天天做天天爱| 日韩一区二区三区精品视频| 国产欧美精品一区aⅴ影院| 一区二区三区在线免费视频| 久久99精品久久久久婷婷| 91视频免费播放| 精品日本一线二线三线不卡| 最新不卡av在线| 久久国产精品色| 91麻豆视频网站| 性做久久久久久免费观看欧美| 久久久综合视频| 欧美一级日韩不卡播放免费| 久久九九国产精品| 亚洲国产综合色| 国产麻豆9l精品三级站| 欧美三级三级三级爽爽爽| 国产亚洲人成网站| 亚洲国产视频一区| 成人激情视频网站| 久久精品欧美一区二区三区不卡 | 亚洲电影激情视频网站| 欧美性受xxxx黑人xyx| 五月天一区二区| 日韩欧美国产一二三区| 激情小说欧美图片| 亚洲国产成人一区二区三区| 91同城在线观看| 午夜欧美一区二区三区在线播放| 欧美一级精品大片| 成人妖精视频yjsp地址| 亚洲欧美激情在线| 欧美一区二区三区喷汁尤物| 国产精品综合网| 亚洲视频免费在线观看| 欧美三级电影一区| 国内精品在线播放| 亚洲摸摸操操av| 日韩一区二区精品在线观看| 国产成人一区二区精品非洲| 亚洲综合男人的天堂| 欧美成人a∨高清免费观看| av在线综合网| 蜜臀av性久久久久av蜜臀妖精| 国产精品视频一二三| 欧美精品在线视频| 国产成人精品免费网站| 亚洲18影院在线观看| 久久综合色8888| 欧美日韩成人综合| 国产不卡在线播放| 男人的天堂亚洲一区| 亚洲婷婷在线视频| 2022国产精品视频| 欧美日韩国产一区| av电影天堂一区二区在线观看| 日本免费在线视频不卡一不卡二| 亚洲视频中文字幕| 久久综合狠狠综合久久综合88| 欧美亚洲精品一区| 成人免费观看av| 国产在线不卡一区| 视频一区二区三区在线| 一区二区在线免费观看| 国产清纯白嫩初高生在线观看91| 欧美一二三在线| 欧美日韩精品免费观看视频| 99视频一区二区三区| 精品一区二区三区日韩| 亚洲国产精品久久人人爱| 国产精品久久久一区麻豆最新章节| 日韩一区二区精品| 欧美日韩一卡二卡| 色88888久久久久久影院按摩| 成人性生交大片| 国产精品综合av一区二区国产馆| 五月婷婷久久丁香| 午夜电影网亚洲视频| 亚洲午夜久久久久久久久久久 | 久久久久久久久99精品| 日韩欧美国产午夜精品| 91精品国产美女浴室洗澡无遮挡| 欧美午夜精品免费| 欧美系列亚洲系列| 欧美亚男人的天堂| 欧美午夜精品免费| 欧美三级电影在线观看| 欧美猛男男办公室激情| 欧美肥妇bbw| 欧美日韩aaaaaa| 91精品国产综合久久久久久| 欧美一区二区三区系列电影| 91麻豆精品久久久久蜜臀| 欧美一区二区三区电影| 日韩一级成人av| 精品精品国产高清一毛片一天堂| 精品久久一二三区| 欧美激情资源网| 亚洲桃色在线一区| 亚洲第四色夜色| 麻豆高清免费国产一区| 国产综合久久久久久久久久久久| 经典三级视频一区| 99热在这里有精品免费| 91国偷自产一区二区开放时间| 欧美日韩一区二区电影| 日韩欧美一二三| 国产精品色在线| 亚洲精品你懂的| 麻豆国产91在线播放| 国产福利91精品一区二区三区| 波多野结衣中文字幕一区二区三区 | 久久精品一区二区三区av| 中文一区二区在线观看| 亚洲一区二区精品久久av| 日韩精品福利网| 国产精品1024| 欧美视频中文一区二区三区在线观看 | 久久影院电视剧免费观看| 亚洲国产电影在线观看| 亚洲精品美腿丝袜| 麻豆传媒一区二区三区| www.日韩大片| 91精品国产色综合久久 | 日韩精品一区二区三区在线播放 | 国产精品乱码一区二区三区软件| 亚洲国产视频在线| 国产麻豆视频精品| 在线观看不卡一区| 久久精品夜色噜噜亚洲a∨| 亚洲影院免费观看| 精品一区二区三区不卡| 97成人超碰视| 欧美不卡一区二区| 亚洲激情网站免费观看| 国产毛片一区二区| 欧美日韩电影在线播放| 中文字幕精品在线不卡| 日韩在线播放一区二区| 99精品视频在线播放观看| 精品sm在线观看| 亚洲mv在线观看| 色噜噜狠狠色综合中国| 国产亚洲一本大道中文在线| 天涯成人国产亚洲精品一区av| 99这里只有精品| 久久免费国产精品| 免费观看成人鲁鲁鲁鲁鲁视频| 91免费看视频| 国产喷白浆一区二区三区| 久久精品国产网站| 欧美日韩激情在线| 亚洲精品大片www| 成人高清在线视频| 久久婷婷成人综合色| 日韩在线一区二区| 欧美日韩高清一区二区不卡| 自拍偷拍国产亚洲| 成人国产精品免费网站| 国产色一区二区| 国产精品一区二区x88av| 欧美肥妇bbw| 奇米四色…亚洲| 制服.丝袜.亚洲.中文.综合| 一区二区三区四区在线免费观看| 成人av综合在线| 亚洲欧洲精品一区二区精品久久久| 韩国v欧美v日本v亚洲v| 久久久久青草大香线综合精品| 蜜臀av性久久久久蜜臀aⅴ| 在线综合+亚洲+欧美中文字幕| 天天操天天色综合| 欧美福利一区二区| 奇米一区二区三区av| 日韩欧美一级特黄在线播放|