Hi, quick question:
Is it possible for vb6 to receive an answer from PERL via a return statement?

Let me expand:

The thing is, I have a CGI script that I would like to send data to a VB application. I know VB can "call" the script by making an InternetExploer object, and using the "location" method to call the web script, but can VB listen for a response?

Haven't Tried it, Sounds interesting though. It should work as long as the error code info is returned to the program. Give it a shot and let us know.

I'm not sure exactly your infrastructure, as in, are you trying to read the CGI output (HTML)? Are you trying to find out if the launch was successful? I'm pretty sure you can write or get the HTML from the page in the InternetExplorer.Application class, and once you do, you can rip apart the HTML, and do what you need to accordingly.

Yeah, I'm trying to read the CGI output. Here's the purpose, maybe that'll make it clearer. I have a program that stores customer data in a file. However, the program also updates an online database by calling the CGI script that handles the files online. So calling it, is not a problem, just create an InternetExplorer object and call the CGI url with the info attached in the URL. Like so:

'-----------------------------------
' Create the InternetExplorer object
'-----------------------------------
            Dim oIE As Object
            Set oIE = CreateObject("InternetExplorer.Application")

'-----------------------------------
' Call the Url
'-----------------------------------
            oIE.Navigate "http://www.mywebsitecom/cgi-bin/Update2.cgi?Phone=" & GetSetting("Record Keeper", sStatusInvoice, "Phone") & "&Order=" & _
            GetSetting("Record Keeper", sStatusInvoice, "Order") & "&Name=" & GetSetting("Record Keeper", sStatusInvoice, "Name") & "&Total=" & _
            GetSetting("Record Keeper", sStatusInvoice, "Total") & "&Deposit=" & GetSetting("Record Keeper", sStatusInvoice, "Deposit") & "&Balance=" & _
            (CCur(GetSetting("Record Keeper", sStatusInvoice, "Total")) - CCur(GetSetting("Record Keeper", sStatusInvoice, "Deposit"))) & "&Status=" & _
            GetSetting("Record Keeper", sStatusInvoice, "Status") & "&Date=" & GetSetting("Record Keeper", sStatusInvoice, "Date") & "&Qty=" & _
            sQty & "&Desc=" & sDesc & "&Way=2" & "&User=" & GetSetting("Record Keeper", sStatusInvoice, "Email")
            oIE.Visible = False

So like I said, uploading info, not a problem, but let's say the the CGI script returns a string via the print function. That's where I get lost, having VB "catch" the output.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.