SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 4 of 4
  1. #1
    Member
    Join Date
    Oct 2008
    Posts
    136
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    2 Thread(s)
    Total Downloaded
    0

    Check if data-table exists

    I need to check in my script if certain datatable exists.
    Is there a way to check if the Datatable with name for example... "Testing_Kidsfood" exists if exist then run the script else go ahead and add the sheet and then import the sheet, and then run the script....

  2. #2
    Apprentice
    Join Date
    May 2010
    Posts
    43
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Check if data-table exists

    The easy way is, you can use the on error resume next and then try to open the datatable. If Err.Number <> 0 then the datatable does not exist.

  3. #3
    Member
    Join Date
    Aug 2011
    Location
    Bangalore, India
    Posts
    57
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Check if data-table exists

    I guess u r checkinh for sheet existance

    Use the below code

    On Error Resume Next

    Datatable.GetSheet(<SheetName&gt

    if Err.Number<>0 then
    Datatable.AddSheet(<SheetName&gt
    Else
    'Your code
    End If

    Regards,
    Ankesh

  4. #4
    Member
    Join Date
    Oct 2008
    Posts
    136
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    2 Thread(s)
    Total Downloaded
    0

    Re: Check if data-table exists

    I think this should work. I will let you know in case I need more info

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 10.71%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 04:09 AM.

Copyright BetaSoft Inc.