I just don't understand B4a anymore. Yesterday the program worked fine today it doesn't.
Here's what's happening.
I have a folder with photos they are numbered 00001.jpg on up to 10155.jpg this number are that same as my members number 00001 matches the jpg for the photo.
The data is loaded without the leading zeros my member number is 08142 is loads as 8142 I do a file.exists to see if there is a photo in the photo folder and if no photo exists I display a noimage.jpg.
Today when I do the file.exists on my number 8142 it doesn't find the photo. In the photo folder the photo is 01842.jpg. Yesterday I didn't need the leading zero today it seems to have to have the leading zero. I guess what I'm going to have to do is check the length of the Id and if it's four or less add leading zeros. If that can be done. Or can someone tell me why I'm having this problem.
If I do a search in the photo folder the search doesn't need leading zeros to find the photo I search 8142.jpg and it's there.
In testing my app in the file.exists command I've put the actual number in 8142.jpg and it didn't find the photo when I entered it as 08142.jpg it did find it. That was how I determined the I now needed leading zeros.
If I had hair I'd be pulling it out.
Here's what's happening.
I have a folder with photos they are numbered 00001.jpg on up to 10155.jpg this number are that same as my members number 00001 matches the jpg for the photo.
The data is loaded without the leading zeros my member number is 08142 is loads as 8142 I do a file.exists to see if there is a photo in the photo folder and if no photo exists I display a noimage.jpg.
Today when I do the file.exists on my number 8142 it doesn't find the photo. In the photo folder the photo is 01842.jpg. Yesterday I didn't need the leading zero today it seems to have to have the leading zero. I guess what I'm going to have to do is check the length of the Id and if it's four or less add leading zeros. If that can be done. Or can someone tell me why I'm having this problem.
If I do a search in the photo folder the search doesn't need leading zeros to find the photo I search 8142.jpg and it's there.
In testing my app in the file.exists command I've put the actual number in 8142.jpg and it didn't find the photo when I entered it as 08142.jpg it did find it. That was how I determined the I now needed leading zeros.
If I had hair I'd be pulling it out.