Table Name is Typed DataSet

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Robert A. Boudra

    Table Name is Typed DataSet

    I'm working through one of the example data sets in the Visual Basic
    Resource Kit, and am having a problem with use of a table name that contains
    spaces. The section of code in the example that I'm having trouble with is
    as follows:

    TextBox1.Text = tds.Alphabetica l_list_of_produ cts(5).ProductN ame
    TextBox2.Text = tds.Alphabetica l_list_of_produ cts(5).Category Name

    where tds is a Typed Data Set. I noticed that the actual view in the
    Northwind database does not contain the "_" characters between words in the
    name. When I enter the code (above) from the example, I get an error saying
    "
    Alphabetical_li st_of_products is not a member of 'tds.dsProducts '. I'm
    guessing that the problem has to do with the embedded "_" characters which
    are not in the actual view name that the Typed DataSet is based on.
    However, it doesn't work if I remove the "_" characters because it doesn't
    know how to handle the spaces. Can someone fill me in on how to deal with
    this issue? Thanks,

    Bob


  • Armin Zingler

    #2
    Re: Table Name is Typed DataSet

    "Robert A. Boudra" <rboudra@comcas t.net> schrieb[color=blue]
    >
    > TextBox1.Text = tds.Alphabetica l_list_of_produ cts(5).ProductN ame
    > TextBox2.Text = tds.Alphabetica l_list_of_produ cts(5).Category Name[/color]

    Which example are you referring to? I tried to find it but I didn't.


    --
    Armin





    Comment

    • Robert A. Boudra

      #3
      Re: Table Name is Typed DataSet

      For some reason, once I saved the project, it started working. Sorry that
      you had to look into this. One question though. It appears that if spaces
      are embedded in a View name, they can be repaced by the "_" character to
      reference the view in code. Is this correct?

      The example is in the Step-by-Step Walkthroughs in the Data Access section.
      It is called "Create and Use a Typed DataSet by Using Visual Basic.NET"

      Thanks for your help.

      Bob

      "Armin Zingler" <az.nospam@free net.de> wrote in message
      news:OoSbhzc0DH A.1700@TK2MSFTN GP12.phx.gbl...[color=blue]
      > "Robert A. Boudra" <rboudra@comcas t.net> schrieb[color=green]
      > >
      > > TextBox1.Text = tds.Alphabetica l_list_of_produ cts(5).ProductN ame
      > > TextBox2.Text = tds.Alphabetica l_list_of_produ cts(5).Category Name[/color]
      >
      > Which example are you referring to? I tried to find it but I didn't.
      >
      >
      > --
      > Armin
      >
      > http://www.plig.net/nnq/nquote.html
      > http://www.netmeister.org/news/learn2quote.html
      >
      >[/color]


      Comment

      • Armin Zingler

        #4
        Re: Table Name is Typed DataSet

        "Robert A. Boudra" <rboudra@comcas t.net> schrieb[color=blue]
        > For some reason, once I saved the project, it started working. Sorry
        > that you had to look into this. One question though. It appears
        > that if spaces are embedded in a View name, they can be repaced by
        > the "_" character to reference the view in code. Is this
        > correct?[/color]

        Blanks are replaced by "_" when the typed dataset is generated because names
        mustn't contain blanks.
        [color=blue]
        > The example is in the Step-by-Step Walkthroughs in the Data Access
        > section. It is called "Create and Use a Typed DataSet by Using Visual
        > Basic.NET"[/color]

        Aaah ok. I had the explorer search all *.vb files, not *.htm. :-( :-)


        --
        Armin




        Comment

        Working...