2010-03-11, 04:30 PM
Omni Wrote:Strangely, that looks easier to understand than VB. I looked at that 'code' and it made sense. I stare at VB's, and I just sorta cringe. Thanks for the advice, because I have to take a class of SQL eventually, and I wanted to prepare.
Actually the VB version of what Fiel just wrote is pretty simple too;
Code:
set rs = CreateObject("ADODB.Recordset")
cn = "Driver={mySQL};Server=myServerAddress;Port=3306;Option=131072;Stmt=; Database=myDataBase; User=myUsername;Password=;"
sSQL = "SELECT spam, eggs, sausage FROM breakfast WHERE price < 5"
rs.open sSQL, cn
debug.print rs.getstring ()

