我面临的问题,在更新表单视图值使用sqldatasSource绑定与Oracle数据库。
我的选择和插入事件工作正常,所有列和参数都正确。
但当我点击下面的更新按钮时,出现了错误:
"ORA-01036:非法变量名称/数字"
以下是我在sqldatasource(与oracle绑定)中使用的更新命令:
UPDATE REPORT_PINK
SET DEMOG_HEIGHT = :DEMOG_HEIGHT
, DEMOG_WEIGHT = :DEMOG_WEIGHT
, DEMOG_TX_NO = :DEMOG_TX_NO
, DEMOG_TX_PLACE = :DEMOG_TX_PLACE
, DEMOG_TX_DATE = :DEMOG_TX_DATE
, DEMOG_TX_TYPE = :DEMOG_TX_TYPE
, DEMOG_RELATIONSHIP = :DEMOG_RELATIONSHIP
, MED_HIS_CAUSE = :MED_HIS_CAUSE
, MED_HIS_ALLERGY = :MED_HIS_ALLERGY
, MED_HIS_BIOPSY_DATE = :MED_HIS_BIOPSY_DATE
, MED_HIS_DIALYSIS = :MED_HIS_DIALYSIS
, MED_HIS_DIALYSIS_DATE = :MED_HIS_DIALYSIS_DATE
, MED_HIS_PREV_TX_FIRST = :MED_HIS_PREV_TX_FIRST
, MED_HIS_PREV_TX_DATE_FIRST = :MED_HIS_PREV_TX_DATE_FIRST
, MED_HIS_PREV_TX_SECOND = :MED_HIS_PREV_TX_SECOND
, MED_HIS_PREV_TX_DATE_SECOND = :MED_HIS_PREV_TX_DATE_SECOND
, COMOR_HEART = :COMOR_HEART
, COMOR_LIVER = :COMOR_LIVER
, COMOR_HEPATITIS_B = :COMOR_HEPATITIS_B
, COMOR_HEPATITIS_C = :COMOR_HEPATITIS_C
, COMOR_DIABETES = :COMOR_DIABETES
, COMOR_TB = :COMOR_TB
, COMOR_PEPTIC = :COMOR_PEPTIC
, COMOR_CANCER = :COMOR_CANCER
, IMM_CDC_DATE = :IMM_CDC_DATE
, IMM_CDC_NORMAL_T = :IMM_CDC_NORMAL_T
, IMM_CDC_NORMAL_B = :IMM_CDC_NORMAL_B
, IMM_CDC_DTT_B = :IMM_CDC_DTT_B
, IMM_CDC_DTT_T = :IMM_CDC_DTT_T
, IMM_CDC_AHG_B = :IMM_CDC_AHG_B
, IMM_CDC_AHG_T = :IMM_CDC_AHG_T
, IMM_FLOW_DATE = :IMM_FLOW_DATE
, IMM_FLOW_IGGT_PAT = :IMM_FLOW_IGGT_PAT
, IMM_FLOW_IGGT_PRO = :IMM_FLOW_IGGT_PRO
, IMM_FLOW_IGGB_PAT = :IMM_FLOW_IGGB_PAT
, IMM_FLOW_IGGB_PRO = :IMM_FLOW_IGGB_PRO
, IMM_FLOW_IGMT_PAT = :IMM_FLOW_IGMT_PAT
, IMM_FLOW_IGMB_PAT = :IMM_FLOW_IGMB_PAT
, IMM_ANTI_HLA_PRA = :IMM_ANTI_HLA_PRA
, IMM_ANTI_HLA_PRA_DATE = :IMM_ANTI_HLA_PRA_DATE
, TC_REMUZZI_GLOMERULI_L = :TC_REMUZZI_GLOMERULI_L
, TC_REMUZZI_TUBULE_L = :TC_REMUZZI_TUBULE_L
, TC_REMUZZI_INTERSTITM_L = :TC_REMUZZI_INTERSTITM_L
, TC_REMUZZI_ARTERIS_L = :TC_REMUZZI_ARTERIS_L
, TC_REMUZZI_GLOMERULI_R = :TC_REMUZZI_GLOMERULI_R
, TC_REMUZZI_TUBULE_R = :TC_REMUZZI_TUBULE_R
, TC_REMUZZI_INTERSTITM_R = :TC_REMUZZI_INTERSTITM_R
, TC_REMUZZI_ARTERIS_R = :TC_REMUZZI_ARTERIS_R
, TC_ANAST_ARTERY = :TC_ANAST_ARTERY
, TC_ANAST_VEIN = :TC_ANAST_VEIN
, TC_ANAST_URETER = :TC_ANAST_URETER
, TC_DONATE_FIRST_ISCHEMIC = :TC_DONATE_FIRST_ISCHEMIC
, TC_DONATE_SECOND_ISCHEMIC = :TC_DONATE_SECOND_ISCHEMIC
, TC_DONATE_COLD_ISCHEMIC = :TC_DONATE_COLD_ISCHEMIC
, TC_DONATE_PERFUSION = :TC_DONATE_PERFUSION
, DONOR_NAME = :DONOR_NAME
, DONOR_NRIC = :DONOR_NRIC
, DONOR_GENDER = :DONOR_GENDER
, DONOR_AGE = :DONOR_AGE
, DONOR_DEATH = :DONOR_DEATH
, DONOR_INOTROPES = :DONOR_INOTROPES
, DONOR_ISHYPER = :DONOR_ISHYPER
, DONOR_HYPER = :DONOR_HYPER
, DONOR_ISDIABETES = :DONOR_ISDIABETES
, DONOR_DIABETES = :DONOR_DIABETES
, DONOR_ISOTHERS = :DONOR_ISOTHERS
, DONOR_OTHERS = :DONOR_OTHERS
, DONOR_UREA = :DONOR_UREA
, DONOR_CREAT = :DONOR_CREAT
, DONOR_HB = :DONOR_HB
, DONOR_PT = :DONOR_PT
, DONOR_PTT = :DONOR_PTT
, VIRO_HBSAG_RECP = :VIRO_HBSAG_RECP
, VIRO_HBSAG_RECP_DATE = :VIRO_HBSAG_RECP_DATE
, VIRO_ANTI_HB_RECP = :VIRO_ANTI_HB_RECP
, VIRO_ANTI_HB_RECP_DATE = :VIRO_ANTI_HB_RECP_DATE
, VIRO_ANTI_HBC_RECP = :VIRO_ANTI_HBC_RECP
, VIRO_ANTI_HBC_RECP_DATE = :VIRO_ANTI_HBC_RECP_DATE
, VIRO_HBV_RECP = :VIRO_HBV_RECP
, VIRO_HBV_RECP_DATE = :VIRO_HBV_RECP_DATE
, VIRO_ANTI_HCV_RECP = :VIRO_ANTI_HCV_RECP
, VIRO_ANTI_HCV_RECP_DATE = :VIRO_ANTI_HCV_RECP_DATE
, VIRO_HIV_AG_RECP = :VIRO_HIV_AG_RECP
, VIRO_HIV_AG_RECP_DATE = :VIRO_HIV_AG_RECP_DATE
, VIRO_HIV_PCR_RECP = :VIRO_HIV_PCR_RECP
, VIRO_HIV_PCR_RECP_DATE = :VIRO_HIV_PCR_RECP_DATE
, VIRO_CMV_RECP = :VIRO_CMV_RECP
, VIRO_CMV_RECP_DATE = :VIRO_CMV_RECP_DATE
, VIRO_VDRL_RECP = :VIRO_VDRL_RECP
, VIRO_VDRL_RECP_DATE = :VIRO_VDRL_RECP_DATE
, VIRO_ABO_RECP = :VIRO_ABO_RECP
, VIRO_ABO_RECP_DATE = :VIRO_ABO_RECP_DATE
, VIRO_HCV_PCR_RECP = :VIRO_HCV_PCR_RECP
, VIRO_HCV_PCR_RECP_DATE = :VIRO_HCV_PCR_RECP_DATE
, VIRO_HBSAG_DONOR = :VIRO_HBSAG_DONOR
, VIRO_HBSAG_DONOR_DATE = :VIRO_HBSAG_DONOR_DATE
, VIRO_ANTI_HB_DONOR = :VIRO_ANTI_HB_DONOR
, VIRO_ANTI_HB_DONOR_DATE = :VIRO_ANTI_HB_DONOR_DATE
, VIRO_ANTI_HBC_DONOR = :VIRO_ANTI_HBC_DONOR
, VIRO_ANTI_HBC_DONOR_DATE = :VIRO_ANTI_HBC_DONOR_DATE
, VIRO_HBV_DONOR = :VIRO_HBV_DONOR
, VIRO_HBV_DONOR_DATE = :VIRO_HBV_DONOR_DATE
, VIRO_ANTI_HCV_DONOR = :VIRO_ANTI_HCV_DONOR
, VIRO_ANTI_HCV_DONOR_DATE = :VIRO_ANTI_HCV_DONOR_DATE
, VIRO_HCV_PCR_DONOR = :VIRO_HCV_PCR_DONOR
, VIRO_HCV_PCR_DONOR_DATE = :VIRO_HCV_PCR_DONOR_DATE
, VIRO_HIV_AG_DONOR = :VIRO_HIV_AG_DONOR
, VIRO_HIV_AG_DONOR_DATE = :VIRO_HIV_AG_DONOR_DATE
, VIRO_HIV_PCR_DONOR = :VIRO_HIV_PCR_DONOR
, VIRO_HIV_PCR_DONOR_DATE = :VIRO_HIV_PCR_DONOR_DATE
, VIRO_CMV_DONOR = :VIRO_CMV_DONOR
, VIRO_CMV_DONOR_DATE = :VIRO_CMV_DONOR_DATE
, VIRO_VDRL_DONOR = :VIRO_VDRL_DONOR
, VIRO_VDRL_DONOR_DATE = :VIRO_VDRL_DONOR_DATE
, VIRO_ABO_DONOR = :VIRO_ABO_DONOR
, VIRO_ABO_DONOR_DATE = :VIRO_ABO_DONOR_DATE
, HLA_A1_RECP = :HLA_A1_RECP
, HLA_A2_RECP = :HLA_A2_RECP
, HLA_B1_RECP = :HLA_B1_RECP
, HLA_B2_RECP = :HLA_B2_RECP
, HLA_DR1_RECP = :HLA_DR1_RECP
, HLA_DR2_RECP = :HLA_DR2_RECP
, HLA_ANTITITRE_RECP = :HLA_ANTITITRE_RECP
, HLA_A1_DONOR = :HLA_A1_DONOR
, HLA_A2_DONOR = :HLA_A2_DONOR
, HLA_B1_DONOR = :HLA_B1_DONOR
, HLA_B2_DONOR = :HLA_B2_DONOR
, HLA_DR1_DONOR = :HLA_DR1_DONOR
, HLA_DR2_DONOR = :HLA_DR2_DONOR
, HLA_ANTITITRE_DONOR = :HLA_ANTITITRE_DONOR
WHERE PAT_ID = :PAT_ID
我的问题解决了,因为我没有使用主键来匹配在哪里条件,当我用主键更改在哪里条件时,它开始工作。
在使用sqldatasSource(或oracle)时,是否必须使用主键给出where条件,因为通常我们可以在手动更新记录时放置任何where条件。
是的,我认为必须使用主键才能使用SqlDataSource触发更新查询,如果您使用SqlDataSource与Oracle,SQL服务器或任何其他数据源。
原因可能是SqlDataSource一次只允许编辑一条记录,因此更改将只反映一条记录,而不是多条记录。
请帮帮我 获取日期范围的数据时出错 错误 ora-01036非法变量名称/编号
我有下面的insert查询 每次我尝试运行此查询时,都会出现此错误 我做了一些研究,显然这意味着其中一个变量不在SQL语句中。对我来说不是这样,我检查了语句、数据库(oracle)表和所有绑定变量,它们都匹配。 错误上的行号将表明它是$driveable变量。我做了一个检查,这是被发送到页面罚款。 不知道还有什么地方可以看,所以任何帮助都会很好。
为什么在Oracle DB中出现此错误? cx_Oracle。ORA-01036:非法变量名称/数字
我已经创建了一个API,希望将数据插入oracle数据库。但我收到一条错误消息“error:ORA-01036:非法变量名/编号”。我不知道我犯了什么错误。希望能帮我解决这个问题。先谢谢你。 [错误:ORA-01036:非法变量名/编号]{errorNum:1036,偏移量:0}
我想更新gridview中的行的单元格。但我得到的错误是 ORA-01036:非法变量名称/编号 在 下面是我的代码:-
我有一个网格视图。它连接到一个SqlDataSource。我的数据库是Oracle。 当我运行网页时,选择command works,我会看到列表中的项目。单击“删除”按钮时,出现以下错误: ORA-01036:非法变量名称/数字 以下是我的GridView和SqlDataSource: