Opens a Recordset object.
ConnectionObject.Open(Recordset, Source, Cursor Location, Cursor Type, Lock Type, Command Type)
Newlook Smartclient
Newlook Server
If the Recordset contains no records, both the BOF property and EOF property are set to True, and the current record position is undefined. You can still add new data to this empty Recordset object.
When you have concluded your operations over an open Recordset object, use the Close method to free any associated system resources.
Recordset - (literal, Required)
Specifies the name of the Recordset to be opened. The recordset will be referred to by this name in all subsequent DB methods. For example, your Recordset name might be "CustomerDetailsRS".
Source - (literal, Required)
Specifies the source of the recordset. For DDM data sources, this argument specifies the database file, and optionally the member. For ADO data sources, this argument is interpreted according to the value of the Command Type argument, described below. To specify the source as an expression, prefix the source with an equals (=) sign
Cursor Location - (Integer, Required)
Specifies the location of the cursor service for the recordset. Use one of the following pre-defined Cursor Location constants.
This argument is ignored for DDM data sources.
Cursor Type - (Integer, Required)
Specifies the type of cursor to be used for the recordset. Use one of the following pre-defined Cursor Type constants.
This argument is ignored for DDM data sources.
Lock Type - (Integer, Required)
Specifies the type of locks placed on records during editing. Use one of the following pre-defined Lock Type constants.
This argument is ignored for DDM data sources.
Command Type - (Integer, Required)
Specifies how the source argument should be interpreted. Use one of the following pre-defined Command Type constants.
This argument is ignored for DDM data sources.
The following example connects to and opens an Access database called "crm.mdb" using the MS Jet database driver. VBSCRIPTsConnectString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=@test\crm.mdb;Mode=Share Deny None;Persist Security Info=False"
SampleConnection.Open "SampleRecordset", "Table1", nlDBUseClient, nlDBOpenDynamic, nlDBLockReadOnly, nlDBCmdTable
JSCRIPTvar sConnectString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=newlooksdk/newlookSDK.mdb;Persist Security Info=False"; App.DbConnect("SampleConnection", nlDBServerADO, sConnectString); SampleConnection.Open("SampleRecordset", "newlookSDK", nlDBUseServer, nlDBOpenKeyset, nlDBLockReadOnly, nlDBCmdTable);
The following example connects to and opens an Access database called via a Data Source Name (DSN) "MS Access Database" JSCRIPTvar sConnectString = "Provider=MSDASQL.1;Persist Security Info=False;Extended Properties=DSN=MS Access Database;DBQ=newlookSDK/newlookSDK.mdb;DriverId=25;FIL=MS Access;MaxBufferSize=2048;PageTimeout=5;UID=admin;"; App.DBConnect("Sample Connection", nlDBServerADO, sConnectString); SampleConnection.Open("SampleRecordset", "newlookSDK", nlDBUseServer, nlDBOpenKeyset, nlDBLockReadOnly, nlDBCmdTable);
The following example connects and opens an IBM i database: JSCRIPTvar sConnectString = "Network Address=" + App.GetValue("NetworkAddress") + ";Network Port=447;Use Encryption for Data=False;Host CCSID=37;Mode=ReadWrite|ShareDenyNone;Isolation Level=ReadCommitted;Process Binary as Character=True"; App.DbConnect("SampleConnection", nlDBServerDDM, sConnectString); SampleConnection.Open("SampleRecordset", "QGPL/QAFCTUTDBF(DBFILE1)", 1, 1, 2, 5); |
DBConnect Method | Open Method | Disconnect Method | Close Method | Find Method | Move Method | AddNew Method | BeginTrans Method | CancelUpdate Method | CommitTrans Method | Delete Method | RollbackTrans Method | Seek Method | Update Method | ConnectionString property | DB Connection object
© 2004-2021 looksoftware. All rights reserved.