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

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

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.