Question: I am currently trying to complete a transaction for a web based app, however;

```
Procedure or function 'completeTransaction' expects parameter '@dateTime', which was not supplied.

```

Here is copy of the function.

```
public static void completeTransaction(string storeCode, string employeeId, DateTime Date, string itemListNoId)
{
    using (SqlConnection conn = new SqlConnection("Data Source = ; Initial Catalog =Business ; Integrated Security = true;"))
    {
        using (SqlCommand command = new SqlCommand("dbo.completeTransaction", conn))
        {
            command.CommandType = CommandType.StoredProcedure;
            command.Parameters.Add("@storeCode", SqlDbType.Int).Value = storeCode;
            command.Parameters.Add("@employeeId", SqlDbType.Int).Value = employeeId;
            **command.Parameters.Add("@Date", SqlDbType.DateTime).Value = Date;**
            command.Parameters.Add("@itemListNoId", SqlDbType.Int).Value = itemListNoId;
            conn.Open();

            command.ExecuteNonQuery();
            conn.Close();
        }
    }
}

```

My sql table contains the following tables and types (storeCode, INT, employee, INT, Date, DATETIME, itemListNoId, INT)

Answer: 
You do not pass a parameter called @dateTime. It seems like this line

```
command.Parameters.Add("@Date", SqlDbType.DateTime).Value = Date;

```

Should be

```
command.Parameters.Add("@dateTime", SqlDbType.DateTime).Value = Date;

```

But without the SP source code it is hard to be sure. Keep in mind that SQL Server is complaining about the NAME of the parameter not about its type.
> 
> expects parameter **'@dateTime'**
> 
> 
> 

You passed a parameter named `@Date`.