By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,600 Members | 1,887 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,600 IT Pros & Developers. It's quick & easy.

Javascript to delete a record in SQL server

P: n/a
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%>;");
}
Sep 21 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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

Tony WONG wrote:
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%>;");
}
Sep 21 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.