In advanced; Pardon any errors in my use of terminology concerning VB 2008 Express and the MySQqlDataAdapter.
I wrote a series of applications in VB 2008 that access a MySQL database and perform front end operations on that database. Everything works just fine... Read, Update, Add, Delete queries work just fine BUT...
I ran into a little snag that I can't figure out the cause of it. I am hoping someone can shed some light on the cause so I can better understand this issue and either code around it or improve my best practices for this kind of work.
The problem arose when tried a select method on a datatable filled inside a dataset. I used the select method to query a result of rows that matched a field. It's a vendor database where all but one vendor number is 5-7 digits. The one vendor has a 3 digit number. Anyway, for some reason, I do not return any datarows using that 3 digit vendor number, yet I have success when trying it with 5-7 digit numbers. When I tried the query on my MySql database using phpmyadmin, it works fine.
So to bandaid fix the problem, I changed the 3-digit vendor number to a five digit number, padding it with zeros, as in "619" to "00619" and then I returned datarows on the select method.
So my question is... are there limits to the select method? Like a minimum of characters needed to return a result? Is this a bug? Is there a parameter I'm missing somewhere?
I know you all like code to see so if someone responds, I'll post it. The setup code for the global connection, dataset, loading of the datatables, etc is rather extensive but I don't mind doing it. Just thought the question and scenario might trigger a quick answer.
My project is working fine with the bandaid fix, but I have this nagging urge to figure out why it didn't work before the fix so I can try to code to avoid this problem down the road.
Thank you so much for your time!
Hop
I wrote a series of applications in VB 2008 that access a MySQL database and perform front end operations on that database. Everything works just fine... Read, Update, Add, Delete queries work just fine BUT...
I ran into a little snag that I can't figure out the cause of it. I am hoping someone can shed some light on the cause so I can better understand this issue and either code around it or improve my best practices for this kind of work.
The problem arose when tried a select method on a datatable filled inside a dataset. I used the select method to query a result of rows that matched a field. It's a vendor database where all but one vendor number is 5-7 digits. The one vendor has a 3 digit number. Anyway, for some reason, I do not return any datarows using that 3 digit vendor number, yet I have success when trying it with 5-7 digit numbers. When I tried the query on my MySql database using phpmyadmin, it works fine.
So to bandaid fix the problem, I changed the 3-digit vendor number to a five digit number, padding it with zeros, as in "619" to "00619" and then I returned datarows on the select method.
So my question is... are there limits to the select method? Like a minimum of characters needed to return a result? Is this a bug? Is there a parameter I'm missing somewhere?
I know you all like code to see so if someone responds, I'll post it. The setup code for the global connection, dataset, loading of the datatables, etc is rather extensive but I don't mind doing it. Just thought the question and scenario might trigger a quick answer.
My project is working fine with the bandaid fix, but I have this nagging urge to figure out why it didn't work before the fix so I can try to code to avoid this problem down the road.
Thank you so much for your time!
Hop
Last edited: