Hello Thanks all for the quick replies ...
Here is the connection string as it sits in my web config file :
<add key="Repository ConnectionStrin g"
value="server=s erver;uid=sa;pw d=password;data base=ShepherdRe pository;Connec t
Timeout=120" />
Here is the code that is running ...
If Not IsPostBack Then
Dim cmdCheckReposit oryAvailability As New SqlCommand
Dim rdrCheckReposit oryAvailability As SqlDataReader
Dim Conn As SqlConnection
Try
' check the flag for repository availability
Dim SQL As String
Conn = New
SqlConnection(C onfigurationSet tings.AppSettin gs("RepositoryC onnectionString "))
Conn.Open()
SQL = "Select RepositoryAvail able from tblProperty"
cmdCheckReposit oryAvailability = New SqlCommand(SQL, Conn)
rdrCheckReposit oryAvailability =
cmdCheckReposit oryAvailability .ExecuteReader
If rdrCheckReposit oryAvailability .Read Then
If rdrCheckReposit oryAvailability ("RepositoryAva ilable")
= 0 Then
' its not available
txtUserName.Ena bled = False
txtPassword.Ena bled = False
btnLogin.Enable d = False
Label1.ForeColo r = Color.Blue
Label1.Font.Bol d = True
Label1.Font.Siz e = FontUnit.Medium
Label1.Text = "<center>Th e repository is unavailable
at this time.</center>"
End If
End If
Catch
txtUserName.Ena bled = False
txtPassword.Ena bled = False
btnLogin.Enable d = False
Label1.ForeColo r = Color.DarkBlue
Label1.Font.Bol d = True
Label1.Font.Siz e = FontUnit.Medium
Label1.Text = "<center>Th e repository is unavailable at this
time.</center>"
Finally
cmdCheckReposit oryAvailability .Dispose()
cmdCheckReposit oryAvailability = Nothing
If Not rdrCheckReposit oryAvailability Is Nothing Then
rdrCheckReposit oryAvailability .Close()
End If
rdrCheckReposit oryAvailability = Nothing
Conn.Close()
Conn = Nothing
End Try
This is a web application, I don't remember having to do anything special on
the old development machine to be able to connect to SQL Server.
As you can see I am using SQL Server Authentication (using sa is only in my
test network <grin>)
Thanks for any assistance, please let me know if there is anything else you
need.
Jon
jd*****@hotmail .com
"Greg Burns" <bl*******@news groups.nospam> wrote in message
news:Oi******** ********@TK2MSF TNGP10.phx.gbl. ..
Sorry for the bad grammar. :^) Let's try that again.
Is this a web app? What does your connection string look like? Are you
connecting to SQL using integrated security? Is it trying to use your
local ASPNET account?
"Greg Burns" <bl*******@news groups.nospam> wrote in message
news:OK******** ********@TK2MSF TNGP12.phx.gbl. .. Is this a web app? What is does your connection string look like? Are
you connection to SQL using integrated security? Is it using trying to
use your local ASPNET account?