You should use ADO.NET parameter objects. In addition to solving your
problem they will protect you against SQL Injection Attacks.
Here's more info:
http://msdn.microsoft.com/library/de...classtopic.asp
http://msdn.microsoft.com/library/de...isualbasic.asp
--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
"Justin" <> wrote in message
news:3CCF3547-B0C4-4C3D-A1A1-...
>I have the following insert statement:
>
> "INSERT INTO Queue(CustomerId, Status, QueueId, Type, January) VALUES
> (@CustomerId" + ", @Status, @QueueId, @Type, @January); SELECT uId,
> CustomerId, Status, QueueId, " + "Type, January FROM Queue WHERE (uId =
> @@IDENTITY)";
>
> this.sqlInsertCommand1.Parameters.Add("@January",
> System.Data.SqlDbType.VarChar, 10, "January").Value =
> ItemQueue.Items.ToString();
>
> Where you see "January" I would like to pass a vaiable depending o the
> month
> selected.
>
> How can I accomplish this task?
>
> Thanks, Justin.