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
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
LocName = ""
LocAddr1 = ""
LocAddr2 = ""
LocCity = ""
LocST = ""
LocZip = ""
Here is the stored procedure code that cmmFindLocationInfo executes:
SELECT LOC_NAME, LOC_ADDR1, LOC_ADDR2, LOC_CITY, LOC_ST, LOC_ZIP
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,