![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
|
Hi Jason ... and thank You for replay. Excuse me, but i don't understand ... If the server request is stopped and the command is actually returning immediately, **what** are the DataAdapter fetching ?? When i use the "Cancel" method is because i don't want **any data** ..... (or not ???) !! I think that absolutely must exist a way to break a fill request. Any suggestion ? Thank you. Nicola. "Jason Hinsperger" <NOJason_HinspergerSPAM (AT) hotmail (DOT) com> ha scritto nel messaggio news:3fce1b19$1 (AT) forums-2-dub (DOT) .. The command is actually returning immediately in your case (if you turn on request level logging on the server and look at the requests generated by your application, you will see this). The time is being spent in fill performing the fetches for the result set. Since there is no 'cancel' for the data adaptor, or even a general cancel on the connection object, there is no way to cancel the fill request. -- Jason Hinsperger International and Sustaining Engineering iAnywhere Solutions Whitepapers, TechDocs, and bug fixes are all available through the iAnywhere Developer Community at www.ianywhere.com/developer -- "Nicola Cisternino" <ncister (AT) cointa (DOT) it> wrote in message news:3fc5cfd4 (AT) forums-2-dub (DOT) .. Hi Jason ... and thank You for replay. I've attached a complete VB.net test example that either works with SQLServer (fine) and ASA. You can try to start a query with the "Run" button and break (Cancel) it with "Kill" button. If you can, try with an SqlServer connection too. Thanks. Nicola. "Jason Hinsperger" <NOJason_HinspergerSPAM (AT) hotmail (DOT) com> ha scritto nel messaggio news:3fc4ebcd$1 (AT) forums-1-dub (DOT) .. Yes, it is enabled and it should work. Can you post a specific example? -- Jason Hinsperger International and Sustaining Engineering iAnywhere Solutions Whitepapers, TechDocs, and bug fixes are all available through the iAnywhere Developer Community at www.ianywhere.com/developer -- "Nicola Cisternino" <ncister (AT) cointa (DOT) it> wrote in message news:3fc4e1f6 (AT) forums-2-dub (DOT) .. Hi all, I'm trying the "AsaCommand.Cancel" method without results (application stalled) ......... ... is it **enabled** ?? I daily use, with the MS provider, the "SqlCommand.Cancel" method to break long queries started in a separated thread .... but with ASA (9.0.0.1235) it seem not works .... Thanks. Nicola. |
#2
| |||
| |||
|
|
Let me clarify what is happening in your example: The Cancel method is being called for the SelectCommand, not the fill request. The SelectCommand has executed the select statement (almost immediately) and returned, so there is nothing for SelectCommand.Cancel() to do. The fill() method of the data adaptor has proceeded on to fetch the results, which is an independant operation (at least from ASA's point of view) from actually executing the query. There is no provision or clear set of rules for dealing with this in the ADO.Net specification, which is why the ASA provider behaves differently from the MS one. That said, I think your point is valid and I agree that you ought to be able to cancel the fill method at any point during its execution, which means there should really be a DataAdaptor.Cancel or more likely a DataReader.Cancel method. I will look into the possibility of modifying the ASA ADO.Net provider to behave more like the MS provider. You should also post your requet to the sybase.public.sqlanywhere.product_futures_discussi on newsgroup to ensure it gets more attention. -- Jason Hinsperger International and Sustaining Engineering iAnywhere Solutions Whitepapers, TechDocs, and bug fixes are all available through the iAnywhere Developer Community at www.ianywhere.com/developer -- "Nicola Cisternino" <ncister (AT) cointa (DOT) it> wrote in message news:3fcef6d3$1 (AT) forums-1-dub (DOT) .. Hi Jason ... and thank You for replay. Excuse me, but i don't understand ... If the server request is stopped and the command is actually returning immediately, **what** are the DataAdapter fetching ?? When i use the "Cancel" method is because i don't want **any data** ...... (or not ???) !! I think that absolutely must exist a way to break a fill request. Any suggestion ? Thank you. Nicola. "Jason Hinsperger" <NOJason_HinspergerSPAM (AT) hotmail (DOT) com> ha scritto nel messaggio news:3fce1b19$1 (AT) forums-2-dub (DOT) .. The command is actually returning immediately in your case (if you turn on request level logging on the server and look at the requests generated by your application, you will see this). The time is being spent in fill performing the fetches for the result set. Since there is no 'cancel' for the data adaptor, or even a general cancel on the connection object, there is no way to cancel the fill request. -- Jason Hinsperger International and Sustaining Engineering iAnywhere Solutions Whitepapers, TechDocs, and bug fixes are all available through the iAnywhere Developer Community at www.ianywhere.com/developer -- "Nicola Cisternino" <ncister (AT) cointa (DOT) it> wrote in message news:3fc5cfd4 (AT) forums-2-dub (DOT) .. Hi Jason ... and thank You for replay. I've attached a complete VB.net test example that either works with SQLServer (fine) and ASA. You can try to start a query with the "Run" button and break (Cancel) it with "Kill" button. If you can, try with an SqlServer connection too. Thanks. Nicola. "Jason Hinsperger" <NOJason_HinspergerSPAM (AT) hotmail (DOT) com> ha scritto nel messaggio news:3fc4ebcd$1 (AT) forums-1-dub (DOT) .. Yes, it is enabled and it should work. Can you post a specific example? -- Jason Hinsperger International and Sustaining Engineering iAnywhere Solutions Whitepapers, TechDocs, and bug fixes are all available through the iAnywhere Developer Community at www.ianywhere.com/developer -- "Nicola Cisternino" <ncister (AT) cointa (DOT) it> wrote in message news:3fc4e1f6 (AT) forums-2-dub (DOT) .. Hi all, I'm trying the "AsaCommand.Cancel" method without results (application stalled) ......... ... is it **enabled** ?? I daily use, with the MS provider, the "SqlCommand.Cancel" method to break long queries started in a separated thread .... but with ASA (9.0.0.1235) it seem not works .... Thanks. Nicola. |
#3
| |||
| |||
|
|
Hi Jason, and thank You for your interest to my questions. You have perfectly focused my scenario. I think that MS choice, about SelectCommand.Cancel method, is useful and any further method is required. Using MS "SelectCommand.Cancel" method happen that: 1) If SelectCommand object is waiting the server query execution, it break the command. 2) Instead if SelectCommand object is fetching data, it break the filling job. The DataReader object already works fine because there isn't a global fetching and only single rows are returned to the client. Best Regards. Nicola. "Jason Hinsperger" <NOJason_HinspergerSPAM (AT) hotmail (DOT) com> ha scritto nel messaggio news:3fcfa468$1 (AT) forums-2-dub (DOT) .. Let me clarify what is happening in your example: The Cancel method is being called for the SelectCommand, not the fill request. The SelectCommand has executed the select statement (almost immediately) and returned, so there is nothing for SelectCommand.Cancel() to do. The fill() method of the data adaptor has proceeded on to fetch the results, which is an independant operation (at least from ASA's point of view) from actually executing the query. There is no provision or clear set of rules for dealing with this in the ADO.Net specification, which is why the ASA provider behaves differently from the MS one. That said, I think your point is valid and I agree that you ought to be able to cancel the fill method at any point during its execution, which means there should really be a DataAdaptor.Cancel or more likely a DataReader.Cancel method. I will look into the possibility of modifying the ASA ADO.Net provider to behave more like the MS provider. You should also post your requet to the sybase.public.sqlanywhere.product_futures_discussi on newsgroup to ensure it gets more attention. -- Jason Hinsperger International and Sustaining Engineering iAnywhere Solutions Whitepapers, TechDocs, and bug fixes are all available through the iAnywhere Developer Community at www.ianywhere.com/developer -- "Nicola Cisternino" <ncister (AT) cointa (DOT) it> wrote in message news:3fcef6d3$1 (AT) forums-1-dub (DOT) .. Hi Jason ... and thank You for replay. Excuse me, but i don't understand ... If the server request is stopped and the command is actually returning immediately, **what** are the DataAdapter fetching ?? When i use the "Cancel" method is because i don't want **any data** ..... (or not ???) !! I think that absolutely must exist a way to break a fill request. Any suggestion ? Thank you. Nicola. "Jason Hinsperger" <NOJason_HinspergerSPAM (AT) hotmail (DOT) com> ha scritto nel messaggio news:3fce1b19$1 (AT) forums-2-dub (DOT) .. The command is actually returning immediately in your case (if you turn on request level logging on the server and look at the requests generated by your application, you will see this). The time is being spent in fill performing the fetches for the result set. Since there is no 'cancel' for the data adaptor, or even a general cancel on the connection object, there is no way to cancel the fill request. -- Jason Hinsperger International and Sustaining Engineering iAnywhere Solutions Whitepapers, TechDocs, and bug fixes are all available through the iAnywhere Developer Community at www.ianywhere.com/developer -- "Nicola Cisternino" <ncister (AT) cointa (DOT) it> wrote in message news:3fc5cfd4 (AT) forums-2-dub (DOT) .. Hi Jason ... and thank You for replay. I've attached a complete VB.net test example that either works with SQLServer (fine) and ASA. You can try to start a query with the "Run" button and break (Cancel) it with "Kill" button. If you can, try with an SqlServer connection too. Thanks. Nicola. "Jason Hinsperger" <NOJason_HinspergerSPAM (AT) hotmail (DOT) com> ha scritto nel messaggio news:3fc4ebcd$1 (AT) forums-1-dub (DOT) .. Yes, it is enabled and it should work. Can you post a specific example? -- Jason Hinsperger International and Sustaining Engineering iAnywhere Solutions Whitepapers, TechDocs, and bug fixes are all available through the iAnywhere Developer Community at www.ianywhere.com/developer -- "Nicola Cisternino" <ncister (AT) cointa (DOT) it> wrote in message news:3fc4e1f6 (AT) forums-2-dub (DOT) .. Hi all, I'm trying the "AsaCommand.Cancel" method without results (application stalled) ......... ... is it **enabled** ?? I daily use, with the MS provider, the "SqlCommand.Cancel" method to break long queries started in a separated thread .... but with ASA (9.0.0.1235) it seem not works .... Thanks. Nicola. |
#4
| |||
| |||
|
|
Good news Nicola. We have modified the ASA ADO.NET driver so that if you issue the cancel on the selectdcommand, the associated 'fill' method of the dataadaptor will be stopped. The change will appear in ASA 8.0.2 ebf build 4353 and 9.0.0 ebf build 1251, both of which should be available within the next week or so. -- Jason Hinsperger International and Sustaining Engineering iAnywhere Solutions Whitepapers, TechDocs, and bug fixes are all available through the iAnywhere Developer Community at www.ianywhere.com/developer -- "Nicola Cisternino" <ncister (AT) cointa (DOT) it> wrote in message news:3fd05f7f (AT) forums-2-dub (DOT) .. Hi Jason, and thank You for your interest to my questions. You have perfectly focused my scenario. I think that MS choice, about SelectCommand.Cancel method, is useful and any further method is required. Using MS "SelectCommand.Cancel" method happen that: 1) If SelectCommand object is waiting the server query execution, it break the command. 2) Instead if SelectCommand object is fetching data, it break the filling job. The DataReader object already works fine because there isn't a global fetching and only single rows are returned to the client. Best Regards. Nicola. "Jason Hinsperger" <NOJason_HinspergerSPAM (AT) hotmail (DOT) com> ha scritto nel messaggio news:3fcfa468$1 (AT) forums-2-dub (DOT) .. Let me clarify what is happening in your example: The Cancel method is being called for the SelectCommand, not the fill request. The SelectCommand has executed the select statement (almost immediately) and returned, so there is nothing for SelectCommand.Cancel() to do. The fill() method of the data adaptor has proceeded on to fetch the results, which is an independant operation (at least from ASA's point of view) from actually executing the query. There is no provision or clear set of rules for dealing with this in the ADO.Net specification, which is why the ASA provider behaves differently from the MS one. That said, I think your point is valid and I agree that you ought to be able to cancel the fill method at any point during its execution, which means there should really be a DataAdaptor.Cancel or more likely a DataReader.Cancel method. I will look into the possibility of modifying the ASA ADO.Net provider to behave more like the MS provider. You should also post your requet to the sybase.public.sqlanywhere.product_futures_discussi on newsgroup to ensure it gets more attention. -- Jason Hinsperger International and Sustaining Engineering iAnywhere Solutions Whitepapers, TechDocs, and bug fixes are all available through the iAnywhere Developer Community at www.ianywhere.com/developer -- "Nicola Cisternino" <ncister (AT) cointa (DOT) it> wrote in message news:3fcef6d3$1 (AT) forums-1-dub (DOT) .. Hi Jason ... and thank You for replay. Excuse me, but i don't understand ... If the server request is stopped and the command is actually returning immediately, **what** are the DataAdapter fetching ?? When i use the "Cancel" method is because i don't want **any data** ..... (or not ???) !! I think that absolutely must exist a way to break a fill request. Any suggestion ? Thank you. Nicola. "Jason Hinsperger" <NOJason_HinspergerSPAM (AT) hotmail (DOT) com> ha scritto nel messaggio news:3fce1b19$1 (AT) forums-2-dub (DOT) .. The command is actually returning immediately in your case (if you turn on request level logging on the server and look at the requests generated by your application, you will see this). The time is being spent in fill performing the fetches for the result set. Since there is no 'cancel' for the data adaptor, or even a general cancel on the connection object, there is no way to cancel the fill request. -- Jason Hinsperger International and Sustaining Engineering iAnywhere Solutions Whitepapers, TechDocs, and bug fixes are all available through the iAnywhere Developer Community at www.ianywhere.com/developer -- "Nicola Cisternino" <ncister (AT) cointa (DOT) it> wrote in message news:3fc5cfd4 (AT) forums-2-dub (DOT) .. Hi Jason ... and thank You for replay. I've attached a complete VB.net test example that either works with SQLServer (fine) and ASA. You can try to start a query with the "Run" button and break (Cancel) it with "Kill" button. If you can, try with an SqlServer connection too. Thanks. Nicola. "Jason Hinsperger" <NOJason_HinspergerSPAM (AT) hotmail (DOT) com> ha scritto nel messaggio news:3fc4ebcd$1 (AT) forums-1-dub (DOT) .. Yes, it is enabled and it should work. Can you post a specific example? -- Jason Hinsperger International and Sustaining Engineering iAnywhere Solutions Whitepapers, TechDocs, and bug fixes are all available through the iAnywhere Developer Community at www.ianywhere.com/developer -- "Nicola Cisternino" <ncister (AT) cointa (DOT) it> wrote in message news:3fc4e1f6 (AT) forums-2-dub (DOT) .. Hi all, I'm trying the "AsaCommand.Cancel" method without results (application stalled) ......... ... is it **enabled** ?? I daily use, with the MS provider, the "SqlCommand.Cancel" method to break long queries started in a separated thread .... but with ASA (9.0.0.1235) it seem not works .... Thanks. Nicola. |
![]() |
| Thread Tools | |
| Display Modes | |
| |