[color=blue]實現的乙個搜尋的功能:
把**記錄一下
儲存過程的其中之一:
create procedure seljishu
@selstr nvarchar(4000)
asselect edaic from tb_jishuwenzhang where edaic like '%'+@selstr+'%'
union
select gongyi from tb_jishuwenzhang where gongyi like '%'+@selstr+'%'
union
select ceshi from tb_jishuwenzhang where ceshi like '%'+@selstr+'%'
union
select chuangan from tb_jishuwenzhang where chuangan like '%'+@selstr+'%'
union
select fangda from tb_jishuwenzhang where fangda like '%'+@selstr+'%'
union
select rf from tb_jishuwenzhang where rf like '%'+@selstr+'%'
union
select shuzi from tb_jishuwenzhang where shuzi like '%'+@selstr+'%'
union
select kongzhi from tb_jishuwenzhang where kongzhi like '%'+@selstr+'%'
union
select wangluo from tb_jishuwenzhang where wangluo like '%'+@selstr+'%'
union
select jiekou from tb_jishuwenzhang where jiekou like '%'+@selstr+'%'
union
select huanchong from tb_jishuwenzhang where huanchong like '%'+@selstr+'%'
union
select gonglv from tb_jishuwenzhang where gonglv like '%'+@selstr+'%'
union
select emiemc from tb_jishuwenzhang where emiemc like '%'+@selstr+'%'
union
select guangdian from tb_jishuwenzhang where guangdian like '%'+@selstr+'%'
union
select qianru from tb_jishuwenzhang where qianru like '%'+@selstr+'%'
union
select kebian from tb_jishuwenzhang where kebian like '%'+@selstr+'%'
union
select anquan from tb_jishuwenzhang where anquan like '%'+@selstr+'%'
gojsp頁面裡的呼叫:
condata con=new condata();
connection conn=con.getconnection();
callablestatement cmt=conn.preparecall("");
cmt.setstring(1,s);
resultset rs= cmt.executequery();
while(rs.next())
rs.close();
cmt.close();
conn.close();
我用連線池連的資料庫,**挺多就不放了。
還有一件事,寫程式一定要注意多儲存檔案。
一定要注意![/color]
jsp呼叫儲存過程
儲存過程 create or replace procedure proce test a in varchar2,b in varchar2,c out varchar2 asbegin c a b end proce test 儲存過程有兩個輸入乙個輸出引數 class.forname orac...
JSP呼叫儲存過程方式
jsp呼叫儲存過程方式 callablestatement cstmt conn.preparecall 有幾個引數就有幾個問號。cstmt.setfloat 1,param 設定第乙個引數 輸入 cstmt.registeroutparameter 2,types.float 設定第二個引數 輸出...
jsp中呼叫儲存過程
create or replace procedure proce test a in varchar2,b in varchar2,c out varchar2 asbegin c a b end proce test 儲存過程有兩個輸入乙個輸出引數 class.forname oracle.jd...