title: "Format of the initialization string does not conform to specification starting at index 0."
body: <p>I got this error:</p>
  
  <blockquote>
    <p>Format of the initialization string does not conform to specification
    starting at index 0.</p>
  </blockquote>
  
  <p>My code is :</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.ComponentModel;
  using System.Data;
  using System.Data.SqlClient;
  using System.Drawing;
  using System.Linq;
  using System.Text;
  using System.Windows.Forms;
  using System.Security.Cryptography;
  using System.Data.OleDb;
  using System.Configuration;
  
  namespace LibrarySystem
  {
      public partial class PIDD : Form
      {
          public PIDD()
          {
              InitializeComponent();
          }
  
          private void button1_Click(object sender, EventArgs e)
          {
              this.Close();
              frmMed Med = new frmMed();
              Med.Show();
  
              var conn = new SqlConnection("ConnectionString");
              //var command = new SqlCommand("Patient.dbo.P_ID", connection);
              var command = new SqlCommand("SELECT P_ID FROM Patient WHERE id='" + textBox1.Text + "",connection);
  
              connection.Open();
              var reader = command.ExecuteReader();
              if (reader.Read())
              {
                  textBox1.Text = reader["id"].ToString();
              }
              else
              {
                  // No entry found
              }
              connection.Close();
          }
  
          private void textBox1_TextChanged(object sender, EventArgs e)
          {
          }
  
          public SqlConnection connection { get; set; }
      }
  }
  </code></pre>
  
  <p>I'm trying to write ID that already exists in the DB and check if ID Correct ,, then show it in next fram ,,</p>