Tricky problem with ASP

Results 1 to 2 of 2

Thread: Tricky problem with ASP

  1. #1
    Join Date
    Dec 1969

    Default Tricky problem with 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

    Default RE: Tricky problem with ASP

    This error normally means that one of the parameters is of the wrong datatype. Remember ASP stores all parameters as variants unless expicitly set. Try using cstr/cint/clng on the parameters that you are passing in to make sure that they match the type of parameters that the method call expects.

Posting Permissions

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