473,756 Members | 2,703 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

2 New Member
Hi All,

I'm getting an error on my ASP page:

Microsoft VBScript runtime error '800a000d'
Type mismatch: 'StoreFileIntoF ield'


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 = "SomeString OK"
mcsSQL = "select * from tbl1"

' creates an object ref to the VB/DLL function
Set obj = Server.CreateOb ject("SaveCreat eFileADO.cStore CreateFileADO")

' creates a ref' to my recordset object
Set rs = Server.CreateOb ject("ADODB.Rec ordset")

' 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 .StoreFileIntoF ield(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 -
StoreFileIntoFi eld(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?
Oct 17 '06 #1
0 1888

Sign in to post your reply or Sign up for a free account.

Similar topics

7
72166
by: Jonas Daunoravicius | last post by:
The subject pretty much sums up what I need to do. Here is what I have so far, but still can't figure out how to get it working: <script language="javascript" type="text/javascript"> function fillForm() { // split the query string into pieces var qs = location.search.substr(location.search.indexOf("?")+1); qs = qs.split("&"); alert(qs); // qs is the variable that I need to pass into a
2
13435
by: Ken Layton | last post by:
Attempting to pass a VBScript Array of Bytes to a C# Managed COM object has resulted in some very undesirable and strange behavior. When definining a method in my C# COM class as "void Write(byte bBytes)" or "void Write(byte bBytes, int nLen)" or "int Write(byte bBytes, int nLen)"VBScript returns a "Invalid procedure call or argument" exception. However when I define the method as "int Write(byte bBytes)" it works just fine. Unfortunately...
58
10176
by: jr | last post by:
Sorry for this very dumb question, but I've clearly got a long way to go! Can someone please help me pass an array into a function. Here's a starting point. void TheMainFunc() { // Body of code... TCHAR myArray; DoStuff(myArray);
13
2796
by: Maxim | last post by:
Hi! A have a string variable (which is a reference type). Now I define my Method like that: void MakeFullName(string sNamePrivate) { sNamePrivate+="Gates" }
3
3794
by: Mark | last post by:
Hi From what I understand, you can pass arrays from classic ASP to .NET using interop, but you have to change the type of the.NET parameter to object. This seems to be because classic ASP passes a variant containing an array, and interop expects a parameter of type object if you are passing a variant (you are expected to cast it to the correct type in your code). I'd like to find a way of passing arrays so that you don't need to change...
12
2684
by: Andrew Bullock | last post by:
Hi, I have two classes, A and B, B takes an A as an argument in its constructor: A a1 = new A(); B b = new B(a1);
0
1176
by: greg | last post by:
We have a set of .NET web services to provide access to our data. They use complex data types for both incoming data and return data. We are attempting to help another group access this web service from vbscript/ASP. Is this possible? I have found a few posts scattered around the internet saying complex data types aren't possible with vbscript. Is this true? Can I manually create my XML document in the vbscript, pass it to the web...
0
1620
by: thisis | last post by:
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.
0
1489
by: thisis | last post by:
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.
0
9431
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9255
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
9819
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9689
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8688
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7226
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6514
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5119
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3326
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.