|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
.Net SqlException, RAISERROR and Remote machines.Hi,
Consider a client machine running a .NET application. The app is configured to access a remote SQL Server 2005, though a connection string. Now consider an SQL Insert statement that fails (for whatever reason). This produces (normally) an SqlException if both client and server machines are the same. (i.e, if the client is running on the same machine that hosts SQL Server). The question is that what happens if they are not running on the same machine? Does any error happening in SQL Server (the remote machine) as well as RAISERROR keyword, generate the same SqlException (on the client side)? If yes, would you please let me know how this can be serialized from the remote machine to the local one? TIA, Mehdi > Does any error happening in SQL Server (the remote machine) as A SqlException is always raised on the client when an error occurs even when > well as RAISERROR keyword, generate the same SqlException (on the > client side)? If yes, would you please let me know how this can be > serialized from the remote machine to the local one? the client is running on a different machine. You don't need to do anything special to serialize the exception because the database access API (e.g. SqlClient, OleDb) takes care of all the implementation details. Perhaps you are getting database access confused with .Net remoting. -- Show quoteHope this helps. Dan Guzman SQL Server MVP "mehdi" <mehdi.mous***@gmail.com> wrote in message news:1153999591.560940.201070@p79g2000cwp.googlegroups.com... > Hi, > Consider a client machine running a .NET application. The app is > configured to access a remote SQL Server 2005, though a connection > string. Now consider an SQL Insert statement that fails (for whatever > reason). This produces (normally) an SqlException if both client and > server machines are the same. (i.e, if the client is running on the > same machine that hosts SQL Server). > > The question is that what happens if they are not running on the same > machine? Does any error happening in SQL Server (the remote machine) as > well as RAISERROR keyword, generate the same SqlException (on the > client side)? If yes, would you please let me know how this can be > serialized from the remote machine to the local one? > > TIA, > Mehdi > |
|||||||||||||||||||||||