stefanRusterholz
Programmer
Hi. Sorry if I ask a stupid question, but I'm a Newbie to VB so please don't beat me ;-)
What I want to do:
open a specific database
run the sql "SELECT field1,field2 FROM mytable WHERE condition='true'" (just an example)
fetch the result directly into a variable (NOT into a datagrid or another visual component and fetch it then into a variable!)
For those who are familiar with PHP and mySQL, the corresponding code for what I want to do with VB was in PHP the following:
My primary problem is, that the book i bought always talks about putting all the data it got from the db into a datagrid or something like this but because there won't be a GUI (it's for a CGI) this is impossible.
I was very glad about every help you can provide
Stefan Rusterholz
What I want to do:
open a specific database
run the sql "SELECT field1,field2 FROM mytable WHERE condition='true'" (just an example)
fetch the result directly into a variable (NOT into a datagrid or another visual component and fetch it then into a variable!)
For those who are familiar with PHP and mySQL, the corresponding code for what I want to do with VB was in PHP the following:
Code:
mysql_pconnect(...);
$result = mysql_db_query($db_name, "SELECT field1,field2 FROM mytable where condition='true'");
while ($row = mysql_fetch_array($result)){
#do something with what I got in $row
}
My primary problem is, that the book i bought always talks about putting all the data it got from the db into a datagrid or something like this but because there won't be a GUI (it's for a CGI) this is impossible.
I was very glad about every help you can provide
Stefan Rusterholz