Index: /BMXNET_RPMS_dotNET_UTILITIES-BMX/trunk/cs/bmx_0200scr/BMX2/BMXNet.sln
===================================================================
--- /BMXNET_RPMS_dotNET_UTILITIES-BMX/trunk/cs/bmx_0200scr/BMX2/BMXNet.sln	(revision 821)
+++ /BMXNET_RPMS_dotNET_UTILITIES-BMX/trunk/cs/bmx_0200scr/BMX2/BMXNet.sln	(revision 822)
@@ -7,4 +7,6 @@
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BMXNet", "BMXNet\BMXNet.csproj", "{DE8E4CC9-4F3A-4E32-8DFE-EE5692E8FC45}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BMXCmdTester", "BMXCmdTester\BMXCmdTester.csproj", "{25C6E4FD-16F0-49E0-B0BA-6126E451F5D6}"
 EndProject
 Global
@@ -22,4 +24,8 @@
 		{DE8E4CC9-4F3A-4E32-8DFE-EE5692E8FC45}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{DE8E4CC9-4F3A-4E32-8DFE-EE5692E8FC45}.Release|Any CPU.Build.0 = Release|Any CPU
+		{25C6E4FD-16F0-49E0-B0BA-6126E451F5D6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{25C6E4FD-16F0-49E0-B0BA-6126E451F5D6}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{25C6E4FD-16F0-49E0-B0BA-6126E451F5D6}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{25C6E4FD-16F0-49E0-B0BA-6126E451F5D6}.Release|Any CPU.Build.0 = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
Index: /BMXNET_RPMS_dotNET_UTILITIES-BMX/trunk/cs/bmx_0200scr/BMX2/BMXNet/BMXNet.csproj
===================================================================
--- /BMXNET_RPMS_dotNET_UTILITIES-BMX/trunk/cs/bmx_0200scr/BMX2/BMXNet/BMXNet.csproj	(revision 821)
+++ /BMXNET_RPMS_dotNET_UTILITIES-BMX/trunk/cs/bmx_0200scr/BMX2/BMXNet/BMXNet.csproj	(revision 822)
@@ -11,5 +11,5 @@
     <AssemblyKeyContainerName>
     </AssemblyKeyContainerName>
-    <AssemblyName>BMXNet20</AssemblyName>
+    <AssemblyName>BMXNet21</AssemblyName>
     <AssemblyOriginatorKeyFile>wv.key.snk</AssemblyOriginatorKeyFile>
     <DefaultClientScript>JScript</DefaultClientScript>
@@ -52,5 +52,5 @@
     <ConfigurationOverrideFile>
     </ConfigurationOverrideFile>
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DefineConstants>DEBUG</DefineConstants>
     <DocumentationFile>bmxnet.xml</DocumentationFile>
     <DebugSymbols>true</DebugSymbols>
@@ -73,5 +73,6 @@
     <ConfigurationOverrideFile>
     </ConfigurationOverrideFile>
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DefineConstants>
+    </DefineConstants>
     <DocumentationFile>bmxnet.xml</DocumentationFile>
     <DebugSymbols>true</DebugSymbols>
Index: /BMXNET_RPMS_dotNET_UTILITIES-BMX/trunk/cs/bmx_0200scr/BMX2/BMXNet/BMXNetAdapter.cs
===================================================================
--- /BMXNET_RPMS_dotNET_UTILITIES-BMX/trunk/cs/bmx_0200scr/BMX2/BMXNet/BMXNetAdapter.cs	(revision 821)
+++ /BMXNET_RPMS_dotNET_UTILITIES-BMX/trunk/cs/bmx_0200scr/BMX2/BMXNet/BMXNetAdapter.cs	(revision 822)
@@ -77,7 +77,5 @@
 		 */
 
-		public override int Fill(
-			DataSet ds
-			)
+		public override int Fill(DataSet ds)
 		{
 			//The inital call to base.fill calls the RPC which loads up the array
Index: /BMXNET_RPMS_dotNET_UTILITIES-BMX/trunk/cs/bmx_0200scr/BMX2/BMXNet/BMXNetConnectInfo.cs
===================================================================
--- /BMXNET_RPMS_dotNET_UTILITIES-BMX/trunk/cs/bmx_0200scr/BMX2/BMXNet/BMXNetConnectInfo.cs	(revision 821)
+++ /BMXNET_RPMS_dotNET_UTILITIES-BMX/trunk/cs/bmx_0200scr/BMX2/BMXNet/BMXNetConnectInfo.cs	(revision 822)
@@ -57,14 +57,25 @@
         }
 
-		public BMXNetConnectInfo()
-		{
-			m_BMXNetLib = new BMXNetLib();
-
-			//Initialize BMXNetEvent timer
-			m_timerEvent = new System.Timers.Timer();
-			m_timerEvent.Elapsed+=new ElapsedEventHandler(OnEventTimer);
-			m_timerEvent.Interval = 10000;
-			m_timerEvent.Enabled = false;
-		}
+        /// <summary>
+        /// BMXNetConnector With Default Encoding (invokes BMXNetLib)
+        /// </summary>
+        public BMXNetConnectInfo() : this("") { }
+
+        /// <summary>
+        /// BMXNetConnector with a specific encoding
+        /// </summary>
+        /// <param name="encoding">String representation of encoding (e.g. windows-1256 for arabic).
+        /// If encoding is not found, we fall back to the default windows encoding. A debug message
+        /// is printed to that effect.</param>
+        public BMXNetConnectInfo(string encoding)
+        {
+            if (encoding == String.Empty) m_BMXNetLib = new BMXNetLib();
+            else m_BMXNetLib = new BMXNetLib(encoding);
+
+            m_timerEvent = new System.Timers.Timer();
+            m_timerEvent.Elapsed += new ElapsedEventHandler(OnEventTimer);
+            m_timerEvent.Interval = 10000;
+            m_timerEvent.Enabled = false;
+        }
 
 		#region BMXNetEvent
Index: /BMXNET_RPMS_dotNET_UTILITIES-BMX/trunk/cs/bmx_0200scr/BMX2/BMXNet/BMXNetLib.cs
===================================================================
--- /BMXNET_RPMS_dotNET_UTILITIES-BMX/trunk/cs/bmx_0200scr/BMX2/BMXNet/BMXNetLib.cs	(revision 821)
+++ /BMXNET_RPMS_dotNET_UTILITIES-BMX/trunk/cs/bmx_0200scr/BMX2/BMXNet/BMXNetLib.cs	(revision 822)
@@ -21,5 +21,8 @@
 	public class BMXNetLib
 	{
-		public BMXNetLib()
+		/// <summary>
+		/// Main constructor with default machine encoding
+		/// </summary>
+        public BMXNetLib()
 		{
 			m_sWKID = "BMX";
@@ -30,4 +33,30 @@
 
 		}
+
+        /// <summary>
+        /// Constructor specifiying encoding
+        /// </summary>
+        /// <param name="charset">String name of character set</param>
+        public BMXNetLib(string charset) : this()
+        {
+            
+            //char[] arabic_nm_ch = arabic_name.ToCharArray();
+            //byte[] arabic_nm_by = cp1256.GetBytes(arabic_nm_ch);
+            //string arabic_name2 = "";
+            //foreach (byte eachbyte in arabic_nm_by)
+            //{
+            //    arabic_name2 += ((char)eachbyte);
+            //}
+            
+            try 
+            { 
+                m_Encoding = System.Text.Encoding.GetEncoding(charset); 
+            }
+            catch (ArgumentException)
+            {
+                Debug.Write("Invalid Code Page... Falling back to default system encoding");
+                m_Encoding = Encoding.GetEncoding(0);
+            }
+        }
 		
 		#region Piece Functions
@@ -139,4 +168,6 @@
 		private	string		m_sNameSpace = "";
         private int         m_nReceiveTimeout = 30000;
+
+        private Encoding m_Encoding = Encoding.GetEncoding(0);
 
 		#endregion RPX Fields
@@ -802,5 +833,5 @@
 
 			NetworkStream ns = tcpClient.GetStream();
-			byte[] sendBytes = Encoding.ASCII.GetBytes(cSendString);
+			byte[] sendBytes = m_Encoding.GetBytes(cSendString);
 			ns.Write(sendBytes,0,sendBytes.Length);
             if (this.m_bLogging == true)
@@ -852,5 +883,4 @@
 			do
 			{
-
 				numberOfBytesRead = ns.Read(bReadBuffer, 0, bReadBuffer.Length); 
 				if ((numberOfBytesRead == 1)&&(bStarted == false))
@@ -869,10 +899,10 @@
 						lpBuf += 2;
 					}
-					sError = Encoding.ASCII.GetString(bReadBuffer, lpBuf + 1, nErrLen);
+					sError = m_Encoding.GetString(bReadBuffer, lpBuf + 1, nErrLen);
 					if (sError != "")
 					{
 						throw new BMXNetException(sError);
 					}
-					sAppError = Encoding.ASCII.GetString(bReadBuffer, lpBuf+1+nErrLen+1, nAppLen);
+					sAppError = m_Encoding.GetString(bReadBuffer, lpBuf+1+nErrLen+1, nAppLen);
 					lpBuf += (nErrLen + nAppLen + 2);
 					numberOfBytesRead -= (nErrLen + nAppLen + 2);
@@ -884,5 +914,5 @@
 					bFinished = true;
 				Debug.Assert(numberOfBytesRead > -1);
-				sReadBuffer = Encoding.ASCII.GetString(bReadBuffer, lpBuf, numberOfBytesRead);
+				sReadBuffer = m_Encoding.GetString(bReadBuffer, lpBuf, numberOfBytesRead);
 				lpBuf = 0;
 				if (nFind > -1)
@@ -1315,4 +1345,19 @@
 		}
 
+        /// <summary>
+        /// Gets or Sets the Default Encoder to use
+        /// </summary>
+        public Encoding Encoder
+        {
+            get
+            {
+                return this.m_Encoding;
+            }
+            set
+            {
+                this.m_Encoding = Encoder;
+            }
+        }
+
 		#endregion RPX Properties
 
Index: /BMXNET_RPMS_dotNET_UTILITIES-BMX/trunk/cs/bmx_0200scr/BMX2/BMXNet/RPMSDb.cs
===================================================================
--- /BMXNET_RPMS_dotNET_UTILITIES-BMX/trunk/cs/bmx_0200scr/BMX2/BMXNet/RPMSDb.cs	(revision 821)
+++ /BMXNET_RPMS_dotNET_UTILITIES-BMX/trunk/cs/bmx_0200scr/BMX2/BMXNet/RPMSDb.cs	(revision 822)
@@ -165,14 +165,19 @@
 				Type tType;
 
-				int nTemp = 10;
+				int nTemp = 10; //length of @@@meta@@@
+                //actual header
 				sHeader = sHeader.Substring(10,(sHeader.Length - nTemp));
 				string[] sRecordSetInfo = sHeader.Split(cFldDelim);
 
+                //substract one because 1st item is RecordId|File# -- rest is columns
 				numCols = sRecordSetInfo.GetLength(0)-1;
 				m_aResultSets[nSet].metaData = new RPMSDbResultSet.MetaData[numCols];
 
-				//First ^-Piece is recordset-level info: RecordIdentifier|File#
+				//Set FileID
+                //First ^-Piece is recordset-level info: RecordIdentifier|File#
 				string[] sRecordInfo = sRecordSetInfo[0].Split(cBar);
 				m_aResultSets[nSet].fmFileID = sRecordInfo[1];
+
+                //What is the seed???
 				if (sRecordInfo.GetLength(0) > 2)
 				{
@@ -190,4 +195,5 @@
 				}
 
+                // Foreign key is included
 				if (sRecordInfo.GetLength(0) > 3)
 				{
@@ -197,5 +203,5 @@
 
 					m_aResultSets[nSet].fmKeyField = "";
-				//2nd through nth ^-Pieces are Column info: Fileman File#FileMan Field#|DataType|Field Length|Column Name|IsReadOnly|IsKeyField
+				//2nd through nth ^-Pieces are Column info: Fileman File#|FileMan Field#|DataType|Field Length|Column Name|IsReadOnly|IsKeyField|????
 				for (j=1; j < sRecordSetInfo.GetLength(0); j++)
 				{
@@ -208,4 +214,5 @@
 					//Field 5 = IsReadOnly
 					//Field 6 = IsKeyField
+                    //Field 7 {MISSING}
 					sFileID = sColumnInfo[0];
 					string sFieldID = sColumnInfo[1];
@@ -302,4 +309,5 @@
 			string sFldDelim = "^";
 			char[] cFldDelim = sFldDelim.ToCharArray();
+            // nRecords-1 because last record is empty (Where $C(31) (end of record) is)
 			m_aResultSets[nSet].data = new object[nRecords-1, numCols];
 			string[] saRecord;
@@ -310,4 +318,6 @@
 				for (int k = 0; k< saRecord.GetLength(0); k++)
 				{
+                    //Date Time validation
+                    //TODO: Support Fileman DateTime
 					if (m_aResultSets[nSet].metaData[k].type == typeof(DateTime))
 					{
@@ -385,5 +395,7 @@
 			int		nRecordSetCount;	//Count of recordsets
 
+            //Gets Records[sets] (val is number of records for each set), Headers[sets] (val is header location in array), and number of record sets.
 			IndexRecords(sResultArray, out naRecords, out naHeaderIndex, out nRecordSetCount);
+            //Create array of result sets
 			m_aResultSets = new RPMSDbResultSet[nRecordSetCount];
 
Index: /BMXNET_RPMS_dotNET_UTILITIES-BMX/trunk/cs/bmx_0200scr/BMX2/BMXNet/bin/Release/bmxnet.xml
===================================================================
--- /BMXNET_RPMS_dotNET_UTILITIES-BMX/trunk/cs/bmx_0200scr/BMX2/BMXNet/bin/Release/bmxnet.xml	(revision 821)
+++ /BMXNET_RPMS_dotNET_UTILITIES-BMX/trunk/cs/bmx_0200scr/BMX2/BMXNet/bin/Release/bmxnet.xml	(revision 822)
@@ -2,5 +2,5 @@
 <doc>
     <assembly>
-        <name>BMXNet20</name>
+        <name>BMXNet21</name>
     </assembly>
     <members>
@@ -83,4 +83,15 @@
             </summary>
         </member>
+        <member name="M:IndianHealthService.BMXNet.BMXNetLib.#ctor">
+            <summary>
+            Main constructor with default machine encoding
+            </summary>
+        </member>
+        <member name="M:IndianHealthService.BMXNet.BMXNetLib.#ctor(System.String)">
+            <summary>
+            Constructor specifiying encoding
+            </summary>
+            <param name="charset">String name of character set</param>
+        </member>
         <member name="M:IndianHealthService.BMXNet.BMXNetLib.PieceLength(System.String,System.String)">
             <summary>
@@ -190,4 +201,9 @@
             </summary>
         </member>
+        <member name="P:IndianHealthService.BMXNet.BMXNetLib.Encoder">
+            <summary>
+            Gets or Sets the Default Encoder to use
+            </summary>
+        </member>
         <member name="T:IndianHealthService.BMXNet.BMXNetException">
             <summary>
@@ -247,4 +263,17 @@
             Contains methods and properties to support RPMS Login for .NET applications
             </summary>
+        </member>
+        <member name="M:IndianHealthService.BMXNet.BMXNetConnectInfo.#ctor">
+            <summary>
+            BMXNetConnector With Default Encoding (invokes BMXNetLib)
+            </summary>
+        </member>
+        <member name="M:IndianHealthService.BMXNet.BMXNetConnectInfo.#ctor(System.String)">
+            <summary>
+            BMXNetConnector with a specific encoding
+            </summary>
+            <param name="encoding">String representation of encoding (e.g. windows-1256 for arabic).
+            If encoding is not found, we fall back to the default windows encoding. A debug message
+            is printed to that effect.</param>
         </member>
         <member name="M:IndianHealthService.BMXNet.BMXNetConnectInfo.SubscribeEvent(System.String)">
Index: /BMXNET_RPMS_dotNET_UTILITIES-BMX/trunk/cs/bmx_0200scr/BMX2/BMXNet/bmxnet.xml
===================================================================
--- /BMXNET_RPMS_dotNET_UTILITIES-BMX/trunk/cs/bmx_0200scr/BMX2/BMXNet/bmxnet.xml	(revision 821)
+++ /BMXNET_RPMS_dotNET_UTILITIES-BMX/trunk/cs/bmx_0200scr/BMX2/BMXNet/bmxnet.xml	(revision 822)
@@ -2,7 +2,213 @@
 <doc>
     <assembly>
-        <name>BMXNet20</name>
+        <name>BMXNet21</name>
     </assembly>
     <members>
+        <member name="T:IndianHealthService.BMXNet.DServerInfo">
+            <summary>
+            Prompts for RPMS Server address and port
+            Obtains current values, if any, from isolated storage
+            and uses them as defaults.
+            If OK, then writes values to isolated storage and returns
+            Address and Port as properties.
+            
+            </summary>
+        </member>
+        <member name="F:IndianHealthService.BMXNet.DServerInfo.components">
+            <summary>
+            Required designer variable.
+            </summary>
+        </member>
+        <member name="M:IndianHealthService.BMXNet.DServerInfo.Dispose(System.Boolean)">
+            <summary>
+            Clean up any resources being used.
+            </summary>
+        </member>
+        <member name="M:IndianHealthService.BMXNet.DServerInfo.InitializeComponent">
+            <summary>
+            Required method for Designer support - do not modify
+            the contents of this method with the code editor.
+            </summary>
+        </member>
+        <member name="M:IndianHealthService.BMXNet.DServerInfo.UpdateDialogData(System.Boolean)">
+            <summary>
+            If b is true, moves member vars into control data
+            otherwise, moves control data into member vars
+            </summary>
+            <param name="b"></param>
+        </member>
+        <member name="P:IndianHealthService.BMXNet.DServerInfo.MServerAddress">
+            <summary>
+            Gets/sets the internet address of the RPMS Server
+            </summary>
+        </member>
+        <member name="P:IndianHealthService.BMXNet.DServerInfo.MServerNamespace">
+            <summary>
+            Gets/sets the namespace of the RPMS Server
+            </summary>
+        </member>
+        <member name="P:IndianHealthService.BMXNet.DServerInfo.MServerPort">
+            <summary>
+            Gets/sets the TCP/IP Port of the RPMS Server
+            </summary>
+        </member>
+        <member name="T:IndianHealthService.BMXNet.DSelectDivision">
+            <summary>
+            Summary description for DSelectDivision.
+            </summary>
+        </member>
+        <member name="M:IndianHealthService.BMXNet.DSelectDivision.InitializeComponent">
+            <summary>
+            Required method for Designer support - do not modify
+            the contents of this method with the code editor.
+            </summary>
+        </member>
+        <member name="M:IndianHealthService.BMXNet.DSelectDivision.UpdateDialogData(System.Boolean)">
+            <summary>
+            If b is true, moves member vars into control data
+            otherwise, moves control data into member vars
+            </summary>
+            <param name="b"></param>
+        </member>
+        <member name="M:IndianHealthService.BMXNet.DSelectDivision.Dispose(System.Boolean)">
+            <summary>
+            Clean up any resources being used.
+            </summary>
+        </member>
+        <member name="T:IndianHealthService.BMXNet.BMXNetLib">
+            <summary>
+            BMXNetLib implements low-level socket connectivity to RPMS databases.
+            The VA RPC Broker must be running on the RPMS server in order for 
+            BMXNetLib to connect.
+            </summary>
+        </member>
+        <member name="M:IndianHealthService.BMXNet.BMXNetLib.#ctor">
+            <summary>
+            Main constructor with default machine encoding
+            </summary>
+        </member>
+        <member name="M:IndianHealthService.BMXNet.BMXNetLib.#ctor(System.String)">
+            <summary>
+            Constructor specifiying encoding
+            </summary>
+            <param name="charset">String name of character set</param>
+        </member>
+        <member name="M:IndianHealthService.BMXNet.BMXNetLib.PieceLength(System.String,System.String)">
+            <summary>
+            Corresponds to M's $L(STRING,DELIMITER)
+            </summary>
+            <param name="sInput"></param>
+            <param name="sDelim"></param>
+            <returns></returns>
+        </member>
+        <member name="M:IndianHealthService.BMXNet.BMXNetLib.Piece(System.String,System.String,System.Int32)">
+            <summary>
+            Corresponds to M's $$Piece function
+            </summary>
+            <param name="sInput"></param>
+            <param name="sDelim"></param>
+            <param name="nNumber"></param>
+            <returns></returns>
+        </member>
+        <member name="M:IndianHealthService.BMXNet.BMXNetLib.ADEBLDPadString(System.String)">
+            <summary>
+            Given strInput = "13" builds "013" if nLength = 3.  Default for nLength is 3.
+            </summary>
+            <param name="strInput"></param>
+            <returns></returns>
+        </member>
+        <member name="M:IndianHealthService.BMXNet.BMXNetLib.ADEBLDPadString(System.String,System.Int32)">
+            <summary>
+            Given strInput = "13" builds "013" if nLength = 3  Default for nLength is 3.
+            </summary>
+            <param name="strInput"></param>
+            <param name="nLength">Default = 3</param>
+            <returns></returns>
+        </member>
+        <member name="M:IndianHealthService.BMXNet.BMXNetLib.ADEBLDB(System.String)">
+            <summary>
+            Concatenates zero-padded length of sInput to sInput
+            Given "Hello" returns "004Hello"
+            If nSize = 5, returns "00004Hello"
+            Default for nSize is 3.
+            </summary>
+            <param name="sInput"></param>
+            <returns></returns>
+        </member>
+        <member name="M:IndianHealthService.BMXNet.BMXNetLib.ADEBLDB(System.String,System.Int32)">
+            <summary>
+            Concatenates zero-padded length of sInput to sInput
+            Given "Hello" returns "004Hello"
+            If nSize = 5, returns "00004Hello"
+            Default for nSize is 3.
+            </summary>
+            <param name="sInput"></param>
+            <param name="nSize"></param>
+            <returns></returns>
+        </member>
+        <member name="M:IndianHealthService.BMXNet.BMXNetLib.ADEBHDR(System.String,System.String,System.String,System.String)">
+            <summary>
+            Build protocol header
+            </summary>
+            <param name="sWKID"></param>
+            <param name="sWINH"></param>
+            <param name="sPRCH"></param>
+            <param name="sWISH"></param>
+            <returns></returns>
+        </member>
+        <member name="M:IndianHealthService.BMXNet.BMXNetLib.FindSubString(System.String,System.String)">
+            <summary>
+            Returns index of first instance of sSubString in sString.
+            If sSubString not found, returns -1.
+            </summary>
+            <param name="sString"></param>
+            <param name="sSubString"></param>
+            <returns></returns>
+        </member>
+        <member name="M:IndianHealthService.BMXNet.BMXNetLib.Lock(System.String,System.String,System.String)">
+            <summary>
+            Lock a local or global M variable
+            Returns true if lock is obtained during TimeOut seconds
+            Use + to increment, - to decrement lock.
+            </summary>
+            <param name="Variable"></param>
+            <param name="Increment"></param>
+            <param name="TimeOut"></param>
+            <returns></returns>
+        </member>
+        <member name="P:IndianHealthService.BMXNet.BMXNetLib.BMXRWL">
+            <summary>
+            Returns a reference to the internal ReaderWriterLock member.
+            </summary>
+        </member>
+        <member name="P:IndianHealthService.BMXNet.BMXNetLib.RWLTimeout">
+            <summary>
+            Sets and returns the timeout in milliseconds for locking the transmit port.
+            If the transmit port is unavailable an ApplicationException will be thrown.
+            </summary>
+        </member>
+        <member name="P:IndianHealthService.BMXNet.BMXNetLib.ReceiveTimeout">
+            <summary>
+            Set and retrieve the timeout, in milliseconds, to receive a response from the RPMS server.
+            If the retrieve time exceeds the timeout, an exception will be thrown and the connection will be closed.
+            The default is 30 seconds.
+            </summary>
+        </member>
+        <member name="P:IndianHealthService.BMXNet.BMXNetLib.AppContext">
+            <summary>
+            Gets/sets the Kernel Application context
+            Throws an exception if unable to set the context. 
+            </summary>
+        </member>
+        <member name="P:IndianHealthService.BMXNet.BMXNetLib.Encoder">
+            <summary>
+            Gets or Sets the Default Encoder to use
+            </summary>
+        </member>
+        <member name="T:IndianHealthService.BMXNet.BMXNetException">
+            <summary>
+            Custom exception class for BMXNet
+            </summary>
+        </member>
         <member name="P:IndianHealthService.BMXNet.RPMSDb.ResultSets">
             <summary>
@@ -15,8 +221,59 @@
             </summary>
         </member>
+        <member name="T:IndianHealthService.BMXNet.DLoginInfo">
+            <summary>
+            Summary description for DLoginInfo.
+            </summary>
+        </member>
+        <member name="F:IndianHealthService.BMXNet.DLoginInfo.components">
+            <summary>
+            Required designer variable.
+            </summary>
+        </member>
+        <member name="M:IndianHealthService.BMXNet.DLoginInfo.InitializeComponent">
+            <summary>
+            Required method for Designer support - do not modify
+            the contents of this method with the code editor.
+            </summary>
+        </member>
+        <member name="M:IndianHealthService.BMXNet.DLoginInfo.Dispose(System.Boolean)">
+            <summary>
+            Clean up any resources being used.
+            </summary>
+        </member>
+        <member name="M:IndianHealthService.BMXNet.DLoginInfo.UpdateDialogData(System.Boolean)">
+            <summary>
+            If b is true, moves member vars into control data
+            otherwise, moves control data into member vars
+            </summary>
+            <param name="b"></param>
+        </member>
+        <member name="P:IndianHealthService.BMXNet.DLoginInfo.AccessCode">
+            <summary>
+            Gets the access code entered by the user.
+            </summary>
+        </member>
+        <member name="P:IndianHealthService.BMXNet.DLoginInfo.VerifyCode">
+            <summary>
+            Gets the verify code entered by the user.
+            </summary>
+        </member>
         <member name="T:IndianHealthService.BMXNet.BMXNetConnectInfo">
             <summary>
             Contains methods and properties to support RPMS Login for .NET applications
             </summary>
+        </member>
+        <member name="M:IndianHealthService.BMXNet.BMXNetConnectInfo.#ctor">
+            <summary>
+            BMXNetConnector With Default Encoding (invokes BMXNetLib)
+            </summary>
+        </member>
+        <member name="M:IndianHealthService.BMXNet.BMXNetConnectInfo.#ctor(System.String)">
+            <summary>
+            BMXNetConnector with a specific encoding
+            </summary>
+            <param name="encoding">String representation of encoding (e.g. windows-1256 for arabic).
+            If encoding is not found, we fall back to the default windows encoding. A debug message
+            is printed to that effect.</param>
         </member>
         <member name="M:IndianHealthService.BMXNet.BMXNetConnectInfo.SubscribeEvent(System.String)">
@@ -187,232 +444,4 @@
             </summary>
         </member>
-        <member name="T:IndianHealthService.BMXNet.DServerInfo">
-            <summary>
-            Prompts for RPMS Server address and port
-            Obtains current values, if any, from isolated storage
-            and uses them as defaults.
-            If OK, then writes values to isolated storage and returns
-            Address and Port as properties.
-            
-            </summary>
-        </member>
-        <member name="F:IndianHealthService.BMXNet.DServerInfo.components">
-            <summary>
-            Required designer variable.
-            </summary>
-        </member>
-        <member name="M:IndianHealthService.BMXNet.DServerInfo.Dispose(System.Boolean)">
-            <summary>
-            Clean up any resources being used.
-            </summary>
-        </member>
-        <member name="M:IndianHealthService.BMXNet.DServerInfo.InitializeComponent">
-            <summary>
-            Required method for Designer support - do not modify
-            the contents of this method with the code editor.
-            </summary>
-        </member>
-        <member name="M:IndianHealthService.BMXNet.DServerInfo.UpdateDialogData(System.Boolean)">
-            <summary>
-            If b is true, moves member vars into control data
-            otherwise, moves control data into member vars
-            </summary>
-            <param name="b"></param>
-        </member>
-        <member name="P:IndianHealthService.BMXNet.DServerInfo.MServerAddress">
-            <summary>
-            Gets/sets the internet address of the RPMS Server
-            </summary>
-        </member>
-        <member name="P:IndianHealthService.BMXNet.DServerInfo.MServerNamespace">
-            <summary>
-            Gets/sets the namespace of the RPMS Server
-            </summary>
-        </member>
-        <member name="P:IndianHealthService.BMXNet.DServerInfo.MServerPort">
-            <summary>
-            Gets/sets the TCP/IP Port of the RPMS Server
-            </summary>
-        </member>
-        <member name="T:IndianHealthService.BMXNet.DSelectDivision">
-            <summary>
-            Summary description for DSelectDivision.
-            </summary>
-        </member>
-        <member name="M:IndianHealthService.BMXNet.DSelectDivision.InitializeComponent">
-            <summary>
-            Required method for Designer support - do not modify
-            the contents of this method with the code editor.
-            </summary>
-        </member>
-        <member name="M:IndianHealthService.BMXNet.DSelectDivision.UpdateDialogData(System.Boolean)">
-            <summary>
-            If b is true, moves member vars into control data
-            otherwise, moves control data into member vars
-            </summary>
-            <param name="b"></param>
-        </member>
-        <member name="M:IndianHealthService.BMXNet.DSelectDivision.Dispose(System.Boolean)">
-            <summary>
-            Clean up any resources being used.
-            </summary>
-        </member>
-        <member name="T:IndianHealthService.BMXNet.BMXNetLib">
-            <summary>
-            BMXNetLib implements low-level socket connectivity to RPMS databases.
-            The VA RPC Broker must be running on the RPMS server in order for 
-            BMXNetLib to connect.
-            </summary>
-        </member>
-        <member name="M:IndianHealthService.BMXNet.BMXNetLib.PieceLength(System.String,System.String)">
-            <summary>
-            Corresponds to M's $L(STRING,DELIMITER)
-            </summary>
-            <param name="sInput"></param>
-            <param name="sDelim"></param>
-            <returns></returns>
-        </member>
-        <member name="M:IndianHealthService.BMXNet.BMXNetLib.Piece(System.String,System.String,System.Int32)">
-            <summary>
-            Corresponds to M's $$Piece function
-            </summary>
-            <param name="sInput"></param>
-            <param name="sDelim"></param>
-            <param name="nNumber"></param>
-            <returns></returns>
-        </member>
-        <member name="M:IndianHealthService.BMXNet.BMXNetLib.ADEBLDPadString(System.String)">
-            <summary>
-            Given strInput = "13" builds "013" if nLength = 3.  Default for nLength is 3.
-            </summary>
-            <param name="strInput"></param>
-            <returns></returns>
-        </member>
-        <member name="M:IndianHealthService.BMXNet.BMXNetLib.ADEBLDPadString(System.String,System.Int32)">
-            <summary>
-            Given strInput = "13" builds "013" if nLength = 3  Default for nLength is 3.
-            </summary>
-            <param name="strInput"></param>
-            <param name="nLength">Default = 3</param>
-            <returns></returns>
-        </member>
-        <member name="M:IndianHealthService.BMXNet.BMXNetLib.ADEBLDB(System.String)">
-            <summary>
-            Concatenates zero-padded length of sInput to sInput
-            Given "Hello" returns "004Hello"
-            If nSize = 5, returns "00004Hello"
-            Default for nSize is 3.
-            </summary>
-            <param name="sInput"></param>
-            <returns></returns>
-        </member>
-        <member name="M:IndianHealthService.BMXNet.BMXNetLib.ADEBLDB(System.String,System.Int32)">
-            <summary>
-            Concatenates zero-padded length of sInput to sInput
-            Given "Hello" returns "004Hello"
-            If nSize = 5, returns "00004Hello"
-            Default for nSize is 3.
-            </summary>
-            <param name="sInput"></param>
-            <param name="nSize"></param>
-            <returns></returns>
-        </member>
-        <member name="M:IndianHealthService.BMXNet.BMXNetLib.ADEBHDR(System.String,System.String,System.String,System.String)">
-            <summary>
-            Build protocol header
-            </summary>
-            <param name="sWKID"></param>
-            <param name="sWINH"></param>
-            <param name="sPRCH"></param>
-            <param name="sWISH"></param>
-            <returns></returns>
-        </member>
-        <member name="M:IndianHealthService.BMXNet.BMXNetLib.FindSubString(System.String,System.String)">
-            <summary>
-            Returns index of first instance of sSubString in sString.
-            If sSubString not found, returns -1.
-            </summary>
-            <param name="sString"></param>
-            <param name="sSubString"></param>
-            <returns></returns>
-        </member>
-        <member name="M:IndianHealthService.BMXNet.BMXNetLib.Lock(System.String,System.String,System.String)">
-            <summary>
-            Lock a local or global M variable
-            Returns true if lock is obtained during TimeOut seconds
-            Use + to increment, - to decrement lock.
-            </summary>
-            <param name="Variable"></param>
-            <param name="Increment"></param>
-            <param name="TimeOut"></param>
-            <returns></returns>
-        </member>
-        <member name="P:IndianHealthService.BMXNet.BMXNetLib.BMXRWL">
-            <summary>
-            Returns a reference to the internal ReaderWriterLock member.
-            </summary>
-        </member>
-        <member name="P:IndianHealthService.BMXNet.BMXNetLib.RWLTimeout">
-            <summary>
-            Sets and returns the timeout in milliseconds for locking the transmit port.
-            If the transmit port is unavailable an ApplicationException will be thrown.
-            </summary>
-        </member>
-        <member name="P:IndianHealthService.BMXNet.BMXNetLib.ReceiveTimeout">
-            <summary>
-            Set and retrieve the timeout, in milliseconds, to receive a response from the RPMS server.
-            If the retrieve time exceeds the timeout, an exception will be thrown and the connection will be closed.
-            The default is 30 seconds.
-            </summary>
-        </member>
-        <member name="P:IndianHealthService.BMXNet.BMXNetLib.AppContext">
-            <summary>
-            Gets/sets the Kernel Application context
-            Throws an exception if unable to set the context. 
-            </summary>
-        </member>
-        <member name="T:IndianHealthService.BMXNet.DLoginInfo">
-            <summary>
-            Summary description for DLoginInfo.
-            </summary>
-        </member>
-        <member name="F:IndianHealthService.BMXNet.DLoginInfo.components">
-            <summary>
-            Required designer variable.
-            </summary>
-        </member>
-        <member name="M:IndianHealthService.BMXNet.DLoginInfo.InitializeComponent">
-            <summary>
-            Required method for Designer support - do not modify
-            the contents of this method with the code editor.
-            </summary>
-        </member>
-        <member name="M:IndianHealthService.BMXNet.DLoginInfo.Dispose(System.Boolean)">
-            <summary>
-            Clean up any resources being used.
-            </summary>
-        </member>
-        <member name="M:IndianHealthService.BMXNet.DLoginInfo.UpdateDialogData(System.Boolean)">
-            <summary>
-            If b is true, moves member vars into control data
-            otherwise, moves control data into member vars
-            </summary>
-            <param name="b"></param>
-        </member>
-        <member name="P:IndianHealthService.BMXNet.DLoginInfo.AccessCode">
-            <summary>
-            Gets the access code entered by the user.
-            </summary>
-        </member>
-        <member name="P:IndianHealthService.BMXNet.DLoginInfo.VerifyCode">
-            <summary>
-            Gets the verify code entered by the user.
-            </summary>
-        </member>
-        <member name="T:IndianHealthService.BMXNet.BMXNetException">
-            <summary>
-            Custom exception class for BMXNet
-            </summary>
-        </member>
     </members>
 </doc>
Index: /BMXNET_RPMS_dotNET_UTILITIES-BMX/trunk/cs/bmx_0200scr/BMX2/BMXNetTest/frmBMXNetTest.cs
===================================================================
--- /BMXNET_RPMS_dotNET_UTILITIES-BMX/trunk/cs/bmx_0200scr/BMX2/BMXNetTest/frmBMXNetTest.cs	(revision 821)
+++ /BMXNET_RPMS_dotNET_UTILITIES-BMX/trunk/cs/bmx_0200scr/BMX2/BMXNetTest/frmBMXNetTest.cs	(revision 822)
@@ -53,5 +53,5 @@
 		private void InitializeComponent()
 		{
-            this.tabControl1 = new System.Windows.Forms.TabControl();
+            this.mlTests = new System.Windows.Forms.TabControl();
             this.tpaQuery = new System.Windows.Forms.TabPage();
             this.panGrid = new System.Windows.Forms.Panel();
@@ -135,5 +135,9 @@
             this.cmdReleaseLock = new System.Windows.Forms.Button();
             this.cmdEventPollingInterval = new System.Windows.Forms.Button();
-            this.tabControl1.SuspendLayout();
+            this.tabPage1 = new System.Windows.Forms.TabPage();
+            this.txtML = new System.Windows.Forms.TextBox();
+            this.lblML = new System.Windows.Forms.Label();
+            this.btnML = new System.Windows.Forms.Button();
+            this.mlTests.SuspendLayout();
             this.tpaQuery.SuspendLayout();
             this.panGrid.SuspendLayout();
@@ -147,18 +151,20 @@
             ((System.ComponentModel.ISupportInitialize)(this.nudEventPollingInterval)).BeginInit();
             this.grpPiece.SuspendLayout();
+            this.tabPage1.SuspendLayout();
             this.SuspendLayout();
             // 
-            // tabControl1
-            // 
-            this.tabControl1.Controls.Add(this.tpaQuery);
-            this.tabControl1.Controls.Add(this.tpaControls);
-            this.tabControl1.Controls.Add(this.tpaConnection);
-            this.tabControl1.Controls.Add(this.tpaOther);
-            this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
-            this.tabControl1.Location = new System.Drawing.Point(0, 0);
-            this.tabControl1.Name = "tabControl1";
-            this.tabControl1.SelectedIndex = 0;
-            this.tabControl1.Size = new System.Drawing.Size(736, 566);
-            this.tabControl1.TabIndex = 0;
+            // mlTests
+            // 
+            this.mlTests.Controls.Add(this.tpaQuery);
+            this.mlTests.Controls.Add(this.tpaControls);
+            this.mlTests.Controls.Add(this.tpaConnection);
+            this.mlTests.Controls.Add(this.tpaOther);
+            this.mlTests.Controls.Add(this.tabPage1);
+            this.mlTests.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.mlTests.Location = new System.Drawing.Point(0, 0);
+            this.mlTests.Name = "mlTests";
+            this.mlTests.SelectedIndex = 0;
+            this.mlTests.Size = new System.Drawing.Size(736, 566);
+            this.mlTests.TabIndex = 0;
             // 
             // tpaQuery
@@ -495,5 +501,5 @@
             this.tpaConnection.Location = new System.Drawing.Point(4, 22);
             this.tpaConnection.Name = "tpaConnection";
-            this.tpaConnection.Size = new System.Drawing.Size(605, 465);
+            this.tpaConnection.Size = new System.Drawing.Size(728, 540);
             this.tpaConnection.TabIndex = 1;
             this.tpaConnection.Text = "Connection";
@@ -635,5 +641,5 @@
             this.tpaOther.Location = new System.Drawing.Point(4, 22);
             this.tpaOther.Name = "tpaOther";
-            this.tpaOther.Size = new System.Drawing.Size(605, 465);
+            this.tpaOther.Size = new System.Drawing.Size(728, 540);
             this.tpaOther.TabIndex = 2;
             this.tpaOther.Text = "Events";
@@ -947,14 +953,53 @@
             this.cmdEventPollingInterval.Text = "Event Polling Interval";
             // 
+            // tabPage1
+            // 
+            this.tabPage1.Controls.Add(this.btnML);
+            this.tabPage1.Controls.Add(this.lblML);
+            this.tabPage1.Controls.Add(this.txtML);
+            this.tabPage1.Location = new System.Drawing.Point(4, 22);
+            this.tabPage1.Name = "tabPage1";
+            this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
+            this.tabPage1.Size = new System.Drawing.Size(728, 540);
+            this.tabPage1.TabIndex = 4;
+            this.tabPage1.Text = "Multi Lingual Tests";
+            this.tabPage1.UseVisualStyleBackColor = true;
+            // 
+            // txtML
+            // 
+            this.txtML.Location = new System.Drawing.Point(177, 66);
+            this.txtML.Name = "txtML";
+            this.txtML.Size = new System.Drawing.Size(100, 20);
+            this.txtML.TabIndex = 0;
+            // 
+            // lblML
+            // 
+            this.lblML.AutoSize = true;
+            this.lblML.Location = new System.Drawing.Point(51, 66);
+            this.lblML.Name = "lblML";
+            this.lblML.Size = new System.Drawing.Size(110, 13);
+            this.lblML.TabIndex = 1;
+            this.lblML.Text = "Type Something Here";
+            // 
+            // btnML
+            // 
+            this.btnML.Location = new System.Drawing.Point(132, 112);
+            this.btnML.Name = "btnML";
+            this.btnML.Size = new System.Drawing.Size(75, 23);
+            this.btnML.TabIndex = 2;
+            this.btnML.Text = "Store Data";
+            this.btnML.UseVisualStyleBackColor = true;
+            this.btnML.Click += new System.EventHandler(this.btnML_Click);
+            // 
             // frmBMXNetTest
             // 
             this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
             this.ClientSize = new System.Drawing.Size(736, 566);
-            this.Controls.Add(this.tabControl1);
+            this.Controls.Add(this.mlTests);
             this.Name = "frmBMXNetTest";
             this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
             this.Text = "BMXNet Test Application";
             this.Load += new System.EventHandler(this.frmBMXNetTest_Load);
-            this.tabControl1.ResumeLayout(false);
+            this.mlTests.ResumeLayout(false);
             this.tpaQuery.ResumeLayout(false);
             this.panGrid.ResumeLayout(false);
@@ -973,4 +1018,6 @@
             this.grpPiece.ResumeLayout(false);
             this.grpPiece.PerformLayout();
+            this.tabPage1.ResumeLayout(false);
+            this.tabPage1.PerformLayout();
             this.ResumeLayout(false);
 
@@ -998,5 +1045,5 @@
 
 		private BMXNetConnectInfo m_ci;
-		private System.Windows.Forms.TabControl tabControl1;
+		private System.Windows.Forms.TabControl mlTests;
 		private System.Windows.Forms.DataGrid dataGrid2;
 		private System.Windows.Forms.Button cmdCancelChanges;
@@ -1080,4 +1127,8 @@
         private Button cmdStopLogging;
         private Button cmdStartLogging;
+        private TabPage tabPage1;
+        private Button btnML;
+        private Label lblML;
+        private TextBox txtML;
 		BMXNetDataAdapter m_da = new BMXNetDataAdapter();
 
@@ -1926,4 +1977,11 @@
         }
 
+        private void btnML_Click(object sender, EventArgs e)
+        {
+            string cmd = "KBAN BMX";
+            string result = m_ci.bmxNetLib.TransmitRPC(cmd, txtML.Text);
+            MessageBox.Show("What got sent and back is:" + result);
+        }
+
 
 
