Tricky problem in ASP

Results 1 to 4 of 4

Thread: Tricky problem in ASP

  1. #1
    Join Date
    Dec 1969

    Default Tricky problem in ASP

    Hello,<BR>I have an ASP that gives me a strange error:<BR>&#039;The application is using a value of the wrong type for the current operation.&#039;<BR><BR>background:<BR>Option explicit is set<BR>On error resume next is set<BR>&#039;result&#039; is defined<BR>&#039;objEntities&#039; is created using CreateObject<BR><BR>The error occurs on a line:<BR>result = objEntities.Accounts.Add(S_SessionID, objAccount)<BR><BR>There is no problem with the object creation because<BR><BR>&#060;something&#062; = objEntities.Accounts.Getdetails(......)<BR>works fine.<BR><BR>Just to eliminate the possiblity that the COM DLL that provided the object might have an error, I called the same method<BR>from a VB test program and it works fine.<BR><BR>The only source of problem is that the DLL runs under MTS and the Accounts class is Public non creatable. If this is the problem,, then why does the call on GetDetails work fine?<BR>(the Account class [as against the accounts class, notice the s] is MultiUse) the objAccount has all the values properly set.

  2. #2
    Join Date
    Dec 1969


    this is already in the ASP forum.<BR><BR>j

  3. #3
    Anti-Lamer Guest

    Default Lamer ALERT!

    Lamers and nit-pickers abound.

  4. #4
    daveod Guest

    Default RE: Tricky problem in ASP

    Hi , <BR><BR>Might is be that you need to explicity Cast the values going into the component to whatever is expected , ie<BR>result = objEntities.Accounts.Add(Cint(S_SessionID), objAccount) <BR><BR>I know that asp should / can only use variants but I ran into a similiar issue & this sorted it.<BR><BR>cheers<BR>Dave

Posting Permissions

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