search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

No result, no data passing to stored procedure?

Asked by Craig
3 years ago.

I am currently trying to implement the ASP.NET and Javascript DayPilot solutions with no luck.

At the moment I am using a RecordSet to call from a SQL Database view, and this works.

However, my onEventMoved fails to post back into the database via stored procedure. A new field, "DBR", is needed as this acts as a customer order number, with the calendar acting as a drag-and-drop delivery organisation tool.

The stored procedre takes the DBR and newStart date, and overwrites the date with the newStart, using the DBR number as the primary key for reference to which order is changing.

DayPilot page (Classic ASP):
// event moving
dp.onEventMoved = function (args) {
dp.message("Moved: " + args.e.text());
// get data for stored procedure
var data = {
newStart: args.newStart.toString(),
newEnd: args.newEnd.toString(),
text: args.e.text(),
dbr: //new args for dbr needs to be added for this to work

$.post("eventmoved.asp", data, function(result) {
console.log("result: " + result);

SQL Database Stored Procedure:

Dim Command1__id
Command1__id = ""
if(Request("id") <> "") then Command1__id = Request("id")

Dim Command1__newStart
Command1__newStart = ""
if(Request("newStart") <> "") then Command1__newStart = Request("newStart")

Dim Command1__newEnd
Command1__newEnd = ""
if(Request("newEnd") <> "") then Command1__newEnd = Request("newEnd")

Dim Command1__dbr
Command1__dbr = ""
if(Request("dbr") <> "") then Command1__dbr = Request("dbr")


set Command1 = Server.CreateObject("ADODB.Command")
Command1.ActiveConnection = MM_ERGSERVER_STRING
Command1.CommandText = "dbo.ErgUpdateLogisticsCalendar"
Command1.CommandType = 4
Command1.CommandTimeout = 0
Command1.Prepared = true
Command1.Parameters.Append Command1.CreateParameter("@RETURN_VALUE", 3, 4)
Command1.Parameters.Append Command1.CreateParameter("@id", 3, 1,100,Command1__id)
Command1.Parameters.Append Command1.CreateParameter("@newStart", 135, 1,50,Command1__newStart)
Command1.Parameters.Append Command1.CreateParameter("@newEnd", 135, 1,50,Command1__newEnd)
Command1.Parameters.Append Command1.CreateParameter("@dbr", 3, 1,20,Command1__dbr)


Any help is greatly appreciated.

Many thanks.

This question is more than 3 months old and has been closed. Please create a new question if you have anything to add.