Click to See Complete Forum and Search --> : Delete and Update a record
Larry
07-14-2000, 01:56 PM
Hi, Everyone:
I have trouble to Delete and Update a record in a database, does anyone know
what are the ways to do them...
I used MyRecordset.Delete after I found the thing I want to delete, but there
were errors...
Thanks!
Romeo
07-14-2000, 03:23 PM
"Larry" <larry@levelogic.com> wrote:
>
>Hi, Everyone:
>I have trouble to Delete and Update a record in a database, does anyone
know
>what are the ways to do them...
>I used MyRecordset.Delete after I found the thing I want to delete, but
there
>were errors...
>Thanks!
One way would to use the DELETE method in SQL.
Set rst = Server.CreateObject("ADODB.Recordset")
sqlstring = "DELETE * From TABLE Where FIELDNAME = 'FIELDVALUE'"
rst.Open sqlstring, objConn, 3, 3
just_me
07-14-2000, 08:14 PM
Why dont you just use SQL to delete the record you want gone ie
Delete From TableName Where ID = 33
Larry <larry@levelogic.com> wrote in message
news:396f545d$1@news.devx.com...
>
> Hi, Everyone:
> I have trouble to Delete and Update a record in a database, does anyone
know
> what are the ways to do them...
> I used MyRecordset.Delete after I found the thing I want to delete, but
there
> were errors...
> Thanks!
devx.com
Copyright Internet.com Inc. All Rights Reserved