Previous | Next | (P-PDF) JavaScript
Topic: database connection...nextRow()
Conf: (P-PDF) JavaScript, Msg: 104520
From: mctobey
Date: 1/24/2004 04:25 AM
I am having problems with the nextRow...for some reason sussess is undefined. Can anyone see what I am doing wrong here. thanks!! (the test part to to connect and get the fields in a table works fine.)
var myConnection = ADBC.newConnection("intranet");
var myTables = myConnection.getTableList();
var theTableName = myTables[0].name; //get name of the first table
var myColumnList = myConnection.getColumnList(theTableName);
var theNames = "";
for (var i = 0; i < myColumnList.length; i++)
theNames += myColumnList[i].name + "/r";
app.theNames);
var myStatement = myConnection.newStatement();
var mySQL = "SELECT * FROM \"whatsNew\"";
myStatement.execute("SELECT * FROM \"whatsNew\"");
//PROBLEM IS AROUND HERE SOMEPLACE THANKS!
var success = myStatement.nextRow();
app.success);
if (success){
var myRowObject = myStatement.getRow();
app."success");
}
while(myStatement.nextRow() == true){
myRowObject = myStatement.getRow();
}