Tengo otro pequeño engrollo en este código asp:
Sub AddToOrder(nOrderID, nProductID, nQuant)
sqlText = "INSERT INTO itemsordenes " _
& " (orderID, productID, cantidad) values " _
& " ("&nOrderID&", "&nProductID&", "&nQuant&")"
oConn.Execute(sqlText)
End Sub
de esta manera todo funciona correctamente pero al cambiar la sentencia SQL con el uso de una dll asi:
Sub AddToOrder(nOrderID, nProductID, nQuant)
Set dnfobjeto = Server.CreateObject("conection.anadircaraorden")
set Application = dnfobjeto.selectanadircaraorden(cint(nOrderID, nProductID, nQuant))
End Sub
Me devuelve el siguiente error:
Número de argumentos erróneo o asignación de propiedad no válida: 'cint'
El codigo de la clase de la dll es el siguiente:
Public Function selectanadircaraorden(ByVal nOrderID As Integer, ByVal nProductID As Integer, ByVal nQuant As Integer) As Recordset
Dim ConnectionString As String
Dim strsql As String
Dim rs As Recordset
ConnectionString = "Driver={SQL Server};Description=***;SERVER=***;UID=***;PWD=*** ;DATABASE=***"
Set rs = CreateObject("ADODB.Recordset")
strsql = "INSERT INTO itemsordenes(orderID, productID, cantidad) values (" & nOrderID & " , " & nProductID & ", " & nQuant & ")"
rs.Open strsql, adOpenDynamic, adLockOptimistic, admdTableDirect
Set selectanadircaraorden = rs
End Function
Donde estoy cometiendo el error?