Z
Zwi2000
Hi,
Hope someone can help me. I have a stored procedure which copies data from a
recordset into a table. It worked fine, but as soon as I added one more
field (datetime) it crashes and gives the error below, I searched for this
error on the net but I got hits on solutions that have nothing to do with
this. If I take the date field out of the SP it works fine.
ERROR -------
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E21)
[Microsoft][ODBC SQL Server Driver]Optional feature not implemented
/bluedot2004/Intranet/Cases/Billing/Invoices/SaveInvoiceNew.asp, line 202
---------
This is the code for the SP with the date field included, which gives the
error above:
---------------
<%while not Details.eof
'execute SP
%>
<%
Dim AddDetails__InvoiceId
AddDetails__InvoiceId = "0"
if(Session("InvoiceId") <> "") then AddDetails__InvoiceId =
Session("InvoiceId")
Dim AddDetails__CaseId
AddDetails__CaseId = "0"
if(Details("CaseId") <> "") then AddDetails__CaseId = Details("CaseId")
Dim AddDetails__ItemId
AddDetails__ItemId = "0"
if(Details("ItemId") <> "") then AddDetails__ItemId = Details("ItemId")
Dim AddDetails__Itemdesc
AddDetails__Itemdesc = "0"
if(Details("Itemdesc") <> "") then AddDetails__Itemdesc =
Details("Itemdesc")
Dim AddDetails__ItemLongDec
AddDetails__ItemLongDec = "0"
if(Details("ItemLongDec") <> "") then AddDetails__ItemLongDec =
Details("ItemLongDec")
Dim AddDetails__UnitCost
AddDetails__UnitCost = "0"
if(Details("UnitCost") <> "") then AddDetails__UnitCost =
Details("UnitCost")
Dim AddDetails__Qty
AddDetails__Qty = "0"
if(Details("Qty") <> "") then AddDetails__Qty = Details("Qty")
Dim AddDetails__PmtRecd
AddDetails__PmtRecd = "0"
if(Details("PmtRecd") <> "") then AddDetails__PmtRecd = Details("PmtRecd")
Dim AddDetails__Balance
AddDetails__Balance = "0"
if(Details("Balance") <> "") then AddDetails__Balance = Details("Balance")
Dim AddDetails__Apmntydate
AddDetails__Apmntydate = "01/01/1900"
if(Details("apymntdate") <> "") then AddDetails__Apmntydate =
Details("apymntdate")
%>
<%
set AddDetails = Server.CreateObject("ADODB.Command")
AddDetails.ActiveConnection = MM_eimmigration_STRING
AddDetails.CommandText = "dbo.AddLinestoInvoiceDetails"
AddDetails.Parameters.Append AddDetails.CreateParameter("@RETURN_VALUE", 3,
4)
AddDetails.Parameters.Append AddDetails.CreateParameter("@InvoiceId", 3,
1,4,AddDetails__InvoiceId)
AddDetails.Parameters.Append AddDetails.CreateParameter("@CaseId", 3,
1,4,AddDetails__CaseId)
AddDetails.Parameters.Append AddDetails.CreateParameter("@ItemId", 200,
1,10,AddDetails__ItemId)
AddDetails.Parameters.Append AddDetails.CreateParameter("@Itemdesc", 200,
1,250,AddDetails__Itemdesc)
AddDetails.Parameters.Append AddDetails.CreateParameter("@ItemLongDec", 200,
1,300,AddDetails__ItemLongDec)
AddDetails.Parameters.Append AddDetails.CreateParameter("@UnitCost", 6,
1,8,AddDetails__UnitCost)
AddDetails.Parameters.Append AddDetails.CreateParameter("@Qty", 3,
1,4,AddDetails__Qty)
AddDetails.Parameters.Append AddDetails.CreateParameter("@PmtRecd", 6,
1,8,AddDetails__PmtRecd)
AddDetails.Parameters.Append AddDetails.CreateParameter("@Balance", 6,
1,8,AddDetails__Balance)
AddDetails.Parameters.Append AddDetails.CreateParameter("@Apmntydate", 7,
1,8,AddDetails__Apmntydate)
AddDetails.CommandType = 4
AddDetails.CommandTimeout = 0
AddDetails.Prepared = true
AddDetails.Execute()
%>
<%
Details.movenext
wend
%>
Any help is greately appreciated.
Z
Hope someone can help me. I have a stored procedure which copies data from a
recordset into a table. It worked fine, but as soon as I added one more
field (datetime) it crashes and gives the error below, I searched for this
error on the net but I got hits on solutions that have nothing to do with
this. If I take the date field out of the SP it works fine.
ERROR -------
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E21)
[Microsoft][ODBC SQL Server Driver]Optional feature not implemented
/bluedot2004/Intranet/Cases/Billing/Invoices/SaveInvoiceNew.asp, line 202
---------
This is the code for the SP with the date field included, which gives the
error above:
---------------
<%while not Details.eof
'execute SP
%>
<%
Dim AddDetails__InvoiceId
AddDetails__InvoiceId = "0"
if(Session("InvoiceId") <> "") then AddDetails__InvoiceId =
Session("InvoiceId")
Dim AddDetails__CaseId
AddDetails__CaseId = "0"
if(Details("CaseId") <> "") then AddDetails__CaseId = Details("CaseId")
Dim AddDetails__ItemId
AddDetails__ItemId = "0"
if(Details("ItemId") <> "") then AddDetails__ItemId = Details("ItemId")
Dim AddDetails__Itemdesc
AddDetails__Itemdesc = "0"
if(Details("Itemdesc") <> "") then AddDetails__Itemdesc =
Details("Itemdesc")
Dim AddDetails__ItemLongDec
AddDetails__ItemLongDec = "0"
if(Details("ItemLongDec") <> "") then AddDetails__ItemLongDec =
Details("ItemLongDec")
Dim AddDetails__UnitCost
AddDetails__UnitCost = "0"
if(Details("UnitCost") <> "") then AddDetails__UnitCost =
Details("UnitCost")
Dim AddDetails__Qty
AddDetails__Qty = "0"
if(Details("Qty") <> "") then AddDetails__Qty = Details("Qty")
Dim AddDetails__PmtRecd
AddDetails__PmtRecd = "0"
if(Details("PmtRecd") <> "") then AddDetails__PmtRecd = Details("PmtRecd")
Dim AddDetails__Balance
AddDetails__Balance = "0"
if(Details("Balance") <> "") then AddDetails__Balance = Details("Balance")
Dim AddDetails__Apmntydate
AddDetails__Apmntydate = "01/01/1900"
if(Details("apymntdate") <> "") then AddDetails__Apmntydate =
Details("apymntdate")
%>
<%
set AddDetails = Server.CreateObject("ADODB.Command")
AddDetails.ActiveConnection = MM_eimmigration_STRING
AddDetails.CommandText = "dbo.AddLinestoInvoiceDetails"
AddDetails.Parameters.Append AddDetails.CreateParameter("@RETURN_VALUE", 3,
4)
AddDetails.Parameters.Append AddDetails.CreateParameter("@InvoiceId", 3,
1,4,AddDetails__InvoiceId)
AddDetails.Parameters.Append AddDetails.CreateParameter("@CaseId", 3,
1,4,AddDetails__CaseId)
AddDetails.Parameters.Append AddDetails.CreateParameter("@ItemId", 200,
1,10,AddDetails__ItemId)
AddDetails.Parameters.Append AddDetails.CreateParameter("@Itemdesc", 200,
1,250,AddDetails__Itemdesc)
AddDetails.Parameters.Append AddDetails.CreateParameter("@ItemLongDec", 200,
1,300,AddDetails__ItemLongDec)
AddDetails.Parameters.Append AddDetails.CreateParameter("@UnitCost", 6,
1,8,AddDetails__UnitCost)
AddDetails.Parameters.Append AddDetails.CreateParameter("@Qty", 3,
1,4,AddDetails__Qty)
AddDetails.Parameters.Append AddDetails.CreateParameter("@PmtRecd", 6,
1,8,AddDetails__PmtRecd)
AddDetails.Parameters.Append AddDetails.CreateParameter("@Balance", 6,
1,8,AddDetails__Balance)
AddDetails.Parameters.Append AddDetails.CreateParameter("@Apmntydate", 7,
1,8,AddDetails__Apmntydate)
AddDetails.CommandType = 4
AddDetails.CommandTimeout = 0
AddDetails.Prepared = true
AddDetails.Execute()
%>
<%
Details.movenext
wend
%>
Any help is greately appreciated.
Z