Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

javaÁ¬½ÓÊý¾Ý¿âÎÊÌ⣬¼±¼± - Java / Java SE

ΪʲôÁ¬½Ó²»³É¹¦ÄØ£¿ÄĸöÄܽâ´ðÏÂ
ÎÒÁ¬½ÓÊý¾Ý¿âsql server 2005  
ÏÂÁËjdbcÇý¶¯ÅäÖÃÁ˺ܶà´Î¶¼²»³É¹¦  
ÓÐÄĸöÅóÓÑÖªµÀÔõÑùÅäÖÃÂ𣿠 

Õâ¸öÏÂÃæ´úÂëÁ¬½Ó³öÏÖµÄÎÊÌâ  
  at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at test.main(test.java:12)

Java code:

import java.sql.*;
public class test
{
public static void main(String[] args)
{
Connection con=null;
Statement stmt=null;
ResultSet rs=null;
try
{
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
con=DriverManager.getConnection("jdbc:sqlserver://localhost:1433;integratedSecurity=true;DatabaseName=JSPTest","sa","java");
stmt = con.createStatement();
rs = stmt.executeQuery("select userName,passWord,email from regist");
while(rs.next())
{
String strUserName = rs.getString(1);
String strPassWord = rs.getString(2);
System.out.println(strUserName+'\t'+strPassWord+'\t');
}
if(rs!=null)
rs.close();
if(stmt!=null)


Ïà¹ØÎÊ´ð£º

JAVAµç×Ӵʵ䣿 - Java / Java SE

¸÷·´óÏÀ¸ø¸ö˼·£¬²»ÊÇÔÚÏßµÄÄÇÖÖ£¬¾ÍÊÇÒ»¸ö×öÆÕͨµÄÓ¦ÓóÌÐò¡£


´Ê¿âÔõôÉú³ÉÄØ£¿

²»»á¡£

ÒýÓÃ
´Ê¿âÔõôÉú³ÉÄØ£¿
ÕÒ±¾×Öµä

ÒýÓÃ
´Ê¿âÔõôÉú³ÉÄØ£¿
Êý¾Ý¿â ºÇºÇ

ÓÃmap ¼üÖµ¶ÔÓ¦

Èç¹ûÓÃÊý¾Ý¿ ......

java swing ³ÌÐòÈçºÎ´ò°ü - Java / JavaÏà¹Ø

java swing ³ÌÐòÈçºÎ´ò°ü³Éjar£¬È»ºó¿ÉÒÔͨ¹ýÅú´¦ÀíÎļþbatÖ±½ÓÔËÐУ¬ÓÐûÓÐʲô¹¤¾ßÖ±½Ó¿ÉÒÔÍê³ÉÕâÁ½¸ö¹¤×÷£¿
ÓÃjar´ò°ü£¬°ÑÔËÐÐÐèÒªµÄjar¿½±´µ½Ò»¸öĿ¼£¬Åú´¦ÀíÓà start javaw -cp .;ÆäËû°ü·¾¶ ÔËÐÐ

ÓÃzip ......

java windows7 MSSQL - Java / Java SE

ʹÓÃjavaÔÚwindows7 32λÏÂÁ¬½ÓMSSQL¡£
Á½Ì¨»úÆ÷£¬windows7 32룬ÔÚ¿ØÖÆÃæ°åÀïÃæÈ«²¿ÉèÖÃÓïÑÔºÍÇøÓòÑ¡Ïî¶¼english-unitedstates
Î¨Ò»Çø±ðÖ»ÓÐÔÚ°²×°SQL server 2008µÄʱºò Ñ¡ÔñµÄ×Ö·û¼¯²»Ò»Ñù£¬
exec sp_helpsor ......

javaÖд«Öµ - Java / Web ¿ª·¢

¾ÍÊǼòµ¥µÄ´«ÖµºÍȡֵ
ÇëÎÊÂ¥Ö÷ÏëÎÊʲô£¿

jspÒ³Ãæ²ÉÓÃ±íµ¥»òÕßjavabean´«Öµ¶¼¿ÉÒÔ£¬Ê¹ÓÃrequest.getParameter()»ñµÃʹÓÃ±íµ¥´«¹ýÀ´µÄÖµ¡£

ÎÊÎÊÌ⣬ÏȰÑÎÊÌâ˵Çå³þµã£¡£¡ ÎÊÌâ̫ģºý£¡£¡

ÎÊÎÊÌ⣬ÏȰÑÎ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ