Visual basic 6 .Seek NoMatch usign DAO Recordset
Posted on 2008-10-30
I have the following situation:
I'm reading a string "229050708073528073621000041597" and storing it as primary Key field1
but now I need to break the string into four fields
field1 ,field2 ,field3 ,field4
Original String "229050708,073528,073621,000041597"
Before I was storing the whole string and searching through it, to know if it already exists.
RecordsetA.index = "field1"
RecordsetA.seek =, string
if (RecordsetA.NoMatch) then
RecordsetA.field1 = string
It was working fine, but my question is since I can have several strings starting the same on field1 sample
field1 ,field2 ,field3 ,field4 field1 ,field2 ,field3 ,field4
String1 "229050708,073528,073621,000041597" String2 "229050708,051558,052032,000041597"
field1: 229050708 field1: 229050708
field2: 073528 field2: 051558
field3: 073621 field3: 052032
field4: 000041597 field4: 000041597
How can I still store and search by field1 and make sure it doesn't exist already
code snipet expected
Or any other suggestions are greatly appreciated