a我考网

 找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 153|回复: 2

[基础知识] JAVA基础:java调用存贮过程(2)

[复制链接]
发表于 2012-8-4 12:37:27 | 显示全部楼层 |阅读模式
private int UpdateImg( ImageStore img ){   /**0 _, F; M( O9 |# Q$ A& r
  CREATE PROCEDURE [convertImgStoreUpdate]   @width int ,@high int ,@typeflag2  tinyint,@ActualHeight int ,@ActualWidth int ,@OriginalSize bigint,0 }7 }0 u" A! ]3 x
  @SmallJpgSize bigint,@SmallJpgHeight int,@SmallJpgWidth int,4 p, T! k8 ]7 ]6 F
  @SmallGifSize bigint,@SmallGifHeight int,@SmallGifWidth int,
5 d8 R7 Z% f' F2 B7 X# p  @BigGifSize bigint,@BigGifHeight int,@BigGifWidth int,
: c  U8 a; B1 H* m  @BigJpgSize bigint,@BigJpgHeight int,@BigJpgWidth int,4 }: H: Z7 H5 @) |/ M. y( F  j
  @ThumbGifSize bigint,@ThumbJpgSize bigint,
8 r) q+ K0 V" q  ]  @url  nvarchar(4000)4 i$ h$ a* W; b6 J
  AS) J8 f* Q* }) o3 S8 B( Y( O
  update imgStore set Haslarge=1,Width=@width,High=@high,Fetchflag=2,typeflag=@typeflag2,  Actual_Height=@ActualHeight ,Actual_Width=@ActualWidth, Original_Size=@OriginalSize
  _( E7 c9 \' @, @  ,SmallJpgSize=@SmallJpgSize,SmallJpgHeight=@SmallJpgHeight,SmallJpgWidth=@SmallJpgWidth
3 g% f8 R4 w" W# D4 @3 C  ,SmallGifSize=@SmallGifSize,SmallGifHeight=@SmallGifHeight,SmallGifWidth=@SmallGifWidth7 F& V8 ?8 b  ?7 u, `
  ,BigGifSize=@BigGifSize,BigGifHeight=@BigGifHeight,BigGifWidth=@BigGifWidth
) U3 p7 _/ Q8 Q" y4 G+ \5 s1 r  ,BigJpgSize=@BigJpgSize,BigJpgHeight=@BigJpgHeight,BigJpgWidth=@BigJpgWidth
3 ?' Q1 M- @# ]. m" }( |  ,ThumbGifSize=@ThumbGifSize,ThumbJpgSize=@ThumbJpgSize
0 ]1 q% J- h0 C! F9 i# |7 J  where url=@url# I$ ?1 G! I7 P
  GO- L- T; n' @$ i" e4 J7 C
  */  `! o; Q3 |! H& M0 A0 i
  try {* k, k! h8 N5 O* m7 b2 {( w2 ^

5 |) O$ e& C% H2 |  lock.lock();
回复

使用道具 举报

 楼主| 发表于 2012-8-4 12:37:28 | 显示全部楼层

JAVA基础:java调用存贮过程(2)

</p>  PreparedStatement pre = getConnection().prepareStatement("Exec convertImgStoreUpdate2 ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?");
' \1 F7 n1 z: [9 Q: G+ |1 z' P  pre.setInt(1,img.getFetchflag().intValue());
& L* C: k9 J* S( T. n( W  pre.setInt(2,img.getHas176().intValue());" h: {! j' i! ~/ G9 G. p$ w6 f
  pre.setInt(3,img.getHas240().intValue());2 l! U  }1 d: F% J! e" P8 b! ?
  pre.setInt(4,img.getTypeflag().intValue());
8 s, b9 f$ w, j. ?  pre.setInt(5,img.getJpgWsrc().intValue());0 ?, R' W, x& h8 B6 t
  pre.setLong(6,img.getJpgHsrc().intValue());
. t1 T) s1 G! x7 T  pre.setLong(7,img.getJpgSsrc().longValue());5 S( Y7 a! C7 d8 _# C/ _" w
  pre.setInt(8,img.getGifS100().intValue());2 E8 R, w9 `% D
  pre.setInt(9,img.getGifH100().intValue());( J  D) H7 b9 O; M* L* f$ |9 w
  pre.setLong(10,img.getGifW100().longValue());
1 K2 p! p, f- v7 O% [8 k1 s$ |! J7 c  pre.setInt(11,img.getJpgS100().intValue());* o0 e7 O8 f* h. j
  pre.setInt(12,img.getJpgH100().intValue());, M& K  o, w5 \, n: i
  pre.setLong(13,img.getJpgW100().longValue());
. Y" h* V- I+ R3 Y# j$ }8 G* A  pre.setInt(14,img.getGifS128().intValue());6 ^8 d  g* }9 H; V/ B. L
  pre.setInt(15,img.getGifH128().intValue());6 u3 |1 p0 }  Z
  pre.setLong(16,img.getGifW128().longValue());/ F/ Y' A$ W, U2 f
  pre.setInt(17,img.getJpgS128().intValue());7 c. k  A8 C1 j5 Y9 O( `& A& Q3 R
  pre.setInt(18,img.getJpgH128().intValue());
4 o8 H) y+ x4 B( O" _) Z0 B6 |+ B  pre.setLong(19,img.getJpgW128().longValue());
" d- f! q8 _6 ?( P  pre.setInt(20,img.getGifS176().intValue());
9 v' u1 Q. j7 F# i( z  pre.setInt(21,img.getGifH176().intValue());( ?2 F5 E' A2 x) C5 V" D* \
  pre.setLong(22,img.getGifW176().longValue());- A; p* ?4 v% O$ J7 L1 o! ~
  pre.setInt(23,img.getJpgS176().intValue());. g9 ~8 r3 U  b, u6 {! N
  pre.setInt(24,img.getJpgH176().intValue());
/ k% A' w- d0 Q  pre.setLong(25,img.getJpgW176().longValue());
; V0 h5 o7 w. R# Q0 i; Q  pre.setInt(26,img.getGifS240().intValue());
) c/ D; F$ @7 u1 p  pre.setInt(27,img.getGifH240().intValue());7 Z7 m5 d5 `4 ^3 u4 x" u
  pre.setLong(28,img.getGifW240().longValue());! n6 h+ ?6 p6 i9 h$ U) Z( C  t
  pre.setInt(29,img.getJpgS240().intValue());
. V* n. K% C# a) c8 k- P  J# a  pre.setInt(30,img.getJpgH240().intValue());
7 s7 }0 Y. s+ i  pre.setLong(31,img.getJpgW240().longValue());
' v' p' A0 H% C' C1 |  //     pre.setInt(14,img.getGifH176().intValue());
1 f+ F( L: \* ^9 B. e2 K3 ^  //     pre.setInt(15,img.getGifW176().intValue());
8 a4 f* I- o$ n6 t' b  //$ }% B9 [, Z- R! z& ~( g  }
  //     pre.setLong(16,img.getJpgS176().longValue());
) F* [1 H& V3 m3 Y# p  //     pre.setInt(17,img.getJpgH176().intValue());
8 x/ i+ Q$ F$ |5 j$ B8 h$ {  //     pre.setInt(18,img.getJpgW176().intValue());
  M  r+ K7 A, O, f, q% e8 q+ Z( V2 \3 A6 @  I1 ~6 q
  //
回复 支持 反对

使用道具 举报

 楼主| 发表于 2012-8-4 12:37:29 | 显示全部楼层

JAVA基础:java调用存贮过程(2)

</p>  //     pre.setLong(19,img.getGifS100().longValue());  a/ u% A) O8 D( x$ {4 z0 A( [0 G( ^
  //     pre.setLong(20,img.getJpgS100());; Y. L4 s: Y; m# M' O8 o. L; @: y
  //
' D2 ]/ Q9 V3 @/ a  pre.setInt(32,img.getId());) K  B: Y4 i% @; J* ]
  return pre.executeUpdate();
) |; s/ n0 ?) x' H; E2 s; Z, R  } catch (Exception e) {) s/ B' G. t+ w' [6 R  H6 x
  // TODO Auto-generated catch block! F+ e7 V9 v( C  l
  e.printStackTrace();- `$ W+ a- s4 e4 r9 b' g( i
  } finally {
3 E% i% Q& w7 e' X( J, o  lock.unlock();
: N- A2 s0 z: c! {  }
( s, S: y6 `! \  return 0;
" q1 E5 O$ ^! M$ k  F7 k" I' m  }
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Woexam.Com ( 湘ICP备18023104号 )

GMT+8, 2024-5-6 12:14 , Processed in 0.196490 second(s), 25 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表