Results 1 to 4 of 4

Thread: [RESOLVED] [2005] Converting my vb.net 2003 to vb.net 2005

  1. #1

    Thread Starter
    Hyperactive Member shyguyjeff's Avatar
    Join Date
    Jul 2007
    Location
    City of Durian
    Posts
    289

    Resolved [RESOLVED] [2005] Converting my vb.net 2003 to vb.net 2005

    elow everyone i have here my code and i want to convert it to vb.net 2005. How can I do it? really need help.

    Code:
      If File.Exists Then
    
                dsStore.ReadXml(xmlFile)
                With cmbStore
                    .DataSource = dsStore.Tables("Store")
                    .ValueMember = "name"
                End With
            Else
    The "File" there will appear as an error saying Name is not declared but on my vb.net syntax it will not appear as an error. How can I do it guys? Thanks in advance and God Bless..
    Last edited by shyguyjeff; Apr 30th, 2008 at 02:30 AM.

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

    Re: [2005] Converting my vb.net 2003 to vb.net 2005

    It's not a conversion issue. That's not valid VB.NET 2003 either. In either version the File.Exists method requires a parameter containing a file path that you want to check for the existence of:
    vb.net Code:
    1. If File.Exists(someFilePath) Then
    That said, The File class is a member of the System.IO namespace. Again, regardless of your version you must either import that namespace or qualify the class name.
    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

  3. #3
    Frenzied Member MaximilianMayrhofer's Avatar
    Join Date
    Aug 2007
    Location
    IM IN YR LOOP
    Posts
    2,001

    Re: [2005] Converting my vb.net 2003 to vb.net 2005

    The only way that you weren't getting an error is if somewhere else in your code a variable "File" was declared, along with a filepath.

  4. #4

    Thread Starter
    Hyperactive Member shyguyjeff's Avatar
    Join Date
    Jul 2007
    Location
    City of Durian
    Posts
    289

    Re: [2005] Converting my vb.net 2003 to vb.net 2005

    ahhh ic...thanks for you both jmcilhinney and MaximilianMayrhofer..God Bless...

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