Here's a code snipet. Can anyone tell me how to get past the
exception? I really need to ignore the PRINT statements and move on.
AseConnection cn = new AseConnection
(ConfigurationManager.ConnectionStrings
["ASEConnection"].ConnectionString); //Set
connection
cn.InfoMessage += new AseInfoMessageEventHandler
(cn_InfoMessage);
AseCommand cmd = new AseCommand("sspGetLtLabelShapes",
cn); //to workflow_data
AseDataReader dr;
ArrayList al = new ArrayList
(); //Array List for the Shapes
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add("@inSetID",
SETID); // Loading SetID
try
{ //
Attempt to hit the DB for Shapes
cn.Open();
dr = cmd.ExecuteReader(CommandBehavior.Default);
while (dr.Read())
{
Label lb = new Label
(); // Create new label for arrary
lb.Id = dr["shape_id"].ToString
(); // Set Label ID
lb.Name = dr["shape_descr"].ToString
(); // Set Label Name
al.Add
(lb); // Add it to the
list
}
Labels = (Label[])al.ToArray(typeof
(Label)); // Convert the Array list to an array for
return
}
catch (Exception ex)
{ //
In the event of failure
Labels = new Label
[1]; // return the error in
the shape name
Labels[0] = new Label
(); // and a zero in the ID
Labels[0].Name = ex.Message;
Labels[0].Id = "0";
}
finally
{
cn.Close
(); // Clean it up
cn.Dispose();
cmd.Dispose();
al.Clear();
}
<Andrew...@cenveo.com> wrote in message
news:413b61f3-ae00-416d...@q41g2000vba.googlegroups.com...