Methods used by the ADODB-generated recordset in. Net to invoke in foreground scripts

Source: Internet
Author: User

The Adodb.recordset in the background is called at the foreground. The
uses XML to store data. After the recordset is generated in the background, save the data as an XML-formatted data file with the recordset in the band's Save method,
or stored in a control key. Then create a Recordset (CreateObject ("Adodb.recordset")) in the foreground script (VBScript)
and then call the recordset's Open method to open the XML file. or use the stream to read the data in the control key, then open (stream) to get the data.
that's all.

. NET daemon (generate Adodb.recordset)
----------------------------------------------------------------------- -------------------------
        Dim ado_conn as New ADODB. Connection ()
        Dim ado_rs as ADODB. Recordset
        Dim ado_sql as String
         Dim Stream as ADODB. Stream
        Dim XML as String

Ado_conn. Open (Application ("Conn_string"))
Ado_sql = "SELECT * from Traceresult where g3e_tno=" & cmd. Parameters ("V_g3e_tno"). Value

Ado_rs = Ado_conn. Execute (Ado_sql)
stream = New ADODB. Stream ()

Ado_rs. Save (Stream, ADODB. Persistformatenum.adpersistxml)
XML = stream. ReadText

Me.txtxml.Value = ""
Me.txtxml.Value = XML

Page.registerstartupscript ("Key2", "<script Language=javascript>top.main.find_doxl ();</script>")


The foreground Script program FIND_DOXL () calls Adodb.recoredset
--------------------------------------------------------------------------------------------------------------- --
Dim xml_rs, Stream,xml,xmlfid_rs
Dim Tracesourange,tracesoufid

Set Xml_rs=createobject ("Adodb.recordset")
Set Stream = CreateObject ("ADODB.") Stream ")

Stream.open ()
Xml=top.footer.document.all ("Txtxml"). Value
Stream.writetext (XML)
stream.position = 0
Xml_rs. Open (Stream)
Stream. Close ()

Gvm.appendquery xml_rs, "zkjhy", Tracesym, False, False, True, true, 3,1 ' xml_rs is already used as a recordset

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.