damianb123
asked on
Displaying MYSQL data on form - please help!
Hi,
I am developing an application using Visual Basic 5, I have a login form which hooks up to a MySQL database and a login form which checks the username and password, this works fine! What I next need to do is when the main form of the program loads, I need to pull back ALL records from a different table in the database in a sort of data set - the default ADO data set with VB5 does not have MySQL listed....
Does anyone have any ideas?
Cheers
I am developing an application using Visual Basic 5, I have a login form which hooks up to a MySQL database and a login form which checks the username and password, this works fine! What I next need to do is when the main form of the program loads, I need to pull back ALL records from a different table in the database in a sort of data set - the default ADO data set with VB5 does not have MySQL listed....
Does anyone have any ideas?
Cheers
ASKER
Thanks snowberry,
I already have a connection string, it's just more a case of how I display the rows as seperate rows within the form?
If I do something like:
text1.text = !first_name
It displays the first name correctly, but only for the LAST record in the table.....
Can you help?
I already have a connection string, it's just more a case of how I display the rows as seperate rows within the form?
If I do something like:
text1.text = !first_name
It displays the first name correctly, but only for the LAST record in the table.....
Can you help?
I'm not sure what you are asking. Do you want to use an ADO control or do all the connecting in the code? Do you want to move through records with a next/previous button, or have all records displayed on the one form?
ASKER
All of the above :-)
I would like to be able to go previous and next with the various text boxes laid out, and also have the option of displaying all on the form..... I know an ADO control is the best option, but I couldn't estab;ish how to use the control.
I already have a connection string, which works very well.....
I would like to be able to go previous and next with the various text boxes laid out, and also have the option of displaying all on the form..... I know an ADO control is the best option, but I couldn't estab;ish how to use the control.
I already have a connection string, which works very well.....
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If you need more help with
(a) specifying which data is loaded, e.g. "I only want records where a persons name starts with the letter A"; or
(b) how to actually show it, e.g. put each bit of data onto the form so the user can see it,
then just ask. I would need to know more about what data you are showing and how you want to show it. Also info about the tables in the database that you want to read, e.g. their names and the field names that you want to load.
(a) specifying which data is loaded, e.g. "I only want records where a persons name starts with the letter A"; or
(b) how to actually show it, e.g. put each bit of data onto the form so the user can see it,
then just ask. I would need to know more about what data you are showing and how you want to show it. Also info about the tables in the database that you want to read, e.g. their names and the field names that you want to load.
ASKER
Perfect, tweaked a little and got what I wanted. Thx
Provider=MSDASQL.1;Persist
Replace with your server and database.