Login  
Search All Forums
Dart Home | PowerTCP Web for ActiveX | Custom Development Reply | PowerTCP Web for ActiveX Topics | Forums   
AuthorForum: PowerTCP Web for ActiveX
Topic: conversion error from string to dartstream
mnielsm

From: houten, Netherlands
Posts: 2
Member Since: 11/20/05
posted November 20, 2005 9:12 AM

when i try to execute the following code:

>  Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label1.Click
    On Error GoTo OnError
    Dim Orderform As String
    Http1.Timeout = 20000 'give it 20 seconds to complete
    Http1.Url = "http://www.dart.com/" ' Specify the URL to GET
    Http1.Get(Orderform) ' Send a GET request, Orderform will be filled with data
    Text1.Text = Orderform 'The HTML code for the web site appears in the text box
    Exit Sub
OnError:
    ' Don't use MsgBox because that interrupts event notification
    Text2.Text = "Error #" + CStr(Err.Number) + ": " + Err.Description
  End Sub

i get the error:

(dutch:)Error #5: Het objecttype kan niet naar het doeltype worden geconverteerd.
(english:)Error #5 The objecttype cannot be converted to target type.

the problem is the conversion of DartStream to string (and visa-versa)

i use microsoft vb.net version 7.1.3088 and the latest version of web-tool.

with the included 2 vb.net sample file's i can post the tekst to the web (post & put don't give any errors, but get and getex do)
the included page fetch stops excecuting with the following error:

Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted November 20, 2005 9:34 AM

I don't see where you are doing any conversion to a dartstream. Which line is giving you the error? Does the sample PageFetch app work for you?
mnielsm

From: houten, Netherlands
Posts: 2
Member Since: 11/20/05
posted November 20, 2005 10:37 AM

i think the error line is http1.get(orderform)

if i try to run the pagefetch app i get the following error:

An unhandled exception of type 'System.InvalidCastException' occurred in PageFetch.exe

Additional information: De opgegeven conversie is ongeldig. (in english: the given conversion is invalid)

in vb.net the following line got yellow:
Dim comE As System.Runtime.InteropServices.COMException = ex
Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted November 20, 2005 12:40 PM

I need to know exactly which line the error occurs on. Please step through the code or turn off exception handling to determine this.

Also, please tell me what version of Visual Studio you are using.


Reply | PowerTCP Web for ActiveX Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX