-
June 23rd, 2010, 01:35 AM
#1
Rowerror
If I use a DataTable
DataGrid1.DataSource = DataSet1.Tables(0)
it displays all rows and column from the table.
If I use a DataRowArray
DataGrid1.DataSource = DataSet1.Tables(0).Select()
it displays only 2 colums RowError and HasErrors
the rowcount is the rowcount from the table but RowError is in all rows
blank and HasErrors is in all rows "False"
Why does it not display the same output?
Thanks
-
June 23rd, 2010, 02:54 AM
#2
Re: Rowerror
So, maybe I'm completely wrong and "Tables" is a method (never worked with either of those classes), but if Tables is a collection than that is VB code, and VB is 1 indexed, not 0.
-
June 23rd, 2010, 06:59 AM
#3
Re: Rowerror
Vb is not 1 indexed. At least not as a rule. It can be however.
As to the problem in the OP doesn't Select() require a parameter of some sort?
http://msdn.microsoft.com/en-us/libr...zc(VS.80).aspx
Always use [code][/code] tags when posting code.
-
June 23rd, 2010, 12:18 PM
#4
Re: Rowerror
Geez, you're right:
The range of the array index can be 0 to 10 or 1 to 10, depending on the default value indicated with the Option Base statement.
What a stupid language...
-
June 23rd, 2010, 01:48 PM
#5
Re: Rowerror
Vb coders may say the same about C#
Always use [code][/code] tags when posting code.
-
June 23rd, 2010, 07:03 PM
#6
Re: Rowerror
Originally Posted by DataMiser
Vb coders may say the same about C#
Maybe, but they would be wrong. It's not really a subjective thing, VB is just a poorly designed language from top to bottom, but I'll stop ranting now :P
-
June 23rd, 2010, 07:19 PM
#7
Re: Rowerror
I agree VB on the surface seems pretty darn stupid.
I have learned that it is far easier to program VB on a non-US keyboard where the { and the ; are not inheritantly on the keyboard. I got so tired of typing Alt + plus whatever the stupid character code was that after two weeks I was ready to convert. Thank god I got to come home.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|