From: Andrew G. <ag...@jc...> - 2004-02-03 21:33:21
|
The database in question is accessed via asp.net webpage and a delphi winapp. When the delphi winapp has a datagrid row(s) uncommited in a transaction, my asp.net readonly query hangs. I can run the same query from database workbench or ibconsole and it runs fine while the winapp has rows uncommitted, but in asp.net it hangs - so I think this is related to the firebird .net provider. I used the sysdba user to rule out any problem with user authority, I tried different isolation levels But made no difference. Why would database workbench and ibconsole run the query, but through asp.net it hangs? Also - it took me a while to figure out how to manually set the isolation level, you may want to add an example to the chm. ------ below is the code example I'm using ------------ <appSettings> <add key="connectionstring" value="Database=C:\\interbase\\xxx.GDB;User=xxx;Password=xxx;Dialect=3;Serve r=localhost;Pooling=False"/> </appSettings> Sub BindGrid() Dim mydataset As New DataSet() dataAdapter = new FbDataAdapter() myConnection = new FbConnection(myConnectionString) myConnection.Open() 'commented out --- Dim myiso As IsolationLevel = 3 'commented out --- myTxn = myConnection.BeginTransaction(myiso) myTxn = myConnection.BeginTransaction() selectCmd = "SELECT * FROM TBLTEST" myCommand = new FbCommand(selectCmd,myConnection,mytxn) Try dataAdapter.SelectCommand = myCommand dataAdapter.Fill(mydataset, "TempInfo") 'filldataset mydatagrid.DataSource = mydataset.Tables("TempInfo") mydatagrid.DataBind() dataAdapter.Dispose() Catch Exp As FbException Message.Style("color") = "red" Message.InnerHtml = "ERROR:" & Exp.Message & "<br>Code = " & Exp.ErrorCode Finally myTxn.Dispose() myCommand.Dispose() myConnection.Close() End Try mydataset.WriteXml(Server.MapPath("data\" & struser & myXMLfile),XmlWriteMode.WriteSchema) End Sub Regards, Andrew C. Goodall |