"Run-time error 13: Type Mismatch" 
Author Message
 "Run-time error 13: Type Mismatch"

Hello,

I am trying to determine if a dataenvironment command executed successfully.  If
it did I want to save the selected SQL data into variables for use elsewhere in
my pgm.  If not, then i have to reset those same variables to nothing.  Here is
the code:

        Dim iTest As Variant

        iTest = deVMC_GTS.cmmFindLocationInfo(EquipLoc)
        If iResult = iSuccessful Then
            LocName = deVMC_GTS.rscmmFindLocationInfo!Loc_Name
            LocAddr1 = deVMC_GTS.rscmmFindLocationInfo!Loc_Addr1
            LocAddr2 = deVMC_GTS.rscmmFindLocationInfo!Loc_Addr2
            LocCity = deVMC_GTS.rscmmFindLocationInfo!Loc_City
            LocST = deVMC_GTS.rscmmFindLocationInfo!Loc_ST
            LocZip = deVMC_GTS.rscmmFindLocationInfo!Loc_Zip
        Else
            LocName = ""
            LocAddr1 = ""
            LocAddr2 = ""
            LocCity = ""
            LocST = ""
            LocZip = ""
        End If

Here is the stored procedure code that cmmFindLocationInfo executes:



        SELECT LOC_NAME, LOC_ADDR1, LOC_ADDR2, LOC_CITY, LOC_ST, LOC_ZIP
        FROM EQUIPLOC


                BEGIN


                END
        ELSE
                BEGIN


                END

deVMC_GTS.cmmFindLocationInfo's parameter properties settings are as follows:

         RETURN_VALUE  data type: adInteger   Host data type: Integer (VT_I2)  
         equip_loc     data type: adVarChar   Host data type: String (VT_BSTR)

I know that the equip_loc data types match up.  When I execute the command,
deVMC_GTS.cmmFindLocationInfo equip_loc, without trying to assign the result to
anything, it find the info I want.  The problem is when it doesn't find the info
I want.  In that case, when it goes to the next line of code to assign the
selected SQL data into variables it errs off because there is no data to be
assigned.  I really need to test to see if data was selected or not somehow.

Any help would be apreciated,

Thanks,
Theresa



Sun, 26 Oct 2003 03:37:33 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Run Time Error "13" Type Mismatch

2. Runtime error "13" - Type Mismatch

3. "Runtime Error 13 Data Type mismatch"

4. Type Mismatch Run-Time error 13

5. Type mismatch, run-time error #13

6. ACC2000:Run Time Error '13': Type Mismatch

7. Run -time error '13' Type Mismatch

8. Run-time error '13': Type mismatch

9. Run-time error '13': Type mismatch

10. Run-time error '13': Type mismatch

11. Run Time Error 13 Type Mismatch

12. run time error 13, data type mismatch !

 

 
Powered by phpBB® Forum Software