Results 1 to 2 of 2

Thread: [RESOLVED] [2005] need help downloadstring

  1. #1

    Thread Starter
    Member
    Join Date
    Sep 2005
    Posts
    37

    Resolved [RESOLVED] [2005] need help downloadstring

    i try to use downloadstring to get the data online and split the data into string array, but it show ERROR
    Value of type 'String' cannot be converted to '1-dimensional array of String'. Below are my code:

    Code:
    Dim client As New Net.WebClient
    Dim strArray As String() = client.DownloadString(("http://n2ntbfd01.itradecimb.com/rtQuote.dll?GetStockGeneral&Key=0001")) '.Split("|", 20)

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: [2005] need help downloadstring

    Of course you get that error because you've commented out the bit that splits it into an array. DownloadString returns a String, unsurprisingly. You can assign that String a String array variable. If you call the String's Split method that that will return a String array, which you can assign to a String array variable.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width