Dataset Tablenames <- SQLHelper

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Lucas Tam

    Dataset Tablenames <- SQLHelper

    I'm not sure if this is a problem with Microsoft's Application Data Blocks,
    but I am using a query like this:

    USE DATABASENAME;SE LECT * FROM SOMETABLE

    The tablename property of my datasets are not being set - this causes a
    problem with CrystalReports.

    Is there a way to auto-set the Tablename in a dataset?

    Thanks.

    --
    Lucas Tam (REMOVEnntp@rog ers.com)
    Please delete "REMOVE" from the e-mail address when replying.

  • Josh Golden

    #2
    Re: Dataset Tablenames &lt;- SQLHelper

    use FillDataset instead of ExecuteDataset. here's the signature on one of
    them. as you can see, the tableNames() array is for this.

    Public Overloads Shared Sub FillDataset(con nectionString As String,
    commandType As CommandType, commandText As String, dataSet As DataSet,
    tableNames() As String)



    Lucas Tam wrote:[color=blue]
    > I'm not sure if this is a problem with Microsoft's Application Data
    > Blocks, but I am using a query like this:
    >
    > USE DATABASENAME;SE LECT * FROM SOMETABLE
    >
    > The tablename property of my datasets are not being set - this causes
    > a problem with CrystalReports.
    >
    > Is there a way to auto-set the Tablename in a dataset?
    >
    > Thanks.[/color]


    Comment

    • Lucas Tam

      #3
      Re: Dataset Tablenames &lt;- SQLHelper

      "Josh Golden" <joshg@wachovia .com> wrote in
      news:40ec35c8$0 $82988$39cecf19 @news.twtelecom .net:
      [color=blue]
      > use FillDataset instead of ExecuteDataset. here's the signature on
      > one of them. as you can see, the tableNames() array is for this.
      >[/color]

      Shoot, I was hoping there was some automatic way to pick up the table names
      from the database. I'm using System.Reflecti on to dynamically instantiate
      my functions, so any manual work is a bit hard to do.

      Anyhow, thanks for your help!

      --
      Lucas Tam (REMOVEnntp@rog ers.com)
      Please delete "REMOVE" from the e-mail address when replying.

      Comment

      Working...