SQL: SSIS, a Flat File and the _x003C_none_x003E__x003C_none_x003E_ Text Qualifier

I had recently experienced a strange issue with a SSIS Package.  This was basic package that copied data from a SQL Server table to a text file. This SSIS package was deployed in production for several months without issue, until – a minor change needed to be made.  The change was insignificant; the location (path) of the output file (a config file is usually used but in this case I wanted to edit the package) needed to be changed.   I had changed the path, built and deployed the package. Soon after deploying the package I received word that the file created was not correct.

I reviewed the output file and noticed that each record (line) ended with strange hex looking data: _x003C_none_x003E__x003C_none_x003E_

_x003C_none_x003E__x003C_none_x003E_ text qualifier

I scratched my head for a bit, reviewed the package’s source and destination connections and could not find where this odd _x003C_none_x003E_ data was coming from. I decided to view the package with a different editor and realized that somehow the Text Qualifier property for the Flat File Connection Manager was set to this “strange” sequence.

TextQualifier Property _x003C_none_x003E__x003C_none_x003E_

I removed the value, built and deployed the package and everything was back to normal - well as normal as it could be...



   

C#: Populate a ComboBox with Enum Values

A C# example for populating a ComboBox with the values of an Enum.

The Enum:

public enum FromAccount
    { checking = 0, savings = 1, foodstamps = 2, cashbenefit = 3 }

The Code:

comboBox1.DataSource = Enum.GetValues(typeof(FromAccount));
comboBox1.SelectedIndex = 0;



   

Software: BPSNMPMon updated

An update to BPSNMPMon, a SNMP (Simple Network Management Protocol) utility that will monitor host processor, storage and interface values, is now available. The latest version includes several enhancements:

  • Added AutoHeight option to scale the interface graph based on visible values
  • The charts now resize with the form
  • SNMP counters can be saved to a delimited log file 

 

BPSNMPMon performs various SNMP queries at a user-defined time interval and graphically represents the information in a simple user friendly interface.

 

Add BPSNMPMon to your network management "toolkit".



   

SQL: SQLServerAgent Error: Job xxx does not exist in the job cache

 

I recently encountered the error SQLServerAgent Error: Job xxx does not exist in the job cache (where xxx is the internal id number). This error was a bit misleading at first as I confirmed the job entry did exist. The cause of the error was that the SQLAgent service account didn’t have the necessary permissions to read the job data. Once the permissions were properly setup the job executed. 



   

C#: Decode Base64 Encoded String

C# code to dencode a Base64 encoded string to its equivalent string representation.

private string DecodeBase64(string s)
        {
            try
            {
                byte[] ascBytes = System.Convert.FromBase64String(s);
                return System.Text.ASCIIEncoding.ASCII.GetString(ascBytes);
            }
            catch (Exception e) { throw new Exception(e.Message); }
        }