Hoping someone can help me with this. I am probably making it harder than it needs to be....
I want to place a button on an ASP page to launch a SQL stored procedure. I successfully put the button on my page as follows....
var strCallSyncButton = CRM.Button("Update Market for Resident","preparedatabase.gif", CRM.Url("CHS/LeadspCHSupdateMarket4Leads.asp"));
leadloglist.AddButton(strCallSyncButton);
The above will launch another ASP that has the stored procedure code. This is where I am sure I am missing something. Here is what I have....
My ASP page...
<!-- #include file ="sagecrm.js"-->
<!-- #include file ="spCHSupdateMarket4Leads.js"-->
My Code page...
// JScript source code
'Set the connection
'...............
'Set the command
DIM cmd
SET cmd = Server.CreateObject("ADODB.Command")
SET cmd.ActiveConnection = Conn
'Prepare the stored procedure
cmd.CommandText = "spCHSupdateMarket4Leads"
'Execute the stored procedure
cmd.Execute
Conn.Close
SET Conn = Nothing
Can anyone help me with what I am doing wrong? Or point me to an example of how to do this?
Any assistance would be greatly appreciated...Thanks!