Deleting records using a data control

jamesloi
12-22-2002, 04:25 PM
Hi ,

I am trying to delete all records in a table that has been populated at run-time.
i am using a normal data control

datCurrent - linked to a table called Current Team

and the following code has been put into the cmd_click function of a button

datCurrent.Recordsource = "DELETE * FROM Current Team"

it doesn't work though. anyone know why? I think it is because i am not using an ADO data control. anyone know how to do this.

thanks

goukiakuma
12-22-2002, 11:27 PM
what database you are using??SQL Server??
if that so..
try use delete from tableName
instead using Delete * from tableName

hariharan_j80
12-23-2002, 12:06 AM
if you are using MS Access or any other database put the tablename in [](square brackets)

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum