Stefan
Stefan

Reputation: 3869

Why can't I drop a table in Excel via ODBC?

I am using ODBC to connect to Excel via my DSN which has a default worksheet configured.

I can create pages in the worksheet via the create table command like this:

CREATE TABLE testtable( c VARCHAR(8) )  

However when I use the drop table command like this:

DROP TABLE testtable

The Execute function returns a success value but the sheet is not deleted. The column name has been removed but that is all.

Anyone know what might be wrong?

Upvotes: 0

Views: 204

Answers (1)

Olly
Olly

Reputation: 7891

This is a limitation of the Excel ODBC driver - the DROP statement will clear the worksheet, but not delete it.

Upvotes: 1

Related Questions