Hello, Here my configuration : Visual Studio 2010 ASP.NET 4.0 C# SQL Anywhere Version=12.0.1.37694 When I launch a simple pages on debug mod whith this code, SAConnection block and other code cant be executed. My webpage is pending like i have insert a breakpoint on the .SAConnection. But there is no breakpoint. No information in the output windows. My web.config : My code : using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using iAnywhere.Data.SQLAnywhere; using System.Configuration; public partial class test : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { SAConnection conn = new SAConnection("UserID=dba;Password=sql;DataSourceName=demo"); Label1.Text = "Don' work"; } } |
Lets try and figure out if the problem is with the database engine layer or the .NET layer. When the code is blocked, if you make another connection to the database engine with dbisql, if you execute sa_conn_info() and sa_locks(), can you see any blocked connections in the database engine that might explain why the new SAConnection() is blocked? You can post the output here if you're not sure how to interpret the results. Thank for your answer. When the SAConnection() is blocked, i have launch SELECT * FROM sa_conn_info(). Here the result : Number,Name,Userid,DBNumber,LastReqTime,ReqType,CommLink,NodeAddr,ClientPort,ServerPort,BlockedOn,LockRowID,LockIndexID,LockTable,UncommitOps,ParentConnection 6,'SQL_DBC_505c8d50','DBA',0,'2012-09-27 18:22:18.215','FETCH','local','',0,0,0,0,,'',0, 1,Sybase Central 1,DBA,0,2012-09-27 18:22:15.173,CLOSE,local,,0,0,0,0,(NULL),,0,(NULL) When I launch select * from sa_locks() there is no result. additionnal information : I am on windows 7 64 bits with Visual studio 2010 32 bits. (I have install SA 32 and 64 bits). best regards,
(27 Sep '12, 12:29)
ncholet
Replies hidden
Other aditionnal information. If I enter wrong information on the SAConnection, for exemple : SAConnection conn = new SAConnection("nothing"); I have the same problem. best regards,
(27 Sep '12, 12:33)
ncholet
Replies hidden
This does obviously mean that the problem is not a blocking issue in SQL Anywhere, as your SQL Central connection is the only one currently connected, so your web page code has not connected at all or is already disconnected...
(28 Sep '12, 03:39)
Volker Barth
(28 Sep '12, 13:47)
Jeff Albion
|
Add a try catch around it probably you get an exception which is not catched, so your next statement will never execute. Another possible problem which comes to my mind is, that your webpage eventually is not finding all needed assemblies (e.g. for the SA... classes iAnywhere.Data.SQLAnywhere) this will only be identified during load of the page. |