Ask a Question related to ASP.NET General, Design and Development.
-
Patrick Steele [MVP] #1
Re: Catch SQL Login Failure
In article <3f12fb6f$1@news.012.net.il>, [email]kamara1@yahoo.com[/email] says...
You should be able to catch the SQLException and then examine the> Hi,
>
> How can i "catch" the SQL login error message and display one of my own?
"Number" property.
--
Patrick Steele
Microsoft .NET MVP
[url]http://weblogs.asp.net/psteele[/url]
Patrick Steele [MVP] Guest
-
Strange problem with Forms authentication: After successfull login, login page is still displayed
Hi there I have a quite strange problem with my ASP.NET-Application. The application has being deployed one year ago and worked fine till last... -
Communication App Inspector login failure
yesterday i could. today i can't. same username, same password. the documentation gives no indication of what to do in the circumstance (it reads... -
session problem - login screen continually reloads after pressing the login button
I am trying to get sessions to work on a log in screen to give certain users access to certain pages/directories. The problem is that when the... -
Try/Catch
Well, may question is about the Scope of Throwed Execeptions. Look my example: I have something like this: //...cut... try { $res =... -
LOGIN: ERROR- Failed to initialize policy manager. (IFOR_PM_FATAL) Login sessions denied.
Verify that you haven't set the system date by mistake to a far away future. All the licenses then become expired! Restoring the system to the... -
Tamir Kamara #2
Re: Catch SQL Login Failure
i don't understand.
can you give an example?
"Patrick Steele [MVP]" <patrick@mvps.org> wrote in message
news:MPG.197ccf0b1aeb26689897a4@msnews.microsoft.c om...> In article <3f12fb6f$1@news.012.net.il>, [email]kamara1@yahoo.com[/email] says...>> > Hi,
> >
> > How can i "catch" the SQL login error message and display one of my own?
> You should be able to catch the SQLException and then examine the
> "Number" property.
>
> --
> Patrick Steele
> Microsoft .NET MVP
> [url]http://weblogs.asp.net/psteele[/url]
Tamir Kamara Guest
-
Patrick Steele [MVP] #3
Re: Catch SQL Login Failure
In article <3f1376f3$1@news.012.net.il>, [email]kamara1@yahoo.com[/email] says...
Dim sqlConn As SqlConnection = New SqlConnection("your_conn_string")> i don't understand.
> can you give an example?
Try
sqlConn.Open()
Catch ex As SqlException
If ex.Number = 1234 Then ' replace 1234 with proper sql code
...
End If
End Try
--
Patrick Steele
Microsoft .NET MVP
[url]http://weblogs.asp.net/psteele[/url]
Patrick Steele [MVP] Guest



Reply With Quote

