jdbcÓëSQLserverÁ¬½Ó
package com.tongying.www.until;
public class Resource {
// MySQlÊý¾Ý¿âµÄ×ÊÔ´
/* public static final String DRIVER="com.mysql.jdbc.Driver";
public static final String URL="jdbc:mysql://localhost:3306/msg";
public static final String USER="root";
public static final String PASSWORD ="root";
*/
//MSSQL
public static final String DRIVER="com.microsoft.jdbc.sqlserver.SQLServerDriver";
public static final String URL="jdbc:microsoft:sqlserver://localhost:1433;DataBaseName=student";
public static final String USER="sa";
public static final String PASSWORD ="sa";
}
package com.tongying.www.test;
import java.sql.Connection;
import java.sql.DatabaseMetaData;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import java.sql.Statement;
import com.tongying.www.until.Resource;
public class Test1 {
public static void main(String[]args){
Test1 test=new Test1();
test.Query();
}
//Á¬½ÓÊý¾Ý¿â
public void Query(){
Connection conn=null;
Statement stmte=null;
ResultSet res=null;
&n
Ïà¹ØÎÊ´ð£º
ÈçÌâ
Ö»ÓÐ100·Ö¸øÁË¡£¡£¡£
ÄĸöÐÐÒµ£¿
ÎÒÏëÍøÉϵÄÔ´Âë¿Ï¶¨²»ÄÜÍêÈ«Âú×ã¸öÈËÏë·¨
×îºó»¹µÃ×Ô¼ºÕû
ÍƼöÒ»¿î×ÔÖú½¨Õ¾Èí¼þ£º·çѶ
C#+SQL
¿ÉÒÔÉè¼Æ³ö±È½ÏÁé»îµÄÍøÕ¾
ʲôÐÐÒµ°¡....
µ½51aspx.co ......
Êý¾Ý10WÌõÒÔÉÏ,wm6.5ƽ̨,ÄÚ´æÓÐÏÞ
C# code:
private void connserver()
{
Cursor.Current = Cursors.WaitCursor;
try
{
......
»¹ÔµÄ±¨´íÐÅÏ¢:
System.Data.SqlClient.SqlError: ±¸·Ý¼¯ÖеÄÊý¾Ý¿â±¸·ÝÓëÏÖÓÐµÄ 'chat_Data' Êý¾Ý¿â²»Í¬¡£ (Microsoft.SqlServer.Smo)
Çë¸÷λ¸ßÊÖ°ïæ½â¾ö
»¹ÔµÄÊý¾Ý¿âÃû×ÖÓ뱸·ÝµÄÊ ......
ÎÒµÄÊý¾Ý¿âͻȻ±¨Ò»¸öºÜÓôÃƵĴíÎ󣬵¼ÖÂÊý¾ÝÎÞ·¨²é¿´£¬
´íÎóÌáʾΪ£º
ÔÚÎļþ 'G:\data\ÆóÒµ¹ÜÀíÊý¾Ý¿â1_data.n ......
´ó¼ÒÓÐûÓÐ ´æ´¢¹ý³Ì·ÖÒ³µÄÀý×Ó£¬¹²Ïíһϣ¬Ð»Ð»£¡£¡£¡
http://wyf.javaeye.com/blog/462396
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
/*--ʵÏÖ·ÖÒ³µÄͨÓô洢¹ý³Ì
......