![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hello All, I'm just starting out with using UniObjects to read a UniVerse database through VB 6.0, and I've run into a problem. I can set up a plain, simple record ID and read it from an open file into a UniDynArray object, as follows: F_ER.RecordId = EID F_ER.Read Set ER_Rec = F_ER.Record In this case, EID may equal "000002311", for example. The problem arises when I try to read a record with a key that has asterisks (*) in it. It will work if I hard-code the key, but if I build it from other variables, it will not work. Example: EHKey = HistoryYear & "*" & EID & "*" & DNRNum & "*" & TaxRateCode F_EH.RecordId = EHKey F_EH.Read Set EH_Rec = F_EH.Record This gives me an empty record in EH_Rec. However, if I try: EHKey = "1997*000002311*2*SK" F_EH.RecordId = EHKey F_EH.Read Set EH_Rec = F_EH.Record it works fine. I have tried tried the following: EHKey = HistoryYear & "*" & EID & "*" & DNRNum & "*" & TaxRateCode Check_EHKey = "1997*000002311*2*SK" If EHKey = Check_EHKey Then MsgBox "They Match!" End If and the system says that the "Built" key and the "Hard-coded" key match eachother. I've also tried replacing the "*" above with chr(42), to no avail. So, does anyone have any suggestions as to why can't I build the key from other variables and read it in? I'm sure it's something simple - like I said, I'm just starting with this. Thanks. Dave |
![]() |
| Thread Tools | |
| Display Modes | |
| |