I'm trying to figure out if it's possible to format a string from a sourceColumn when adding a parameter to a SqlCommand.
So something like this
cmd.Parameters.Add("@sdate", SqlDbType.VarChar, 25, "start_date");
I don't know how the syntax would be if this would be possible. Something like:
cmd.Parameters.Add("@sdate", SqlDbType.VarChar, 25, string.Format("{0} {1}", "start_date", "12:00 AM"));
I'm sure this wouldn't work, because then it would just look for a column name of "start_date 12:00 AM"
Hopefully it makes sense what I'm trying to do.
Thanks!