February 8, 2004
From the Edge: Using DSN-Less Connections in R:BASE 7.1 Section: Enhanced Commands Chapter: Running R:BASE Your Way! Platform: R:BASE 7.1 for Windows Build: 7.1.71.30214 and higher
Normally on the SCONNECT command you specify the DSN you want to use. ODBC looks up this DSN and determines the driver to use and what connection it needs. In this version we let you specify the ODBC driver instead of an DSN. This is done as follows:
Assume you have a R:BASE database called RRBYW8 located in a folder called D:\71D. To access this database you need an R:BASE 7.0 or Oterro 3.0 ODBC driver installed.
For the SCONNECT command use this:
Examples 01 (Using R:BASE 7.0 ODBC Driver):
SCONNECT ';driver=R:BASE 7.0 Database Driver (*.rb1);dbq=d:\71d\rrbyw8'
Examples 02 (Using Oterro 3.0 ODBC Driver):
SCONNECT ';driver=Oterro 3.0 Database Driver (*.rb1);dbq=d:\71d\rrbyw8'
Note the initial semi-colon. This is the flag that you are not specifying a DSN. The item after the 'driver' is the actual name of the driver as defined in ODBC. Make sure you spell and space this exactly as it is defined in ODBC Data Source Administrator Drivers. The database and the exact path of the database is specified in the 'dbq' part of the string. The entire string must be surrounded by your database QUOTE character. Single quotes are used in the example above.
With a connection like this you can use a linked R:BASE database without a pre-defined DSN. A table attached using such a connection remembers all this for later "DSN-less" access.
For a complete PDF version of this technical document, examples and syntax, please visit:
From The Edge: http://www.razzak.com/fte (Powered by R:PHP)
Imagine the Possibilities!
Very Best R:egards,
Razzak.

