ADODC SQL question - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

ADODC SQL question

snoburnssbsnoburnssb Posts: 11Member
[b][red]This message was edited by snoburnssb at 2005-5-9 21:1:25[/red][/b][hr]
ok, so i finally get how to do mysql with adodc, but is there any way to get the results of a query directly from the adodc control in array form? like:

adodc.recordsource = "SELECT * FROM table WHERE '1'"
for n = 1 to adodc.recordset.recordcount
results(n) = adodc.recordset(n)
next n

*** if you are familiar with PHP, like:
$query = "SELECT * FROM table WHERE '1'";
$results = mysql_query($query);
$results2 = mysql_fetch_array($results);


Comments

  • infidelinfidel Posts: 2,900Member
    : [b][red]This message was edited by snoburnssb at 2005-5-9 21:1:25[/red][/b][hr]
    : ok, so i finally get how to do mysql with adodc, but is there any way to get the results of a query directly from the adodc control in array form? like:
    :
    : adodc.recordsource = "SELECT * FROM table WHERE '1'"
    : for n = 1 to adodc.recordset.recordcount
    : results(n) = adodc.recordset(n)
    : next n
    :
    : *** if you are familiar with PHP, like:
    : $query = "SELECT * FROM table WHERE '1'";
    : $results = mysql_query($query);
    : $results2 = mysql_fetch_array($results);

    No, Recordset objects are like cursors in a database. You have to use the .MoveFirst, .MovePrevious, .MoveNext, and .MoveLast methods to navigate them.


    [size=5][italic][blue][RED]i[/RED]nfidel[/blue][/italic][/size]

    [code]
    $ select * from users where clue > 0
    no rows returned
    [/code]

Sign In or Register to comment.