Wesley wrote:
> Another question:
> I create a view:
> jaar = "create view jaar as select * from hosting where Year(startd)
>= " &
> Year(van)
> db.execute(jaar)
>
> This works fine, but if I would like to drop the view, I get error.
>
> weg = "drop view jaar"
> db.execute(weg)
>
> Error: Syntax error in DROP TABLE or DROP INDEX
> Is this wrong code?? Thanks in advange
Nothing is obviously wrong. I ran it on my machine (with minor changes,
such as making the variable @jaar instead of jaar) and it worked
perfectly. Because the drop statement is so obviously correct
DROP VIEW Jaar
(doesn't get much simpler) I think I'd make sure that you're putting
quotation marks on correctly, etc. In other words, look for syntax
errors. :)
--Wilson SQL Server2000