Eric:
I'm not following you. I took Lee's code and pasted it into a C# project
and it compiled except for that fact that sError wasn't declared. Once it
was, it compiled fine. However, the signature is void, hence it has no
return type so I'm not sure I understand your point.
Bill
"Eric Cadwell" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> You didn't declare a type for sError. This method has no return!
>
> protected void sGetError(SqlException oException, SqlConnection db)
> {
> int i;
> string sError = "";
> if (db != null)
> {
> for (i = 0; i < oException.Errors.Count - 1; i++)
> {
> sError = sError + oException.Errors[i].ToString() + "/n";
> }
> }
> }
>
>
> HTH;
> Eric Cadwell
> http://www.origincontrols.com
>
>