Java??洢???????÷???
???????????? ???????[ 2014/11/6 11:13:13 ] ????????Java ???? ???????
????D??????????洢????
?????????洢?????
????create procedure ModPro
????@StuID int??
????@StuName varchar(10)
????as
????update ???????????? set StuName=@StuName where StuID=@StuID
???????д洢?????
????exec ModPro 2??'???'
????JAVA????洢?????
import java.sql.*;
public class ProcedureTest
{
public static void main(String args[]) throws Exception
{
//????????
DriverManager.registerDriver(new sun.jdbc.odbc.JdbcOdbcDriver());
//???????
Connection conn=DriverManager.getConnection("jdbc:odbc:mydata"??"sa"??"");
//?????洢????????
CallableStatement c=conn.prepareCall("{call ModPro(????)}");
c.setInt(1??2);
c.setString(2??"???");
c.execute();
c=conn.prepareCall("{call selePro}");
ResultSet rs=c.executeQuery();
while(rs.next())
{
String Stu=rs.getString("StuID");
String name=rs.getString("StuName");
String add=rs.getString("StuAddress");
System.out.println ("???:"+" "+"????:"+" "+"???");
System.out.println (Stu+" "+name+" "+add);
}
c.close();
}
}
????E??????????洢????(??????)
?????洢?????
????create procedure FindCusts
????@cust varchar(10)
????as
????select customerid from orders where customerid
????like '%'+@cust+'%'
???????У?
????execute FindCusts 'alfki'
??????JAVA?е????
import java.sql.*;
public class ProcedureTest
{
public static void main(String args[]) throws Exception
{
//????????
DriverManager.registerDriver(new sun.jdbc.odbc.JdbcOdbcDriver());
//???????
Connection conn=DriverManager.getConnection("jdbc:odbc:mydata"??"sa"??"");
//?????洢????????
CallableStatement c=conn.prepareCall("{call FindCusts(?)}");
c.setString(1??"Tom");
ResultSet rs=c.executeQuery();
while(rs.next())
{
String cust=rs.getString("customerid");
System.out.println (cust);
}
c.close();
}
}
????F??????????洢????
?????洢?????
????create procedure InsertPro
????@StuID int??
????@StuName varchar(10)??
????@StuAddress varchar(20)
????as
????insert into ???????????? values(@StuID??@StuName??@StuAddress)
????????洢?????
????exec InsertPro 5??'555'??'555'
??????JAVA?????У?
import java.sql.*;
public class ProcedureTest
{
public static void main(String args[]) throws Exception
{
//????????
DriverManager.registerDriver(new sun.jdbc.odbc.JdbcOdbcDriver());
//???????
Connection conn=DriverManager.getConnection("jdbc:odbc:mydata"??"sa"??"");
//?????洢????????
CallableStatement c=conn.prepareCall("{call InsertPro(???????)}");
c.setInt(1??6);
c.setString(2??"Liu");
c.setString(3??"wuhan");
c.execute();
c=conn.prepareCall("{call selePro}");
ResultSet rs=c.executeQuery();
while(rs.next())
{
String stuid=rs.getString("StuID");
String name=rs.getString("StuName");
String address=rs.getString("StuAddress");
System.out.println (stuid+" "+name+" "+address);
}
c.close();
}
}
????G????JAVA?д????洢???? ??????JAVA????????
import java.sql.*;
public class ProcedureTest
{
public static void main(String args[]) throws Exception
{
//????????
DriverManager.registerDriver(new sun.jdbc.odbc.JdbcOdbcDriver());
//???????
Connection conn=DriverManager.getConnection("jdbc:odbc:mydata"??"sa"??"");
Statement stmt=conn.createStatement();
//??JAVA?д????洢????
stmt.executeUpdate("create procedure OOP as select * from ????????");
CallableStatement c=conn.prepareCall("{call OOP}");
ResultSet rs=c.executeQuery();
while(rs.next())
{
String chinese=rs.getString("Chinese");
System.out.println (chinese);
}
conn.close();
}
}
???????????????????????漰???????????????????SPASVOС??(021-61079698-8054)?????????????????????????
??????
Java???????????Щ???????????????Java????????????????Java?б???Map????????Java Web???????????????Java??????????????д?????Java????????7???????????????????????(java .net ?????)???Java??????????Python??????Java webdriver??λ????????′????е?????Java??д??????????????????Java???????????????JavaScript????????????Java?????????????????? Java???????10??????????????Java?м????????????????java???????ü???????????м???????????????????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11????????
?????????App Bug???????????????????????Jmeter?????????QC??????APP????????????????app?????е????????jenkins+testng+ant+webdriver??????????????JMeter????HTTP???????Selenium 2.0 WebDriver ??????