Comm Object Programming

DanTheMan

Member
Joined
Jun 2, 2003
Messages
9
Location
Orem, Utah
Hey I got a comm object for a Valentina DB. I dont have the library header files and so I cant import the dll into ASP.Net. I got around that by calling server.createobject. Below is a snippet of code I am having trouble with.

For intCounter = 1 to vCursor.RecordCount
vField = vCursor.Field( intCounter )
strReturn = strReturn & vField.Value & "<br>"
vCursor.NextRecord()

Next

The big problem is I cannot assign a dynamic value to the Object vCursor.Field(). It keeps kicking out the error (System.Runtime.InteropServices.COMException: Field not found). Could this be an issue involving the order of processing? Its almost as if the object is being executed before a value is being assigned to intCounter, but I thought it executed line by line. I am totally stumped, I am hoping someone who has more experience using comm objects inside of asp.net will have a better idea. Also as a side note, this object was actually written for PHP.
 
If the Dll is a COM dll then you shouldnt need the header files to use it with ASP.Net, simply add a reference, select the COM Tab and browse to the DLL. Visual Studio should take care of wrapping the DLL for you.
 
Last edited by a moderator:
I apologize for being such a newb, I am not very familiar with Visual Studio.Net yet. So if I did something wrong let me know. I went into VS and opened up the OLE/COM Object Viewer and tried to bind the dll file. I recieved the following error, Bad Extension for File MK_E_INVALIDEXTENSION($800401E6). What am I doing wrong? Am I even close to what you suggested?
 
I am having another problem. After referencing the .dll I just noticed that I lost a class. For some reason it sees all the classes except one. I am not sure if it renamed the class or what, but I cant register the new .dll and I havent been able to figure out how I can view it in order to find out what happened to this class, any ideas?
 
Back
Top