Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is it possible to determine if the dt has rows?
Message
From
11/05/2009 17:39:36
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, United States
 
General information
Forum:
ASP.NET
Category:
ADO.NET
Environment versions
Environment:
C# 3.0
OS:
Windows XP
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01399235
Message ID:
01399248
Views:
34
A textbox's value is always a string, afaik. It's a textbox. :-)

>My new question now is - can we define the type of the textbox value? In VFP I would set value to 0 or to {} and this would define textbox type.
>
>How can we go here?
>
>>Hi,
>>
>>May be something like this:
>>
>>  // DataSet Orders = new DataSet();  // What ever DataSet that it is ...
>>  ...
>>
>>  bool isAnyRec = false;
>>  foreach (DataTable myDT in Orders.Tables)
>>      if (myDT.Rows.Count() > 0)
>>      {
>>          isAnyRec = true;
>>          break;
>>      }
>>
>>  ...
>>  if( !  isAnyRec )
>>      Orders.Tables["Details"].Rows.Add( myDataRow );
>>
>>
>>
>>> I want to be able to have my Add button to add a record into the Orders DS if I don't have a record there and then add record to the Details table.
>>
>>> My question is - how can I check if I already have records in Orders DS or not?
Very fitting: http://xkcd.com/386/
Previous
Reply
Map
View

Click here to load this message in the networking platform