strSplitConnectString

C Scripting Language
Reference Manual
Version 4.4.0

<< Back  End  Next >>
 
 
INDEX
Introduction
Installation
Using the CSL executive
Language
Directives
System library
String library
   strAscii
   strBuildRecord
   strCenter
   strChange
   strChar
   strExport
   strFormatNumber
   strImport
   strIndexOf
   strIsInteger
   strIsNumber
   strLastIndexOf
   strLeftJustify
   strLength
   strLower
   strParseRecord
   strRemoveWords
   strRightJustify
   strSplitConnectString
   strSplitPath
   strSpread
   strStrip
   strStripExtension
   strStripLeading
   strStripTrailing
   strSubString
   strUpper
   strWordCount
   strWords
Math library
Regular expression lib.
File library
Database library
Async Communication
Registry/Profile handling
Windows control
C API
C++ Class Interface
CSL links
  
strSplitConnectString(
  const connstr,      // connect-string
  [var& password,     // extension
   var& connection,   // directory
   var& database])    // drive

Splits a connect string into its 4 parts database, userid, password and connection. The connect-string has the following syntax:

  [database:][userid][/password][@connection]

Any of the 4 parts may be missing. The database-part is converted to uppercase; the other parts are left in original case.

Returns the userid.

Example:

var db, name, pass, conn;

name = strSplitConnectString(
         'db2:Sandra/Bullock@Hollywood',
         pass, conn, db);

       // db   = 'DB2'
       // name = 'Sandra'
       // pass = 'Bullock'
       // conn = 'Hollywood'
  Copyright © IBK Landquart Last revision: 27.05.2002 << Back  Top  Next >>