Oracle日期时间字段 [英] Oracle Date Time Field
问题描述
我的申请中出现以下错误
I m getting the following error in my application
ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'DELETE_SUPPLIERDETAILS'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
我明白这是因为日期时间字段发生了正在使用..任何人都可以让我知道如何格式化这种格式的字段以字符串格式传递它。
这是我的代码
I understand like this is happening due to the datetime field that is being use.. can anyone let me know how can format the field in this format passing it in a string format.
Here is my code below
protected void gdvData_RowCommand(object sender, GridViewCommandEventArgs e)
{
InBoundDataBO obj = new InBoundDataBO();
if (e.CommandName == "Delete")
{
int index = int.Parse(e.CommandArgument.ToString());
GridViewRow row = gdvData.Rows[index];
string SOURCE_ENTITY = (row.Cells[2].Text.ToString());
string PLANT_CODE = (row.Cells[3].Text.ToString());
string SUPPLIER_NUMBER = (row.Cells[4].Text.ToString());
int SUPPLIER_GROUP_NUMBER = Convert.ToInt32(row.Cells[5].Text.ToString());
DateTime LOAD_DATE = Convert.ToDateTime(row.Cells[6].Text.ToString());
DateTime LAST_UPDATED_DATETIME = Convert.ToDateTime(row.Cells[7].Text.ToString());
string message = string.Empty;
int x = obj.DeleteSupplierDetails(SOURCE_ENTITY, PLANT_CODE, SUPPLIER_NUMBER, SUPPLIER_GROUP_NUMBER, LOAD_DATE, LAST_UPDATED_DATETIME, out message);
LOAD_DATE和LAST_UPDATED_DATETIME是这种情况下的日期时间字段
或任何其他想法摆脱这个错误是受欢迎的
LOAD_DATE and LAST_UPDATED_DATETIME are the Date time fields in this case
OR any other idea to get rid of this error is welcome
推荐答案
好吧,让我们从显而易见的开始
这里
ok, lets start with the obvious
here
DateTime LOAD_DATE = Convert.ToDateTime(row.Cells[6].Text.ToString());
DateTime LAST_UPDATED_DATETIME = Convert.ToDateTime(row.Cells[7].Text.ToString());
string message = string.Empty;
int x = obj.DeleteSupplierDetails(SOURCE_ENTITY, PLANT_CODE, SUPPLIER_NUMBER, SUPPLIER_GROUP_NUMBER, LOAD_DATE, LAST_UPDATED_DATETIME, out message);
LOAD_DATE
LAST_UPDATED_DATETIME
日期时间
此处
LOAD_DATE
LAST_UPDATED_DATETIME
Are DateTime
Whereas here
public int DeleteSupplierDetails(string SourceEntity, string PlantCode, string SupplierNumber, int SupplierGroupNumber, String LoadDate, String LastUpdatedDateTime, out string message)
LoadDate和LastUpdatedDateTime是String
LoadDate and LastUpdatedDateTime are String
这篇关于Oracle日期时间字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!