Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

TUTORIALVaadin lets you build secure, UX-first PWAs entirely in Java.
Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Calling javascript synchronously by Enver Haase, 4 weeks ago
SQLcontainer make too many call in database
I em using Sqlcontainer with freeformQuery from meking calls from Mssql database server
here a part of sample code
private void initConnectionPoll_CCINFO(){
try {
Locale.setDefault(Locale.ENGLISH);
connectionPoolCCinfo = new SimpleJDBCConnectionPool("com.microsoft.sqlserver.jdbc.SQLServerDriver",
"jdbc:sqlserver://******:1433;databaseName=CCInfo", "****", "****", 1, 30);
} catch (SQLException e) {
e.printStackTrace();
}
}
private void initTableContainers() {
FreeformQuery tableQuery = new FreeformQuery(""SELECT ('('+Prefix +')'+ ' ' +FullName ) as a FROM [CCInfo].[dbo].[Filial]"
+"WHERE FullName IS NOT NULL " +
"order by (CASE WHEN Prefix = '22' THEN 1 ELSE 2 END ), FullName", connectionPoolYoko);
try {
tableStatement = new SQLContainer(tableQuery);
} catch (SQLException e) {
e.printStackTrace();
}
}
public static SQLContainer getPersonContainer (){
return tableStatement;
}
The problem is when i check with SQL Server Profiler i noticed that the in database query execute about 7 times and do not understand where the problem appears.
Somebody have a same problem how it solved ??????
here a part of logs
[/code]
Last updated on May, 28th 2012
You cannot reply to this thread.