You are viewing limited content. For full access, please sign in.

Question

Question

How can we change the default timeout of connections done from Forms to the SQL Server for lookups?

asked on November 7, 2014

We have a form that multiple users from multiple locations are filling out. We're having an issue where connections done to the SQL Server are not being dropped. These connections are made whenever a form is loaded to generate the lookups and fill in some of the fields. Is there a way to change the default timeout of this connection or to make it drop the connection automatically when the form is submitted?

1 0

Replies

replied on November 10, 2014 Show version history

Hi Edgar - 

If you are using connection strings, the timeout is a parameter you can set like this:

Data Source=MyServer;Initial Catalog=MyDB;Integrated Security=SSPI;Connection Timeout=30;

I also like to add the application name parameter: Application Name=LF_Forms;

So you can trace things at SQL Server more easily if you need to.

Update: Sorry I see that you actually have a different issue. You WANT to force a timeout of the connection.  The ConnectionTimeout parameter just reponds to the calling application if there is no response from SQL Server.  Xiuhong's answer fits your situation more closely.

2 0
replied on November 10, 2014

The connection for external table were not handling well in Forms currently, so it rely on the garbage collector to detroy the object, we will enhance it in next version.

replied on November 10, 2014

Hi Edgar,

    How did you check that the connection is not dropped? I checked opening same form that has lookup rule both for table and stored procedure using multiple users at the same time, there is only one connection in the database when using following query:

SELECT 
 DB_NAME(dbid) as DBName, 
 COUNT(dbid) as NumberOfConnections,
 loginame as LoginName
 FROM
 sys.sysprocesses
 WHERE 
 dbid > 0
 GROUP BY 
 dbid, loginame
 ;

And the connection will be dropped automatically after wait for some minutes.

So can you tell us more how did you run into this issue?

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.