| | |
 | |
Statement: getMaxRows() |
|
прегледано: |
1202 |
|
вкупно гласови: |
0 |
|
средна оценка: |
- |
|
коментари: |
0 |
 испрати до пријател
 испечати
|
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.Statement;
public class Main {
public static void main(String[] args) throws Exception {
Statement statement = null;
String url = "jdbc:odbc:databaseName";
String driver = "sun.jdbc.odbc.JdbcOdbcDriver";
String username = "guest";
String password = "guest";
Class.forName(driver);
Connection connection = DriverManager.getConnection(url, username, password);
statement = connection.createStatement();
System.out.println("Drajver: " + driver);
System.out.print("\nMaksimalen broj na redici:");
int maxRows = statement.getMaxRows();
System.out.print(maxRows == 0 ? " Beskonecno" : " " + maxRows);
System.out.print("\nMaksimalna golemina na pole:");
int maxFieldSize = statement.getMaxFieldSize();
System.out.print(maxFieldSize == 0 ? " Beskonecno" : " " + maxFieldSize);
System.out.print("\nTajmaut:");
int queryTimeout = statement.getQueryTimeout();
System.out.print(queryTimeout == 0 ? " Beskonecno" : " " + queryTimeout);
}
}
|
|
|
|
|
|
|
|
|
|
| |
|
|
|---|
|