TimeSeriesLibrary.TSLibrary.OpenConnection C# (CSharp) Method

OpenConnection() public method

Opens a new connection for the time series library to use. The new connection is added to a list and assigned a serial number within the list. The method returns the serial number of the new connection.
public OpenConnection ( String connectionString ) : int
connectionString String The connection string used to open the connection.
return int
        public int OpenConnection(String connectionString)
        {
            // all the logic is found in the TSConnection object.
            return ConnxObject.OpenConnection(connectionString);
        }

Usage Example

Ejemplo n.º 1
0
        public int OpenConnection(sbyte *pConnectionString)
        {
            // Convert from simple character byte array to .Net String object
            String connectionString = new String(pConnectionString);

            try
            {
                // let the sibling method in the wrapped TSLibrary object contain the logic
                return(TSLib.OpenConnection(connectionString));
            }
            catch (Exception e)
            {
                ErrorMessage = e.Message;
                return(0);
            }
        }