Firstly, please let me apologise if what I have written below is too much chapter’n’verse: I don’t want to fall into the trap of providing too little info and then you guys having to extract teeth to get what you need…but, in doing so, I may well have fallen into the trap of being too verbose.
Where I am
I have my own database which helps me run my micro business. It’s not very pretty and it’s missing a lot of functionality but it works for me. Nevertheless, I recently decided (I have no idea why now) to start pushing the development along.
The key data area is my customers: the main display form is bound to tblCustomers although that form does also drag in related data via various sub forms. The thing is that my customer IDs have always been alphanumeric because that mimics the customer references we use for our hard copy files.
As part of this re-development and based on what I have read here and elsewhere, I decided to create numeric IDs for the customer records (whilst retaining the alphanumeric codes but removing this field as the primary key).
So far, that hasn’t been a problem and I have happily imported tblCustomers and various smaller tables into the new back end. These are all fairly small (<500 records each typically) and I have done this via Excel where I have been able to add the new numeric codes using lookups so it’s been a painless exercise so far.
The problem
I now have 3 much bigger tables to import, all well over 10k records and all of course currently linked to the alphanumeric ID. I know that volume probably doesn’t seem that much in itself but the added complication is that each of these tables includes Memo / Long Text fields, which (I think) means that I can’t repeat the Excel trick as the narratives in those fields would be truncated doing that?
So I think I would need to import directly into the new back end and then amend the foreign key fields within Access?
Possible solutions
#1: Abandon the numeric ID and revert to using an alphanumeric one. I’ve used the database with alphanumeric IDs for 10 or 15 years without issue, so I am wondering why I’m now creating this pain for myself. What I am hoping you guys can tell me is whether or not I should grit my teeth on numeric IDs and see it through or whether, practically speaking for a low volume, low intensity database like mine, the real life answer is to live with the seemingly slight (as far as I can tell) issues caused by non-numeric IDs?
#2: Continue with numeric IDs, which would mean direct import into the new back end and then running an update query for every customer in each of the 3 tables to add the new numeric ID to every record. That would be a lot of work even for my small database but I would be happy to do that if the argument for numerical IDs is a slam dunk. Just for reference, I estimate this would be something like 600 iterations of the update query (3 tables x say 200 customers past and present), so my worry is this is very likely to go wrong at some point.
#3: As a variation on #2, how easy would it be to write a procedure in VBA which a) reads all the alphanumeric and related numeric IDs into an array, and then b) loops through the array and automatically runs the SQL for each iteration? If someone could confirm that is feasible for a lower end intermediate like me to code, then I might well crack on with conversion to numeric IDs anyway even if the argument for them isn’t that convincing.
#4: Anything else I haven’t thought about? (I imagine that could be a long list).
I do hope you’ve been able to read to the end of my War and Peace and not die of terminal boredom in the meantime. Any and all answers would be very gratefully received!
Where I am
I have my own database which helps me run my micro business. It’s not very pretty and it’s missing a lot of functionality but it works for me. Nevertheless, I recently decided (I have no idea why now) to start pushing the development along.
The key data area is my customers: the main display form is bound to tblCustomers although that form does also drag in related data via various sub forms. The thing is that my customer IDs have always been alphanumeric because that mimics the customer references we use for our hard copy files.
As part of this re-development and based on what I have read here and elsewhere, I decided to create numeric IDs for the customer records (whilst retaining the alphanumeric codes but removing this field as the primary key).
So far, that hasn’t been a problem and I have happily imported tblCustomers and various smaller tables into the new back end. These are all fairly small (<500 records each typically) and I have done this via Excel where I have been able to add the new numeric codes using lookups so it’s been a painless exercise so far.
The problem
I now have 3 much bigger tables to import, all well over 10k records and all of course currently linked to the alphanumeric ID. I know that volume probably doesn’t seem that much in itself but the added complication is that each of these tables includes Memo / Long Text fields, which (I think) means that I can’t repeat the Excel trick as the narratives in those fields would be truncated doing that?
So I think I would need to import directly into the new back end and then amend the foreign key fields within Access?
Possible solutions
#1: Abandon the numeric ID and revert to using an alphanumeric one. I’ve used the database with alphanumeric IDs for 10 or 15 years without issue, so I am wondering why I’m now creating this pain for myself. What I am hoping you guys can tell me is whether or not I should grit my teeth on numeric IDs and see it through or whether, practically speaking for a low volume, low intensity database like mine, the real life answer is to live with the seemingly slight (as far as I can tell) issues caused by non-numeric IDs?
#2: Continue with numeric IDs, which would mean direct import into the new back end and then running an update query for every customer in each of the 3 tables to add the new numeric ID to every record. That would be a lot of work even for my small database but I would be happy to do that if the argument for numerical IDs is a slam dunk. Just for reference, I estimate this would be something like 600 iterations of the update query (3 tables x say 200 customers past and present), so my worry is this is very likely to go wrong at some point.
#3: As a variation on #2, how easy would it be to write a procedure in VBA which a) reads all the alphanumeric and related numeric IDs into an array, and then b) loops through the array and automatically runs the SQL for each iteration? If someone could confirm that is feasible for a lower end intermediate like me to code, then I might well crack on with conversion to numeric IDs anyway even if the argument for them isn’t that convincing.
#4: Anything else I haven’t thought about? (I imagine that could be a long list).
I do hope you’ve been able to read to the end of my War and Peace and not die of terminal boredom in the meantime. Any and all answers would be very gratefully received!