Results 1 to 6 of 6

Thread: table.rows(1)(1)=nothing???

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Nov 2003
    Location
    Iowa
    Posts
    96

    table.rows(1)(1)=nothing???

    How do i make my program know if a certain entry in a table doesnt exists, aka null, aka nothing?? I tried doing

    Code:
    If table.rows(1)(1).contains("") Then
    Do it
    End If
    and i also tried


    Code:
    If table.rows(1)(1).contains(nothing) Then
    do it
    end if
    Both times i got the same error "Public member on "Contains" on type double not found"....


    I imported an excel database, into the table, so i don't know what it thinks it is, or what the data type is... SO any information about this, or any suggestions would help!
    It is like wiping your ass with silk, I love it!

  2. #2
    Addicted Member Hole-In-One's Avatar
    Join Date
    Mar 2003
    Location
    Minnesota
    Posts
    195
    Try this:

    Code:
    If IsDBNull(table.rows(1)(1)) Then
        Do it
    End If

    Not sure about the whole "table.rows(1)(1)" but the IsDBNull part is correct.

  3. #3
    Frenzied Member
    Join Date
    Nov 2003
    Posts
    1,489
    i've not seen that syntax either. how is it read?

  4. #4
    Lively Member TLord's Avatar
    Join Date
    Jun 2004
    Posts
    95
    YOu alwaus should use column name for rows in a DataTable, because you may need in some point to move into SQLDB/XML data storing, where while writing code for creating columns changing the order columns are putten into the table may deffer from method to method, which makes using index for column identication is irreliable.
    Also using column name makes your code more readable and organized
    Do you think my life is easy?
    Do you think it's good to win?
    do you think it's nice to kill?
    Do you think learning is a must?
    Do you think computers are nothing?
    Do you think this post is stupid?
    Do ypu think we're really humen?

    DO YOU THINK IT'S GOOD TO THINK AT ALL? ? ? ! ! !

  5. #5
    Junior Member ost's Avatar
    Join Date
    Jan 2004
    Posts
    19
    Originally posted by Andy
    i've not seen that syntax either. how is it read?
    Code:
    table.rows(1)(1)
    is just a faster way for writing

    Code:
    table.rows(1).items(1)

  6. #6
    Junior Member ost's Avatar
    Join Date
    Jan 2004
    Posts
    19
    Originally posted by Andy
    i've not seen that syntax either. how is it read?
    Code:
    table.rows(1)(1)
    is just a faster way for writing

    Code:
    table.rows(1).items(1)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width