trunk/src/LythumOSL.Core/Data/Sql.cs
/// <summary>
/// This function will create command for database access
/// </summary>
/// <returns></returns>
This function will create command for database access
This function will create command for database access
public DbCommand CreateCommand (bool connect)
		{
			DbCommand cmd = null;
			try
			{
				if (Connect ())
				{
					cmd = _Connection.CreateCommand ();
					cmd.CommandType = CommandType.Text;
					cmd.CommandTimeout = _CommandTimeout;
					if (IsTransactionInProgress)
					{
						cmd.Transaction = _Transaction;
					}
				}
			}
			catch (Exception ex)
			{
				Error (ex);
				if (_ThrowException)
					throw new LythumException (ex);
			}
			return cmd;
		}
public DbCommand CreateCommand ( bool connect ) { DbCommand cmd = null ; try { if ( Connect ( ) ) { cmd = _Connection . CreateCommand ( ) ; cmd . CommandType = CommandType . Text ; cmd . CommandTimeout = _CommandTimeout ; if ( IsTransactionInProgress ) { cmd . Transaction = _Transaction ; } } } catch ( Exception ex ) { Error ( ex ) ; if ( _ThrowException ) throw new LythumException ( ex ) ; } return cmd ; }
This function will create command for database access
This function will create command for database access
// throw exception if it enabled
None
connect
bool