none
References or Pointers to DataSet values RRS feed

  • Question

  • I would like to compile a collection of references or pointers to a subset of values in my DataTable. So, that I may display and manipulate specific types of data independently of the rest of the DataTable.

    This would be akin to creating an array of pointers in standard C++...

    I've tried compling a collection of pointers but apparently it's not possible to create a collection of type cli::interior_ptr or cli:Stick out tonguein_ptr or tracking references %...

    And, because of boxing, it's not possible to simply store handles ^ either...

    So, what do I do?
    Wednesday, October 17, 2007 3:01 PM

Answers

  • (I would like to compile a collection of references or pointers to a subset of values in my DataTable.)

     

    The above means you cannot use an Array because DataTable passes its values to a relational table which is just Columns and Rows nothing more.

     

    Wednesday, October 17, 2007 7:29 PM
  • Maybe you could do it in VC++ but I know in C# the version I gave you was easier, if you are using SQL Server check the Extended stored procedures you may find an existing solution and Packages in Oracle.  Hope this helps.

     

    Wednesday, October 17, 2007 7:51 PM

All replies

  • You have the option to create queries, stored procedures or views because all can give you a sub set of your data table based on your definition, the later are persisted while the former are compiled.  Hope this helps.

     

    Wednesday, October 17, 2007 3:17 PM
  • I'm trying to pass data to a control that I created for displaying and editing it. Creating an array of copies is just fine for displaying the data but obviously it's useless if I want to edit it. I want the control to maintane independence from the data source. So, that I can reuse it in other projects.

    I could use a DataView but it would increase complexity too much. Isn't there a way to create something simular to an array of pointers in standard C++?

    double *array1[10];
    Wednesday, October 17, 2007 7:16 PM
  • (I would like to compile a collection of references or pointers to a subset of values in my DataTable.)

     

    The above means you cannot use an Array because DataTable passes its values to a relational table which is just Columns and Rows nothing more.

     

    Wednesday, October 17, 2007 7:29 PM
  • Yeah, but it's possible to get the memory address of each item in the dataset. Shouldn't I be able to store tracking references or the like in an array?
    Wednesday, October 17, 2007 7:35 PM
  • Maybe you could do it in VC++ but I know in C# the version I gave you was easier, if you are using SQL Server check the Extended stored procedures you may find an existing solution and Packages in Oracle.  Hope this helps.

     

    Wednesday, October 17, 2007 7:51 PM