字体:  

Linux下,jdbc怎么连接Sybase数据库啊?

可爱猫 发表于: 2006-4-25 13:51 来源: 立华软件园博客

Linux下的Sybase有Jdbc驱动程序吗?  
Linux下,jdbc怎么连接Sybase数据库啊?

最新回复

流浪天崖 at 2006-4-25 13:52:06
Class.forName("com.sybase.jdbc.SybDriver").newInstance();      
String  url  ="  jdbc:sybase:Tds:localhost:5007/tsdata";      
//tsdata为你的数据库名      
Properties  sysProps  =  System.getProperties();      
SysProps.put("user","userid");      
SysProps.put("password","user_password");      
Connection  conn=  DriverManager.getConnection(url,  SysProps);      
Statement  stmt=conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);