java中调用存储过程
public int ExecProcAdd()
{
SqlCommand cmd = new SqlCommand();
cmd.CommandType = CommandType.StoredProcedure;
cmd.CommandText = "adduser";//拿到存储过程的名字
//--------------------------------带参数的存储过程(3个)-----------------------------------------
SqlParameter p1 = new SqlParameter("@username",typeof(string));
SqlParameter p2 = new SqlParameter("@userpwd",typeof(string));
//-----------------------------------------------------------------------------------------
//用sqldbtype.int不会出错,最好用它
SqlParameter p3 = new SqlParameter("@userid",SqlDbType.Int);
//有返回值的存储过程
p3.Direction = ParameterDirection.Output;
p1.Value = "张三";//给带的参数赋值
p2.Value = "123456";
//将其加入到
cmd.Parameters.Add(p1);
cmd.Parameters.Add(p2);
cmd.Parameters.Add(p3);
cmd.Connection = Conn;
//-------------------------------------------------------------
相关文档:
http://techpool.javaeye.com/blog/486326
2009-10-12
JAVA如何执行DOS命令
JAVA如何执行DOS命令
下面是一种比较典型的程序模式:
...
Process process = Runtime.getRuntime().exec(".\\p.exe");
process.waitfor( );
... ......
美国旧金山时间2005年6月28日上午,在由全球10000多名开发人员出席的“2005 Java One开发者大会&r ......
java中的Synth外观
Synth,它是一个完整的外观,而不是一个主题,它针对的并不是程序员,而是界面设计人员,让他们不必掌握Java 知识便能够进行相应界面的选择定制。采用了Synth 后,我们不能从现有外观或主题派生子类、修改字体或颜色,而是通过转载不同的XML 文件以达到对 ......
<!--
/* Font Definitions */
@font-face
{font-family:宋体;
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-alt:SimSun;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:3 135135232 16 0 262145 0;}
@font-face
{font-family:Verdana;
panose ......