create table 不能用吗?
有没有create temp table?
有没有create temp table?
解决方案 »
- javax.naming.NameNotFoundException: Name ds is not bound in this Context
- 求一个灯芯的 粒子系统。
- 关于applet访问数据库的问题!!
- 请教一个webservice的问题
- MM7 报出的 java.lang.IndexOutOfBoundsException: Index: 1, Size: 1 错误怎么解决?
- 用什么方法可以判断出某JInternalFrame A 已经添加到 JFrame B 中去了?
- JFileChooser的打开对话框,如何能选择一个文件夹,点击确定,就关闭对话框?
- 求救!调用jface.action.Action类中run()方法为何总报错?
- 如何学好java请大侠指点,在线等候
- 这2个程序的输出结果是多少?? 请大家帮忙看看
- sql server 2000连接出现socket错误
- 哪儿有java写的ftp搜索引擎的例子?
可以把数据保存到内存中,其他操作类似recordset
http://developer.java.sun.com/developer/technicalArticles/javaserverpages/cachedrowset/
不过兄长,可能我没有把问题说清楚,我是在java中编的一个类,然后再在jsp中调用这个类,通过传不同的参数来建不同“表名”的临时表,不过我在jsp中无论怎么调用,服务器老出错,下面是我的程序源代码类中的创建表的方法
其中CREATE_STATION_TEMP我在类变量中定义为
private String CREATE_STATION_TEMP="create table ?(name char(10),age int)";
创建表的方法:
public void createTable(String s)
{
Connection con=null;
PreparedStatement pstmt=null;
String tablename="";
try{
tablename=s+"station";
con=DbConnectionManager.getConnection();
pstmt=con.prepareStatement(CREATE_STATION_TEMP);
pstmt.setObject(1,tablename);
pstmt.executeUpdate();
}
catch(Exception ex_){
System.out.println("happen error in create table! please contact with Mr ding");
}
finally{
try {pstmt.close();}
catch (Exception e) {e.printStackTrace();}
try {con.close();}
catch (Exception e) {e.printStackTrace();}
}
}
注:
各位高手,谁能帮助小弟一把,虽然我没有什么分,但我仅有的是一份赤诚,上进的心,谢谢各位了
我想通过jsp来把这个参数传过来,兄长,你看见了我刚才在上面写的那一段源代码了吗?麻烦帮我看一下好吗?
不胜感激!!