Well, yes and no :-)
This works if you are connecting to an SQL database using a dataset. We connect to a DB2 database using an RPC to a COBOL program...very difficult to get the same results this way as you can connecting to a SQL DB! I don't use a dataset to be able to call the table column name. According to the example I would use:
Dataset1.Tables("TableName").Columns("ColumnName") .Expression = "ExpressionName"
If I could call the datagrid in the same fashion it might work for me. I tried:
dt_grand_totals.TableName("dtg_grand_totals").Colu mns("ld_act_125_gtr_fy_hh_avg_grnd_tot").Expressio n = "ld_pct_125_tot_gtr_fy_hh" where dt_grand_totals is the datatable, dtg_grand_totals is the datagrid name, ld_act_125_gtr_fy_hh_avg_grnd_tot is the column name and ld_pct_125_tot_gtr_fy_hh is the expression or variable that I want to store the value in.
This gives me the "Blue Squiggly" error "Public Overloads Property TableName() AS String' has no parameters and its return type cannot be indexed"
Any other suggestions?
Thanks :-)
Coleen
"Cor Ligthert" <notfirstname@planet.nl> wrote in message news:%23yueLxJgEHA.712@TK2MSFTNGP09.phx.gbl...[color=blue]
> Coleen,
>
> Did you already look at this?
>
> Datatable.compute
>
http://msdn.microsoft.com/library/de...mputetopic.asp
>
> Maybe it helps easier?
>
> Cor
>
>[/color]