Send query to online mySQL Database
Hi, been searching the fourms for a good anwser but I didn't come up with anything...
Basically I need to send queries to an external mySQL database via VB6. My questions are:
- How do I connect to a mySQL database? Which controller or referance is best?
- How do I send queries to the database and store them in variables? (clean cut, each query should only return one value as a double)
Havn't done Vb in a while so giant newb anwsers would be helpful.
:D Thanks for any response.
Re: Send query to online mySQL Database
welcome back, Illiad
use ado to connect to the database. search for ado in this forum. there are lots of examples for the connections and queries.
Re: Send query to online mySQL Database
Re: Send query to online mySQL Database
Okay, searching ADO is get code samples like this.
VB Code:
Dim rsMyRecordSet As ADODB.Recordset
Dim sSQL As String
Set rsMyRecordSet = New ADODB.Recordset
sSQL = "SELECT field FROM table....etc"
rsMyRecordSet.Open sSQL, CurrentProject.Connection
I'm trying to decipher it piece by piece, sSQL seems to by the query I want to send and the last line apparently sends the query I'm assuming. Where am I supposed to input all the connection parapamters such as IP, login name, password, etc?
Moreover, how do I manipulate this record set object after I get the response?
Re: Send query to online mySQL Database