Visual Basic

Moderators: None (Apply to moderate this forum)
Number of threads: 18011
Number of posts: 55384

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
ADODC SQL question Posted by snoburnssb on 9 May 2005 at 9:00 PM
This message was edited by snoburnssb at 2005-5-9 21:1:25

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);


Report
Re: ADODC SQL question Posted by infidel on 10 May 2005 at 8:02 AM
: This message was edited by snoburnssb at 2005-5-9 21:1:25

: 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.


infidel

$ select * from users where clue > 0
no rows returned





 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.