Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


VB6 > VBScript - XMl Stream help

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,647
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> VB6 > VBScript - XMl Stream help
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 VB6 > VBScript - XMl Stream help - 7/2/2002 5:30:45 AM   
  ballsup

 

Posts: 1
Score: 0
Joined: 7/2/2002
From:
Status: offline
I have the following VB6 code i am trying to convert to VBScript but i am having problems with the XML stream, can any pass over any ideas. Heres the origional VB6 Code followed by my conversion so far...:

Option Explicit

Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long

Private Sub cmdGo_Click()

Dim rs As New ADODB.Recordset
Dim stm As New ADODB.Stream
Dim xml As New MSXML.XMLHTTPRequest

Const WEBHOST = "http://localhost/test";

' Show Hourglass:
Screen.MousePointer = vbHourglass

' Open the recordset:
rs.CursorLocation = adUseClient
rs.Open WEBHOST & "/titlesrecordsetxml.asp"

' Make some mods (an update, a delete, and an insert):

' Update:
'rs.Fields("Title") = rs.Fields("Title") & "1"
'rs.Update

' Delete:
'rs.MoveNext
'rs.Delete

' Insert:
rs.AddNew
rs.Fields("job_id") = "4"
rs.Fields("URL") = "http://testing123";
rs.Fields("Status") = "0"
rs.Update

' Send the Recordset back to the server:
rs.save stm, adPersistXML
xml.Open "POST", WEBHOST & "/roundtrip.asp", False
Dim szXML As String
szXML = stm.ReadText
xml.send szXML

' Clear Hourglass:
Screen.MousePointer = vbNormal

' Bring up the HTML file in a browser:administrator
ShellExecute Me.hwnd, "open", WEBHOST & "/titlesrecordsetxml.asp", "", CurDir$, 1&

End Sub

----------------------------------------------------

 
 
Post #: 1
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> VB6 > VBScript - XMl Stream help Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts