不明白为什么不需要帐号和密码访问SQL呢?感觉SQL执行起来确实快很多
Connection connection ;
Statement statement ;
ResultSet resultset ;
str sqlstring ;
;
sqlstring ='SELECT * FROM [ServerName].[Database].dbo.TableName';
connection = new Connection() ;
statement = connection.createStatement() ;
resultset = statement.executeQuery(sqlstring) ;
while (resultset.next() )
{
print resultset.getString(1)+'----'+resultset.getString(2);
}
pause;