Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Login/Logout
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Titre:
Login/Logout
Divers
Thread ID:
00863603
Message ID:
00863603
Vues:
45
Im stumped on this one. I have this vb script that runs a bunch of queries againts my sql server. The problem is that when I watch the trace window, the script logs in and logs out after each query is run in the do while loop. Here it is if you want to check it out.
dim objADOCnn, objWorldNewsTypes, strNewsArticles
	Set objADOCnn = CreateObject("ADODB.Connection")
	
	dim strConnectionStr
	strConnectionStr = "DRIVER={SQL Server};SERVER=*******;UID=*****;PWD=*****;"
	objADOCnn.Open strConnectionStr

	Set objWorldNewsTypes = objADOCnn.execute("getWorldNewsTypeUrls")

	do while NOT(objWorldNewsTypes.EOF)
		dim oXMLDoc, myXMLQuery
		set oXMLDoc = CreateObject("Msxml2.DOMDocument")
		oXMLDoc.async = false

		myXMLQuery = "http://p.moreover.com/cgi-local/page?c=" & objWorldNewsTypes("newsTypeUrl") & "&o=xml_1"

		if oXMLDoc.load(myXMLQuery) then
			'MsgBox( Replace((left(oXMLDoc.xml, 21) & mid(oXMLDoc.xml, 104)), "'", "''"))

			objADOCnn.execute("updateWorldNewsArticles " & objWorldNewsTypes("id") & ", '" & Replace((left(oXMLDoc.xml, 21) & mid(oXMLDoc.xml, 104)), "'", "''") & "'")
		else
			'Error... No News Data Retrieved
		end if
					
		set oXMLDoc = nothing
		objWorldNewsTypes.MoveNext
	loop
	
	objWorldNewsTypes.Close	
	objADOCnn.Close
	set objWorldNewsTypes = nothing
	set objADOCnn = nothing
Any idea why there is a login/out after each query is run?
Im guessing its a vbscript thing and if thats the case can an admin move this to the right forum.
Répondre
Fil
Voir

Click here to load this message in the networking platform