How to delete whole table in Access database using VB.NET

How to delete whole table in Access database using VB.NET

Post by shakth » Wed, 10 Oct 2007 10:02:27



I was able to delete all the recored in the table but how can i delete
the table it self ???? Thank you
 
 
 

How to delete whole table in Access database using VB.NET

Post by Jamie Frase » Wed, 10 Oct 2007 16:42:38


Seeing as you've given us no specifics;

DROP <TABLENAME>


Quote:

> I was able to delete all the recored in the table but how can i delete
> the table it self ???? Thank you


 
 
 

How to delete whole table in Access database using VB.NET

Post by Smith, Pete » Wed, 10 Oct 2007 22:27:17


Well, he 'did' say  *using VB.NET* in the title.

_____
Peter Smith

-----Original Message-----


Sent: Tuesday, October 09, 2007 3:43 AM

Subject: [DotNetDevelopment] Re: How to delete whole table in Access
database using VB.NET

Seeing as you've given us no specifics;

DROP <TABLENAME>


> I was able to delete all the recored in the table but how can i delete
> the table it self ???? Thank you

 
 
 

How to delete whole table in Access database using VB.NET

Post by Jamie Frase » Wed, 10 Oct 2007 22:30:08


Blast, never saw that.

Okay, quick *edit* on my behalf

Dim sqlCmd as new SQLCommand("DROP TABLE <MYTABLE>", sqlConnection)

sqlConnection.Open
sqlCmd.ExecuteNonQuery()
sqlConnection.Close

That'll do it ;)


> Well, he 'did' say  *using VB.NET* in the title.

> _____
> Peter Smith
> -----Original Message-----


> Sent: Tuesday, October 09, 2007 3:43 AM

> Subject: [DotNetDevelopment] Re: How to delete whole table in Access
> database using VB.NET

> Seeing as you've given us no specifics;

> DROP <TABLENAME>


> > I was able to delete all the recored in the table but how can i delete
> > the table it self ???? Thank you

 
 
 

How to delete whole table in Access database using VB.NET

Post by Jamie Frase » Wed, 10 Oct 2007 22:56:49


CRAP!

Ninja edit required

Replace SQL with OLEDB below and it might work, if yer lucky ;-)


> Blast, never saw that.

> Okay, quick *edit* on my behalf

> Dim sqlCmd as new SQLCommand("DROP TABLE <MYTABLE>", sqlConnection)

> sqlConnection.Open
> sqlCmd.ExecuteNonQuery()
> sqlConnection.Close

> That'll do it ;)


> > Well, he 'did' say  *using VB.NET* in the title.

> > _____
> > Peter Smith
> > -----Original Message-----


> > Sent: Tuesday, October 09, 2007 3:43 AM

> > Subject: [DotNetDevelopment] Re: How to delete whole table in Access
> > database using VB.NET

> > Seeing as you've given us no specifics;

> > DROP <TABLENAME>


> > > I was able to delete all the recored in the table but how can i delete
> > > the table it self ???? Thank you

 
 
 

How to delete whole table in Access database using VB.NET

Post by Charles A. Lope » Thu, 11 Oct 2007 04:09:26


You are assuming you have permision to delete the table.

Do you?


Quote:

> I was able to delete all the recored in the table but how can i delete
> the table it self ???? Thank you

--
Charles A. Lopez

http://cs.nyu.edu/web/People/alumni.html

 
 
 

How to delete whole table in Access database using VB.NET

Post by Andrew Bader » Thu, 11 Oct 2007 04:11:13


Also, what's the motivation for deleting (dropping) the entire table?

If you're finding mass-deletes to be too slow, try using TRUNC instead. It
doesn't log heavily like DELETE.

--Andrew Badera


> You are assuming you have permision to delete the table.

> Do you?


> > I was able to delete all the recored in the table but how can i delete
> > the table it self ???? Thank you


> > <http://cs.nyu.edu/web/People/alumni.html>
> > http://cs.nyu.edu/web/People/alumni.html

 
 
 

How to delete whole table in Access database using VB.NET

Post by cleveride » Thu, 11 Oct 2007 05:56:17



Quote:> Also, what's the motivation for deleting (dropping) the entire table?

> If you're finding mass-deletes to be too slow, try using TRUNC instead. It
> doesn't log heavily like DELETE.

Does Access even have a "logging" concept like real RDBMS do?
 
 
 

How to delete whole table in Access database using VB.NET

Post by Andrew Bader » Thu, 11 Oct 2007 05:59:27


Ah, true, wasn't even thinking. I mean, who uses Access anyways?

--ab



> > Also, what's the motivation for deleting (dropping) the entire table?

> > If you're finding mass-deletes to be too slow, try using TRUNC instead.
> It
> > doesn't log heavily like DELETE.

> Does Access even have a "logging" concept like real RDBMS do?

 
 
 

How to delete whole table in Access database using VB.NET

Post by Jamie Frase » Thu, 11 Oct 2007 16:41:50


You'd be surprised at how many workplaces use it when they really
shouldn't! Normally due to inept management.


> Ah, true, wasn't even thinking. I mean, who uses Access anyways?

> --ab



> > > Also, what's the motivation for deleting (dropping) the entire table?

> > > If you're finding mass-deletes to be too slow, try using TRUNC instead.
> It
> > > doesn't log heavily like DELETE.

> > Does Access even have a "logging" concept like real RDBMS do?