分类文章

热门文章

ORA-01006: bind variable does not exist

ORA-01006: bind variable does not exist 绑定的变量不存在
今天遇到了个很怪异的问题,用jdbc的时候报出这个错误,刚开始还以为是sql里面字段与表结构不匹配,查了好久才找出解决办法
代码

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
INSERT INTO T_Group_driver
  (GROUP_DRIVER_ID,
   GROUP_ID,
   CUR_POSITION,
   LAST_CUR_MODIFIED_TIME,
   PSEUDO_CODE,
   NETLUCK_NO,
   DRIVER_ID,
   REALNAME,
   FREIGHT_STATE,
   CART_BADGE_NO,
   CART_TYPE,
   CART_TONNAGE,
   CART_LENGTH,
   CART_WIDTH,
   CART_HEIGHT,
   CART_VOLUME,
   CREATED_TIME,
   LAST_MODIFIED_TIME,
   NOTE,
   ORG_ID,
   ORG_NAME,
   ORG_AREA_CODE,
   DIRECTION,
   ORG_TEL_NO,
   INCREMENT_ID,
   BEGIN_TIME,
   EXPIRE_TIME,
   MANUFACTURER,
   AXLE,
   SUPPLYOFGOODS,
   CORPS,
   IS_DEL)
VALUES
  (SE_GROUP_DRIVER_ID.NEXTVAL,
   ?,
   ?,
   TO_DATE('?', 'yyyy-mm-dd hh24:mi:ss'),
   ?,
   ?,
   ?,
   ?,
   ?,
   ?,
   ?,
   ?,
   ?,
   ?,
   ?,
   ?,
   SYSDATE,
   SYSDATE,
   '',
   ?,
   ?,
   ?,
   ?,
   ?,
   ?,
   SYSDATE,
   SYSDATE + 365,
   ?,
   ?,
   ?,
   ?,
   0)

错误就在于to_date(’?', ‘yyyy-mm-dd hh24:mi:ss’)中的?要把单引号去掉
不过抛出ORA-01006: bind variable does not exist这种异常来实在是百思不得其解啊

随机文章



分享生活也赚钱,赶快加入吧

Loading…

相关文章:

  1. The BASEDIR environment variable is not defined correctly
  2. oracle add_months函数

请给本文打分   
1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)
Loading ... Loading ...

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word