MySql question (1 Viewer)

bonekrusher

Registered User.
Local time
Yesterday, 20:47
Joined
Nov 19, 2005
Messages
266
Hi All,

I am trying to learn sequel strings and I have a question. How do i extract the value from this sql statement? Thanks!

Code:
Dim myconnection As ADODB.Connection
Dim myrecordset As New ADODB.Recordset
Set myconnection = CurrentProject.Connection

    myrecordset.ActiveConnection = myconnection
Dim answer As String
Dim mysql As String
    mysql = "SELECT Table1.Name, Table1.eMAIL FROM Table1 WHERE (([Table1]![Name]='jdoe'))"
 

checoturco

Registered User.
Local time
Yesterday, 20:47
Joined
Oct 17, 2005
Messages
76
if you put the query in the recordset you can get the fields


myrecordset.open "SELECT Table1.Name, Table1.eMAIL FROM Table1 WHERE (([Table1]![Name]='jdoe'))"

myrecordset("name") -> gives you the name
myrecordset("eMAIL") -> gives you the email

i thonk yhis works for you
 

bonekrusher

Registered User.
Local time
Yesterday, 20:47
Joined
Nov 19, 2005
Messages
266
Thanks! Works great. This help out a lot.

Bones
 

Users who are viewing this thread

Top Bottom