[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Roopesh

12/27/2013 12:36:00 AM

<a href=http://www.ghdonsaleau.c... Straightener</a>
<a href=http://www.ghdonsaleau.c... Sale</a>
<a href=http://www.ghdonsaleau.c... Straightener</a>
5 Answers

v-wywang

8/30/2007 7:12:00 AM

0

Hello Manjree,

Just as what Cor said, the Property Table->Rows->Count will return the
number of rows in current Table.
If rows retruned by Table::Select() method, Table->Select()->Length
proptery could tell us how many rows retruned by this selection criteria.

Try the following line:
array<System::Data::DataRow^>^ rows=gcnew
array<System::Data::DataRow^>(MyTable->Select("ID>100")->Length);
rows=MyTable->Select("ID>100");

Hope this helps. Please let me know if you have any more concern. It's my
pleasure to assist you. Have a great day.
Best regards,

Wen Yuan
Microsoft Online Community Support
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Manjree Garg

8/31/2007 1:28:00 PM

0

Hi Wen

I am trying the following code:

pSrchRows=gcnew array<DataRow^>((pSrchTable1->Select(L"pSrchColumn1= 'aaa'
"))->Length);

pSrchRows=(pSrchTable1->Select(L"pSrchColumn1 = 'aaa' "));

which is throwing System.Data.EvaluateException.
cannot find column [pSrchColumn1]

Though I've checked it is taking correct table (say Supplier) in pSrchTable1
and correct column (e.g. supplierID) in pSrchColumn1 and there is a record
with value supplierID = 'aaa' in the database.


Any help will be appriciated.

Thanks.
Manjree




"WenYuan Wang [MSFT]" wrote:

> Hello Manjree,
>
> Just as what Cor said, the Property Table->Rows->Count will return the
> number of rows in current Table.
> If rows retruned by Table::Select() method, Table->Select()->Length
> proptery could tell us how many rows retruned by this selection criteria.
>
> Try the following line:
> array<System::Data::DataRow^>^ rows=gcnew
> array<System::Data::DataRow^>(MyTable->Select("ID>100")->Length);
> rows=MyTable->Select("ID>100");
>
> Hope this helps. Please let me know if you have any more concern. It's my
> pleasure to assist you. Have a great day.
> Best regards,
>
> Wen Yuan
> Microsoft Online Community Support
> ==================================================
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
>

v-wywang

9/3/2007 3:18:00 AM

0

Hello Manjree,

Try the following code line.
pSrchRows=gcnew array<DataRow^>((pSrchTable1->Select(L"supplierID = 'aaa'
"))->Length);

The column in the filter criteria should be the name of Column (supplierID)
rather than the name of object (pSrchColumn1).

http://msdn2.microsoft.com/en-us/library/det...
[DataTable.Select Method (String)]

Hope this help. Please let me know if this works for you. I will follow up.
It's my pleasure to assist you.
Have a great day.
Best regards,

Wen Yuan
Microsoft Online Community Support
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Manjree Garg

9/3/2007 9:38:00 AM

0

Hello Wen

Thanks for the reply. It did work.

But the problem is that search can be on any column of any table selected
from comboBoxes in the GUI. So I set pSrchColumn1 to the selected column and
then use it.
Is there any other way round to resolve this problem?

Thanks.

Manjree

"WenYuan Wang [MSFT]" wrote:

> Hello Manjree,
>
> Try the following code line.
> pSrchRows=gcnew array<DataRow^>((pSrchTable1->Select(L"supplierID = 'aaa'
> "))->Length);
>
> The column in the filter criteria should be the name of Column (supplierID)
> rather than the name of object (pSrchColumn1).
>
> http://msdn2.microsoft.com/en-us/library/det...
> [DataTable.Select Method (String)]
>
> Hope this help. Please let me know if this works for you. I will follow up.
> It's my pleasure to assist you.
> Have a great day.
> Best regards,
>
> Wen Yuan
> Microsoft Online Community Support
> ==================================================
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
>

Manjree Garg

9/3/2007 12:56:00 PM

0

Thanks Wen. It did work though you got my name wrong :).

Manjree

"WenYuan Wang [MSFT]" wrote:

> Hello Tomasz,
> Thanks for your reply.
>
> http://msdn2.microsoft.com/en-us/library/system.data.datacolumn....(V
> S.80).aspx
> [DataColumn.ColumnName Property]
>
> DataColumn.columnName property returns the name of current DataColumn
> object.
>
> Please try the following method and let me know if this is what you need.
> I'm glad to assist you.
>
> pSrchRows=gcnew array<DataRow^>((pSrchTable1->Select( pSrchColumn1->
> columnName + L" = 'aaa' ")->Length);
>
> Hope this helps.
> Best regards,
>
> Wen Yuan
> Microsoft Online Community Support
> ==================================================
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
>