Hey buddy, you have to deal with those type of people. You may not like it , but they sure make the average person look brilliant.
GREAT JOB keep up the GREAT work.
Hey buddy, you have to deal with those type of people. You may not like it , but they sure make the average person look brilliant.
GREAT JOB keep up the GREAT work.
I was taught, "If you expose it, they will use it, if they use it, you must maintain it. "
I try to keep as many things hidden as I can to ensure that it is used the way it was intended.
This the entire class and there is not a close method.
It appears it was implemented without testing it. Clearly, if they would of tested it, they would of found the flaw with the design.
Public Class clsGlobalConnection
Public Shared gServer As String
Public Shared gDatabase As String
Public Shared gUsername As String
Public Shared gConnection As New SqlConnection()
Public Shared Function ConnectToDatabase(ByVal gstrServer As String, ByVal gstrDatabase As String, _
ByVal gstrUsername As String) As Boolean
gServer = gstrServer
gDatabase = gstrDatabase
gUsername = gstrUsername
If gConnection Is Nothing Then
gConnection = New SqlConnection("user id=" & gUsername & ";password=<password>;initial catalog=" & gDatabase & ";data source=" & gServer & ";")
gConnection.Open()
End If
End Function
End Class
I have seen some interesting things at my current assignment, but this one was interesting. The "want to be <FONT size=2>architect" for this organization was proactive and took it upon themself to convert an IT application into VB.Net 2005. Once it was complete, the application did not working. At quick glance, this code looks OK, but how often is the gConnection going to be Nothing?
</FONT>Wow, with a lot of processes leaning toward SOA, I can't believe transactional processing didn't catch on with this bunch. I feel for their DBA. Is their data center out west, that would explain the above average tempetures.
.
I think you should change the music to "Take this job and shove it!"
I once had someone like that sitting next to me. Thar person was also less skilled at programing and thhe ate a lot of graham crackers. GREAT content please post more.