Loading record from SQL Server DB.
This is a question to see other peoples techniques for a simple bit of code.
I am intregued as to which methods people opt for.
I have a DLL project called SvrObjects.
In this is a class called Users.
This class has 2 functions called FetchUser and FetchUsers, which is in the format:
VB Code:
'function for editting user data
Public Function FetchUser(ByVal ID As Integer) As 'some object
Dim obj As 'some object
'code to load user record from DB
Return obj
End Function
'function for display users info
Public Function FetchUsers() As 'some object
Dim obj As 'some object
'code to load user record from DB
Return obj
End Function
I would like to know what methods people would use and what objects they use to pass the data back to the UI.
Woof
Re: Loading record from SQL Server DB.
How about you start?
I return a dataset in most cases, and in most cases I'm working with a datagrid, so it's simply a matter of .DataBinding() it.