all groups > dotnet remoting > june 2005 >
You're in the

dotnet remoting

group:

Cannot find member name System.Data.SqlClient.SqlError



Cannot find member name System.Data.SqlClient.SqlError dave_wurtz NO[at]SPAM asdsoftware.com
6/9/2005 2:47:19 PM
dotnet remoting: All,

I can't seem to figure this one out:

I have a Data Access Layer (DAL) service running on a Windows 2003
Server. Through remoting, I can connect to this service from my
Windows XP Pro workstation. This all works great.

However, when my DAL service causes a SQL exception, I need the
exception to be remoted back to the client. I get the exception of
"Cannot find member name System.Data.SqlClient.SqlError" rather than
the actual sql exception.

If I run the same service on my Windows XP Pro workstation along with
the client application, it works fine - giving me the sql exception. I
can also run the client application from the Windows 2003 server and
hit the DAL running on the workstation and it also correctly gives me
the sql exception.

So the problem appears to be remoting the SQL exception from the
Windows 2003 Server to the Windows XP Pro workstation.

Both machines have the 1.1 framework, but the Windows 2003 Server's
System.Data.dll file is dated 3/24/2005 whereas the same file on the
Windows XP workstation is dated 7/15/2004.

I'm kind of at a loss as to what to look for. Any suggestions?

Thanks in advance!

Dave Wurtz
RE: Cannot find member name System.Data.SqlClient.SqlError T
6/10/2005 4:26:03 AM
I'm having the exact same problem, and it all started after installing SP1 of
Windows 2003 Server.

Version number of all system.*-files under microsoft.net\framework\v1.1.4322:
Server (2003 SP1) is 1.1.4322.2300
Client (Windows XP SP2) is 1.1.4322.2032.

This must be kinda easy to reproduce for Microsoft....


[quoted text, click to view]
Re: Cannot find member name System.Data.SqlClient.SqlError dave_wurtz NO[at]SPAM asdsoftware.com
6/13/2005 6:56:02 AM
T,

Thanks, I have also confirmed this in our environment. If I try this
on a Windows 2003 server WITHOUT SP1, it works fine. Hopefully,
Microsoft will fix this.

Dave
Re: Cannot find member name System.Data.SqlClient.SqlError dave_wurtz NO[at]SPAM asdsoftware.com
6/14/2005 5:45:50 AM
Microsoft, are you out there? I'm not really sure how to report this
as a bug?
Re: Cannot find member name System.Data.SqlClient.SqlError Tommy
6/16/2005 9:00:01 AM
FYI - as a temporary workaround I have written a new sub that strips out the
original message from the exception and throws a new exception with only the
Msg. So try calling a function like this where u would normally throw your
exceptio (sorry about the bad formatting) :

Public Sub ThrowBaseException(ByVal ex As Exception)

Dim oBaseException As Exception = ex.GetBaseException
Dim sMsg As String

If Not IsNothing(oBaseException) Then
If TypeOf oBaseException Is System.Data.SqlClient.SqlException Then
Dim n As Integer
For n = 0 To CType(oBaseException, SqlClient.SqlException).Errors.Count
- 1
Select Case CType(oBaseException,
SqlClient.SqlException).Errors.Item(n).Number
Case 266
Case Else
sMsg += CType(oBaseException,
SqlClient.SqlException).Errors.Item(n).Message + vbCrLf
End Select
Next
Else
sMsg = oBaseException.Message
End If
Else
sMsg = ex.Message
End If

Throw New Exception(sMsg)

End Sub


[quoted text, click to view]
Re: Cannot find member name System.Data.SqlClient.SqlError Tommy
6/16/2005 10:51:02 AM
I use this little code to throw the original message as a workaround until I
find a permanent solution to the problem (sorry about the formatting). The
client will get the proper message now, but not the tracestack...:

Public Sub ThrowBaseException(ByVal ex As Exception)

Dim oBaseException As Exception = ex.GetBaseException
Dim sMsg As String

If Not IsNothing(oBaseException) Then
If TypeOf oBaseException Is System.Data.SqlClient.SqlException Then
Dim n As Integer
For n = 0 To CType(oBaseException, SqlClient.SqlException).Errors.Count
- 1
Select Case CType(oBaseException,
SqlClient.SqlException).Errors.Item(n).Number
Case 266
Case Else
sMsg += CType(oBaseException, SqlClient.SqlException).Errors.Item(n).Message
+ vbCrLf
End Select
Next
Else
sMsg = oBaseException.Message
End If
Else
sMsg = ex.Message
End If

Throw New Exception(sMsg)

End Sub


[quoted text, click to view]
Re: Cannot find member name System.Data.SqlClient.SqlError dotnetfan
6/17/2005 12:54:09 AM
Re: Cannot find member name System.Data.SqlClient.SqlError Tommy
6/19/2005 2:30:04 AM
Thx for the link, but it has absolutely nothing at all to do with our problem.
Our remoting configuration was working splendidly until we installed SP1 of
Windows Server 2003 or our remoting server machine.

To me it seems like MS has mucked around with the interface for SQLError,
and it makes the client unable to receive errors including SQLError....

/Tommy


[quoted text, click to view]
RE: Cannot find member name System.Data.SqlClient.SqlError Ramon de Klein
6/21/2005 5:48:02 AM
See my post on
RE: Cannot find member name System.Data.SqlClient.SqlError Tommy
6/22/2005 12:42:04 AM
Thx a lot. Getting the hotfix (article 887549) solved the problem!



[quoted text, click to view]
RE: Cannot find member name System.Data.SqlClient.SqlError sld
7/22/2005 7:45:03 AM
What exactly did you apply and to what. The hotfix 887549 is a hotfix for
Windows 2003 is it not?

[quoted text, click to view]
RE: Cannot find member name System.Data.SqlClient.SqlError sld
7/22/2005 11:36:03 AM
What exactly did you apply and to what. The hotfix 887549 is a hotfix for
Windows 2003 is it not?

[quoted text, click to view]
RE: Cannot find member name System.Data.SqlClient.SqlError Kathleen Braun
10/7/2005 7:49:57 AM
Which system did you apply the fix to? When I apply it to the server I get
the message: Setup has detected that the Service Pack version of this system
is newer than the update you are applying.

There is no need to install this update.

When I try to apply it to my XP machine I get the message:The version of
Windows you have installed does not match the update you are trying to
install.

The dates of my System.data.dll files matched those in the original post.

Thanks,
Re: Cannot find member name System.Data.SqlClient.SqlError Brian Kavanaugh
10/10/2005 2:10:44 PM
I didn't apply the fix to either system, though the hotfix is, I believe,
for Server 2003. Since the KB article didn't actually mention the problem
I'm having, I was reluctant to apply it.

[quoted text, click to view]

Re: Cannot find member name System.Data.SqlClient.SqlError Gary Halberstadt
10/20/2005 3:32:53 AM

Hi,

I too am experiencing the same problem as Kathleen. It seems I can't
install the hotfix that apparently fixes the problem.

Does anyone have a solution to this problem?

Thanks.
Gary.

RE: Cannot find member name System.Data.SqlClient.SqlError Gary Halberstadt
10/31/2005 3:43:10 AM

This post does not exist, Ramon! Please update or reply with some new info,
I'm desperate to resolve this problem.

[quoted text, click to view]
RE: Cannot find member name System.Data.SqlClient.SqlError Feroz
4/3/2006 8:46:30 AM
I'm not able to find the hot fix also...

RE: Cannot find member name System.Data.SqlClient.SqlError Kushagra Tyagi
4/19/2006 5:46:45 AM
Hi,

Im facing the similar problem in one of our Project. Not able to find that
HOTFIX on specified link. I hope there is some other solution except change
AddThis Social Bookmark Button