0
 DataSet ds = default(DataSet);
    SqlConnection cnx = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["asdfjkl"].ConnectionString);
    String query = "SELECT stamp as 'Date', order_No as 'Order #', places.label as 'Location' FROM order_info, places WHERE places_id = '#' and places.label = 'Detroit, MI' and stamp between @sDate and @eDate";
    SqlCommand cmd = new SqlCommand(query, cnx);
    cmd.CommandType = CommandType.Text;
    cmd.Parameters.AddWithValue("@sDate", sDate);
    cmd.Parameters.AddWithValue("@eDate", eDate);
    SqlDataAdapter da = new SqlDataAdapter(cmd);
    try
    {
        cnx.Open();
        da.Fill(ds);
        cnx.Close();
    }
    catch (Exception ex)
    {
        Debug.Print(ex.Message);
    }
    finally
    {
        if (cnx != null) cnx.Close();
    }

// I believe the logic here is sound, however, as a C# n00b, I'm slightly at a loss as to what would cause the error I received (e.g., Format of the initialization string does not conform to specification starting at Index 0.) //

Cryptik
  • 3
  • 7
  • Note: I was able to resolve the formatting issue by using the full and complete ConnectionString params found in web.config to initialize the connection. – Cryptik Sep 10 '15 at 14:35
  • my apologies if this was a duplicate thread. – Cryptik Sep 10 '15 at 14:35

0 Answers0