Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   System.InvalidCastException (http://www.velocityreviews.com/forums/t78475-system-invalidcastexception.html)

Brian Conway 05-18-2004 04:52 PM

System.InvalidCastException
 
Hope someone can help. I am trying to get a submit button working and
getting this error now System.InvalidCastException: Object must implement
IConvertible. This is showing up on the ExecuteNonQuery line. Below is the
code that I have in my Page_load. I also have no idea of what code I would
use in the Submit_Click event to get the insert to work. Any help would be
appreciated

OleDbConnection conn = new
OleDbConnection("Provider=OraOLEDB.Oracle.1;Persis t Security
Info=False;"+"User ID=conference;Password=conf00;Data
Source=ntdrp001.world;");

OleDbCommand command = new OleDbCommand("CONF-REQUEST_INSERT", conn);

command.CommandType = CommandType.StoredProcedure;

command.Parameters.Add("DropDownList1", OleDbType.VarChar).Value =
DropDownList1;

command.Parameters.Add("DropDownList2", OleDbType.VarChar).Value =
DropDownList2;

command.Parameters.Add("txtEStartDate", OleDbType.Date).Value =
txtEStartDate;

command.Parameters.Add("txtEEndDate", OleDbType.Date).Value = txtEEndDate;

command.Parameters.Add("txtEStartTime", OleDbType.Numeric).Value =
txtEStartTime;

command.Parameters.Add("txtEEndTime", OleDbType.Numeric).Value =
txtEEndTime;

command.Parameters.Add("txtEventName", OleDbType.VarChar).Value =
txtEventName;

command.Parameters.Add("txtEventSize", OleDbType.Numeric).Value =
txtEventSize;

command.Parameters.Add("txtSStartDate", OleDbType.Date).Value =
txtSStartDate;

command.Parameters.Add("txtSStartTime", OleDbType.Numeric).Value =
txtSStartTime;

command.Parameters.Add("txtEventDescription", OleDbType.VarChar).Value =
txtEventDescription;

command.Parameters.Add("txtSpecialRequirements", OleDbType.VarChar).Value =
txtSpecialRequirements;

conn.Open();

int rows = command.ExecuteNonQuery();

conn.Close();






All times are GMT. The time now is 09:33 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.