Hadn't heard of it. Just started to look. Should have joined communities/sites a long time ago. Thanks!
MyNameIsLoki
@MyNameIsLoki
Best posts made by MyNameIsLoki
Latest posts made by MyNameIsLoki
-
RE: Improving myself questions.
-
Improving myself questions.
I am a self-taught programmer that started out in classic ASP and moved to .NET when it came out. I have done about five "big" we projects (VB.NET, ordering process, business analytics) but they have all be just me by myself. I am always able to do what I need but I fear that since I have never been in an environment with other programmers that I might not be doing everything the best way it could be. What sites do you recommend (other than this one) where I can not only view code but learn why it's done a certain way?
I want to be programming as best I can with the right methods even though they might be overkill for the projects I am working on so that when I get in a company with multiple programmers I'm not the WTF guy.
Here are a couple questions of the type I have:
1) When should I be using data adapters? Right now I usually have only one or two editing records pages so I'm using Stored Procedures for the page and it's working fine. Data adapters seem to be overkill and more code for simple queries and a single update page. I know the theory behind them but what is a real world scenario where I should be using them?
2) I have a Tools class where I put my personal functions. Two are the following to ALWAYS return a string and decimal. Is this the correct way of doing it? I use this always when I'm grabbing values from the database (into variables and textboxes, etc.). For example tbxName.Text = Tools.ConvertString(objDataReader("Name")). FYI, I also put constraints and such on the fields that never should be null in the database, etc.
Public Shared Function ConvertString(ByVal myObject As Object) As String
Dim strString As String = ""
Try
If myObject Is Nothing Then
Return strString
Else
strString = CType(myObject, String)
Return strString
End If
Catch ex As Exception
Return strString
End Try
End FunctionPublic Shared Function ConvertDecimal(ByVal myObject As Object) As Decimal
Try
Dim decNumber As Decimal = Decimal.Parse(myObject.ToString)
Return decNumber
Catch ex As Exception
Return 0
End Try
End Function