Checking for the existance of a table 
Author Message
 Checking for the existance of a table

Is there a way to check to see if a table already exists in a database?

Any help is greatly appreciated.

--
Greg Smith
UNIVERSITY OF MINNESOTA
NEI Vision Core Grant
2-165D Jackson Hall
321 Church St. S.E.
Minneapolis, MN  55455
Phone: (612)626-3645/Fax: (612)626-5009

"OLD PROGRAMMERS NEVER DIE THEY JUST GET COMMENTED OUT!"



Fri, 15 Oct 2004 23:41:21 GMT  
 Checking for the existance of a table
Set on error continue next. Then, you can try to read from the table. Then,
check to see if you got the error.


Quote:
> Is there a way to check to see if a table already exists in a database?

> Any help is greatly appreciated.

> --
> Greg Smith
> UNIVERSITY OF MINNESOTA
> NEI Vision Core Grant
> 2-165D Jackson Hall
> 321 Church St. S.E.
> Minneapolis, MN  55455
> Phone: (612)626-3645/Fax: (612)626-5009

> "OLD PROGRAMMERS NEVER DIE THEY JUST GET COMMENTED OUT!"



Tue, 19 Oct 2004 07:07:08 GMT  
 Checking for the existance of a table
Thank you for your help.  One other question.  How do you do this without
having the user see an error message of some kind?

Quote:

> Set on error continue next. Then, you can try to read from the table. Then,
> check to see if you got the error.



> > Is there a way to check to see if a table already exists in a database?

> > Any help is greatly appreciated.

> > --
> > Greg Smith
> > UNIVERSITY OF MINNESOTA
> > NEI Vision Core Grant
> > 2-165D Jackson Hall
> > 321 Church St. S.E.
> > Minneapolis, MN  55455
> > Phone: (612)626-3645/Fax: (612)626-5009

> > "OLD PROGRAMMERS NEVER DIE THEY JUST GET COMMENTED OUT!"

--
Greg Smith
UNIVERSITY OF MINNESOTA
NEI Vision Core Grant
2-165D Jackson Hall
321 Church St. S.E.
Minneapolis, MN  55455
Phone: (612)626-3645/Fax: (612)626-5009

"OLD PROGRAMMERS NEVER DIE THEY JUST GET COMMENTED OUT!"


Sun, 24 Oct 2004 02:16:23 GMT  
 Checking for the existance of a table
If you're using SQL Server...

Select * from Sysobjects where type='u' and name='TableName'

checks the sysobjects table for an entry of a user table named TableName


Quote:
> Is there a way to check to see if a table already exists in a database?

> Any help is greatly appreciated.

> --
> Greg Smith
> UNIVERSITY OF MINNESOTA
> NEI Vision Core Grant
> 2-165D Jackson Hall
> 321 Church St. S.E.
> Minneapolis, MN  55455
> Phone: (612)626-3645/Fax: (612)626-5009

> "OLD PROGRAMMERS NEVER DIE THEY JUST GET COMMENTED OUT!"



Sun, 31 Oct 2004 13:49:34 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. checking for table existance

2. HELP: HOW TO CHECK FOR TABLE EXISTANCE IN VB4

3. HELP: HOW TO CHECK FOR TABLE EXISTANCE IN VB4

4. Checking for the non-existance of a entry in a table

5. Checking for existance of a table, field etc...

6. Check query existance

7. How to check for object existance?

8. Checking File Existance

9. Checking for the existance of a form

10. Checking for the Existance of a foxpro definition.

11. How can I check the existance of a directory and the creation date of a file

12. Checking for directiories existance

 

 
Powered by phpBB® Forum Software