how to know if a table is in a database? 
Author Message
 how to know if a table is in a database?

I am using vfp 6 and win 2000.

In a program I open a database and would like to say

remove table t

but if t does not exist in the database, I get an error.

How can I determine if t exists in the database so I won't try to
remove it if it is not there?

Any help is greatly appreciated.

Sincerely,

Jan Nordgreen



Wed, 31 Aug 2005 23:52:03 GMT  
 how to know if a table is in a database?
Jan,

if( indbc('TableName', 'Table') )
    & it is
endif

Gregory
_______

Quote:
> I am using vfp 6 and win 2000.

> In a program I open a database and would like to say

> remove table t

> but if t does not exist in the database, I get an error.

> How can I determine if t exists in the database so I won't try to
> remove it if it is not there?

> Any help is greatly appreciated.

> Sincerely,

> Jan Nordgreen



Wed, 31 Aug 2005 23:59:42 GMT  
 how to know if a table is in a database?
Hello, Gregory!
You wrote  on Sat, 15 Mar 2003 16:59:42 +0100:

 GA> if( indbc('TableName', 'Table') )
 GA>     & it is
 GA> endif

 GA> Gregory
 GA> _______

To add: use the ADBOBJECTS() function to build an array containing the names
of all tables in a dbc:
lnTableCount = ADBOBJECTS(laTables, "table")
See VFP help on ADBOBJECTS() for more details.
---
Eric den Doop
www.foxite.com - The Home Of The Visual FoxPro Experts - Powered By VFP8



Thu, 01 Sep 2005 15:14:29 GMT  
 how to know if a table is in a database?
look at adbobjects()


Quote:
>I am using vfp 6 and win 2000.

>In a program I open a database and would like to say

>remove table t

>but if t does not exist in the database, I get an error.

>How can I determine if t exists in the database so I won't try to
>remove it if it is not there?

>Any help is greatly appreciated.

>Sincerely,

>Jan Nordgreen



Wed, 07 Sep 2005 02:50:23 GMT  
 how to know if a table is in a database?
also look at the CURSORGETPROP() function
CURSORGETPROP("DATABASE","youraliasname")


Quote:
> look at adbobjects()



> >I am using vfp 6 and win 2000.

> >In a program I open a database and would like to say

> >remove table t

> >but if t does not exist in the database, I get an error.

> >How can I determine if t exists in the database so I won't try to
> >remove it if it is not there?

> >Any help is greatly appreciated.

> >Sincerely,

> >Jan Nordgreen



Wed, 07 Sep 2005 04:20:55 GMT  
 how to know if a table is in a database?
what about INDBC() ???
works with me...


Quote:
> also look at the CURSORGETPROP() function
> CURSORGETPROP("DATABASE","youraliasname")



> > look at adbobjects()



> > >I am using vfp 6 and win 2000.

> > >In a program I open a database and would like to say

> > >remove table t

> > >but if t does not exist in the database, I get an error.

> > >How can I determine if t exists in the database so I won't try to
> > >remove it if it is not there?

> > >Any help is greatly appreciated.

> > >Sincerely,

> > >Jan Nordgreen



Wed, 07 Sep 2005 22:15:58 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. How can I know if I am online?

2. How can I know if I am online?

3. I am looking for a used car lot database

4. Remote database access - know how?

5. Database - tables not showing - MODI DATABASE

6. Table names in database to table

7. Database table vs Free table ?

8. How to know differences in tables???

9. How does SET RELATION know what it knows?

10. How to know how many tables opened?

11. Knowing if table is empty

12. Linking Screens for 2 database tables

 

 
Powered by phpBB® Forum Software