contents   index   previous   next



SimpleDataset()

syntax:

new SimpleDataset(database, table, username, password)

where:

database - The name of the ODBC database to open. On Windows systems using ODBC, this is specified in the ODBC Administrator Control Panel; on UNIX, in the .odbc.ini file. See your database or system administrator for more information.

 

table - the name of the database table to use.

 

username - name of the user to connect to the database. Some relational database management systems (RDBMS) require that this be the same as your operating system login name; others maintain their own collections of valid user names. If in doubt, see your system administrator.

 

password - user's password. If the database does not require a password, use an empty string.

 

return:

object - a new SimpleDataset, or null on error.

 

description:

Constructor for the SimpleDataset object. When the SimpleDataset is created, it contains all of the elements in the table. The current element is set to the one "before" the first element in the dataset (and thus is "out of range").

 

see:

#include <smdtset.jsh>

 

example:

// create a SimpleDataset connected to the database

// named "corporate", table named "clients" using

// the username "ADMIN" and the password

// "admin-password"

var ds = new SimpleDataset("corporate", "clients",

                       "ADMIN", "admin-password");

 


SimpleDataset close()