Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 table deletion error

Author  Topic 

ghassan_aljabiri
Starting Member

2 Posts

Posted - 2007-10-19 : 07:31:00
hi

i am using sql server 2005 express edition , with asp.net

i am trying to delete a table programmatically

a button on a form , if the client clicked it , then a table
should be dropped .

but always i get an error message , that says "cannot drop table <table name> , becaust it does not exist or you do not have premissions to do that"

could any body help plz

thax

ghassan

nr
SQLTeam MVY

12543 Posts

Posted - 2007-10-19 : 08:06:25
Pretty self explanatory.
Check that you have the correct schema and the table does exist and you are in the correct database.
Otherwise it's a permissions problem

You can us the profiler to see what you are executing.


==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

jackv
Master Smack Fu Yak Hacker

2179 Posts

Posted - 2007-10-19 : 09:18:10
If you have to do it via the app or at any point , check that the user who you log on as has relevant permissions related to deleting objects

Jack Vamvas
--------------------
Search IT jobs from multiple sources- http://www.ITjobfeed.com
Go to Top of Page
   

- Advertisement -