title: can't call addSQLmethod in my main method
body: <p>Hi Currently I am trying to build a table using SQLite however I cannot see to call my method that I created into my main method. I don't really understand why I can't call it in the main method.  I have tried to make my method addSQL private and public however although I know this doesn't really affect much I still tried.  Currently it won't pick my my method at all when I try to call it in main method. Also in my addSQL method I get an error when using insertCommand saying it doesnt exist in current context</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Data.SQLite;
  using System.Linq;
  using System.Text;
  
  namespace SQLserver
  {
      class Program
      {
          static void Main(string[] args)
          {
              SQLiteConnection myConnection = new SQLiteConnection("Data source=test.db; Version=3;");
              myConnection.Open();
              /// If this is not the first time the program has run, 
              /// the table 'cars' will already exist, so we will remove it
              SQLiteCommand tableDropCommand = myConnection.CreateCommand();
              tableDropCommand.CommandText = "drop table Records";
              try
              {
                  tableDropCommand.ExecuteNonQuery();
              }
              catch (SQLiteException ex) // We expect this if the table is not present
              {
                  Console.WriteLine("Table 'Records' does  not exist");
              }
  
              /// Now create a table called 'records'
              SQLiteCommand tableCreateCommand = myConnection.CreateCommand();
              tableCreateCommand.CommandText = "create table Records (ID int, FuelType varchar(10), Price float (50), TankVolume int)";
              tableCreateCommand.ExecuteNonQuery();
  
              /// Now insert some data.
              /// First, create a generalised insert command
              SQLiteCommand insertCommand = myConnection.CreateCommand();
              insertCommand.CommandText = "insert into cars (ID, FuelType, Price, TankVolumes) values (@id, @fueltype, @price, @volume)";
              insertCommand.Parameters.Add(new SQLiteParameter("@id"));
              insertCommand.Parameters.Add(new SQLiteParameter("@fueltype"));
              insertCommand.Parameters.Add(new SQLiteParameter("@price"));
              insertCommand.Parameters.Add(new SQLiteParameter("@volume"));
              addSQL();
          }
  
          public void addSQL()
          {
             /// Now, set the values for the insert command and add two records
             insertCommand.Parameters["@id"].Value = 1;
             insertCommand.Parameters["@manufacturer"].Value = "Ford";
             insertCommand.Parameters["@model"].Value = "Focus";
             insertCommand.Parameters["@seats"].Value = 5;
             insertCommand.Parameters["@doors"].Value = 5;
             insertCommand.ExecuteNonQuery();
  
         }
  
      }
  }
  </code></pre>