VB.NET Windows Application: Reading from SQL Server database

OK guys thanks for all the responses, I went to one of the lecturers today - was just frustrated last night didn't really want to wait till today. Sorted it out. I am now using the following

Code:
Dim myID As Integer 'Dim da As DataRow
        Dim displayID As Integer
        Dim ds As New CinemaDirectDataSet
        Dim dt As New CinemaDirectDataSetTableAdapters.ClientTableAdapter
        Dim da As New CinemaDirectDataSet.ClientDataTable
        dt.Fill(da)

        myID = ClientDataGridView.CurrentRow.Cells(0).Value

        For i As Integer = 0 To CinemaDirectDataSet.Client.Rows.Count - 1
            If myID = CinemaDirectDataSet.Client.Item(i).Client_ID Then
                displayID = CinemaDirectDataSet.Client.Item(i).Client_ID
            End If

        Next
 
I used to be ok in VB6.. lol 10yrs ago!! I just recently got an opportunity to do an interface for an Rs232 port for a data reader on a pump.... eish VB.net is NOT the same!!!! (taking a 10yr break in programming = BAD!)
 
And still the use of datasets? WTF

I don't have the time to go research on using other technologies, it's our final year project so some strict deadlines lie ahead. This is what the lecturer gave me. Might not be best for performance or whatever, but it works :) and thats how they will award the marks on functionallity and the actual program linking to what we designed in the documentation.
 
Jeanres - I can understand your dislike of DataSets, but you shouldn't dismiss ANY computing tool just because you personally dislike it. Sometimes there are good reasons to use it. Performance is not always the primary concern. In most cases, the first priority is to get something working, then work on performance at a later stage. And aside from serialization issues, DataSets are pretty good at what they were designed for.
 
uhm performance is not a concern? If I use datasets, get a system out and then performance becomes a issue then I will need to re-factor for the next 10 months to get all the datasets out of the system. Now tell me how that can not be a concern.

IList and objects serialize just fine with WCF
 
Was still a valid comeback, dude. I use my own classes for data objects, but I'm not averse to using DataSets/DataTables where necessary. They do a good enough job of serialising, and I find them especially useful for the odd "show-in-a-grid" call. Used properly they can become mini-databases of their own.

However, TW's reply was apt given your responses. Your replies within this thread can be interpreted to be as anti- as some of the Philosophy posts.
 
Top
Sign up to the MyBroadband newsletter
X