Type Mismatches

Results 1 to 3 of 3

Thread: Type Mismatches

  1. #1
    Gates VP Guest

    Default Type Mismatches

    I&#039;ve got 3 COM objects working together: an Oracle object, an Oracle Connection object and a Business Object. These objects work together something like this:<BR><BR>(1) OracleObject.CreateDataBasePool<BR>(2) OracleConnection.ConnectWebUser sName,sPassword,OracleObject<BR>(3) BusinessObject.DBConnect OracleConnection<BR><BR>I&#039;ve currently got this deployed on two different servers. All the DLLs exist, everything is there, the objects are fully functional, I can access all their properties and methods, the Metadata tags are correct, etc...<BR><BR>The funny thing is where I get the errors. My local web server gets a mismatch at line (2). But only through ASP, this line works in VB. My external web server (the one that will eventually be used), gets a mismatch at line (3). A third computer that I tested on worked smoothly, without a hiccup through all three of the above lines.<BR><BR>The code is identical everywhere, so this means that error must be somewhere else. Does anybody know something else that could cause a major type mismatch error? global.asa? registry key? IIS setting?<BR><BR>It may help to note that the external web server has the same basic code running smoothly in a different directory on the same server.<BR><BR>Any suggestions greatly appreciated;<BR>Gates VP

  2. #2
    Karin van Ettinger Guest

    Default RE: Type Mismatches

    Type mismatches are very usual. One of the reasons of type mismatch occurs when the components are not registered okay. I mean you all ready registered it but changed and the IID&#039;s or CLSID&#039;s has changed for some reason.<BR><BR>I can&#039;t suggest any other thing on this moment because your description concerning the way you call your components is not clear. Calling from ASP is different from calling from VB because scripting languages datatyping isn&#039;t strong.

  3. #3
    Hems Guest

    Default RE: Type Mismatches

    Check for data types in com objects you are using.<BR>For example.<BR>OracleConnection.ConnectWebUser sName,sPassword,OracleObject<BR>sName,sPassword are variant datatype in ASP, if you declare them as dim sName,sPassword.<BR>In your COM object(developed in VB or VC++ or what ever) sName,sPassword may be String<BR>If so try using<BR>OracleConnection.ConnectWebUser cstr(sName),cstr(sPassword),OracleObject<BR>Here is another problem, you are passing OracleObject to your OracleConnection.ConnectWebUser. ASP will not understand the datatype of OracleObject, it will treat it as variant.<BR>so you will have to write explicitly<BR>OracleConnection.ConnectWebUser cstr(sName),cstr(sPassword),the statement that creates the Oracle object.<BR>I DON&#039;T WANT TO CONFUSE YOU, I HAD THE SAME PROBLEM AND I CORRECTED IT.<BR>for e.g my ASP code goes like this<BR>1. dim Sess,sessobj,userobj,appName<BR>2.set Sess = server.createobject("Common.SessionManager")<BR>3. set sessobj = Sess.GetSession("appname")<BR>4.set userobj = server.createobject("Common.Users")<BR>5.userobj.A ddUser appName,sessobj<BR>now at line 5 I got type mismatch error<BR>I changed it to<BR>userobj.AddUser cstr(appName), Sess.GetSession("appname")<BR> since the AddUser Method in userobj has<BR>public function AddUser(appName as string, sessobj as Common.Session)<BR><BR>I hope you got it<BR>Thanx <BR><BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts