Hi,
I have an application in ACCESS 2010 that works on database that I made based on a guild in WoW. I have written a procedure that is supposed to updated a guild roster and add new members.
I cannot work out the text comparison. The procedure always duplicates records. I compare guild names from current database (Text a field) with a string extracted from a JSON object that collect information from internet stored in JSON format. The JSON functions work because I tested them in Excel. I have tried trivial comparisons such as str1 = str2. It did not work. Therefore, I look for a function and found
but it also did not work. Both text may have Unicode non standard characters, though. When I used vbBinaryCompary, I got error "No current record". I spent the whole week to make it work but I am running out of ideas how to test the procedure and get rid of faulty pieces of codes.
If someone would have a look at the code - specially UpdateRoster(), I would be really grateful. I am sure the code is far from ideal but I am learning. The code is somehow collection of solutions I've found in internet.
The application.
The form has a button "Update" that runs "UpdateRoster" procedure. This procedure originally updates the tables: tblMembers, tblMemberPrimary, and tblMemberSecondary but at the moment I operate on their copies.
I am open to all criticisms regarding the code. I am sure it can be done much better.
Thanks
Attachment:
Phoenix_Rising.accdb
I have an application in ACCESS 2010 that works on database that I made based on a guild in WoW. I have written a procedure that is supposed to updated a guild roster and add new members.
I cannot work out the text comparison. The procedure always duplicates records. I compare guild names from current database (Text a field) with a string extracted from a JSON object that collect information from internet stored in JSON format. The JSON functions work because I tested them in Excel. I have tried trivial comparisons such as str1 = str2. It did not work. Therefore, I look for a function and found
Code:
StrComp(str1, str2, vbTextCompare)
If someone would have a look at the code - specially UpdateRoster(), I would be really grateful. I am sure the code is far from ideal but I am learning. The code is somehow collection of solutions I've found in internet.
The application.
The form has a button "Update" that runs "UpdateRoster" procedure. This procedure originally updates the tables: tblMembers, tblMemberPrimary, and tblMemberSecondary but at the moment I operate on their copies.
I am open to all criticisms regarding the code. I am sure it can be done much better.
Thanks
Attachment:
Phoenix_Rising.accdb