Javascript to delete a record in SQL server

T

Tony WONG

i wish to make use of javascript to delete a record by clicking a button,
what's wrong with the following 3 lines? Thanks a lot.

function confirmYes()
{
var adoConnection = Server.CreateObject("ADODB.Connection");
adoConnection.Open("driver={SQL
Server};Server=ABCD;Database=AAA;UID=BBB;PWD=CCC");
adoConnection.Execute("update dbo.out set Schedule_Time = null where out_id
=<%=oMyObject%>;");
}
 
N

nic.j.roche

Could be any number of things:
1. security on client machine
2. ODBC set up on client machine
3. Server side code mixed in with client-side: have you debugged what
<%=oMyObject%> writes
3. are the DB objects ok?

Are you sure you want to evoke this code on the client?

Nic
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,278
Latest member
BuzzDefenderpro

Latest Threads

Top