passing correct value types from ASP/VBScript to VB/DLL

T

thisis

Hi All,

I'm getting an error on my ASP page:

Microsoft VBScript runtime error '800a000d'
Type mismatch: 'StoreFileIntoField'

I assume - 99.5% - the error is generated because of worng value types,
I attemp to pass from my ASP/VBScript page to the VB/DLL function.

My relevant ASP/VBScript Code is:

<%
sTemp = "SomeStringOK"
mcsSQL = "select * from tbl1"

' creates an object ref to the VB/DLL function
Set obj = Server.CreateObject("SaveCreateFileADO.cStoreCreateFileADO")

' creates a ref' to my recordset object
Set rs = Server.CreateObject("ADODB.Recordset")

' openning the recordset with values of the string connection
rs.Open mcsSQL, mConn, 1, 3

With rs
..AddNew
If Not .EOF Then
'VB5: Dim fldFileName As ADODB.Field
'VB5: Set fldFileName = .Fields![sFileName] 'set reference to this
field
' vbscript:
Set fldFileName = rs("sFileName")

'VB5: Dim fldLongBinary As ADODB.Field
'VB5: Set fldLongBinary = .Fields![oPicture] 'set a reference to the
file field
' vbscript:
Set fldFileName = rs("oPicture")

rs("desc")= now() & "hello"

With obj
' call the VB/DLL
' THIS IS the line that generates the ERROR
If .StoreFileIntoField(rs, fldFileName, fldLongBinary, sTemp) Then
' do something End If
End With
End If
..Update
..Close
End With

%>

The Function in the VB/DLL is - returns a boolean value -
StoreFileIntoField(rs, fldFileName, fldLongBinary, sTemp)
suppose to get THESE values types:
rs VB5: As New ADODB.Recordset
fldFileName VB5: As ADODB.Field
fldLongBinary VB5: As ADODB.Field
sTemp VB5: As String

My Question is :

How do I pass the correct value types from ASP/VBScript to VB/DLL,
using this notion of ADO/ASP 2.0 syntex on PWS 4.0?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top