If txtGroup.Text <> "" Then lstAllSem.Items.Clear() lstSelSem.Items.Clear() txtGroup.Text = Replace(txtGroup.Text, "'", "''") lstallAdp = New SqlDataAdapter("select * from meet_master where muf_8 = '" & txtGroup.Text & "'", sqlCnn) Try lstallAdp.Fill(da) Catch ex As Exception End Try If da.Tables(0).Rows.Count = 0 Then ' MsgBox("No program group available. Selection of other Seminars not possible.. Continue?", vbYesNo) Else Dim dta As DataTable Dim dro As DataRow dta = da.Tables(0) For Each dr0 In dta.Rows lstAllSem.Items.Add = da.Tables(0).Rows(0)("meeting").ToString() Next dr0 dta.Dispose() End If End If
Thanks for the speedy responses but all three options generate the same error!!
Larry Rungren
ASKER
Dot net certainly has been a major step backwards in the development cycle. I have found so many things that were done in 3 or 4 lines of code now require 40 -50 lines with all sorts of hidden methods and layered access techniques. Kinda like going back to proprietary OS's that had massive function libraries that took months if not years to truly master. Typical MSFT move forward, but cut off the past completely, and the time and expense for the move is ours to swallow, Just my opinion.
Sorry if I seem negative.. First major conversion and what was second nature, 16 years VB4-6, is seemingly a different universe with no real easy path upward. Documentation is sketchy at best and most sample processes I can find seem to relate to gridview options. A true desktop, data entry process sample seems to be lacking. I've made great headway, and the only hangup is connecting existing Crystal Reports 2011 report to vb2010 without rewriting them. I have 14 reports in this app that ran fine under VB6, but that is for another day.
Thanks for the help and the smack back to reality.
Jacques Bourgeois (James Burger)
I understand your frustrations. I went through them too at the beginning of the century, having used VB from VB2 to VB6, and training other programmers from VB3 to VB6.
But keep with it. VB.NET is a far better environment and language than VB6 was. There might be a few things that take a few lines of code more than before. But they are a small fee for what usually ends up as more performance and security (although security is often frustating in .NET). And expect to write a lot less code. In the 10,000+ classes of the framework, there is almost always a method somewhere that will do what you want to do. You just need to take the time to look for it.
It took me 60 lines of codes in VB6 to retrieve the format of the date, as set in the Control Panel, in a bilingual environment. Around 20 for the number format. It takes only 1 line for each once you have discovered the System.Globalization namespace. Try to get the date a file was created or last opened without being written to in VB6. A one line thing again in .NET.
You might find that working with database involves a little more, and it does, but not much once you get your ways with the System.Data namespace. Up to 2 years ago, I was still stuck with unfrequent maintenance with old VBA code in Microsoft Access, and I missed ADO.NET almost everytime I had to go back to Recordsets. Start doing web or mobile development, and you will understand and appreciate even more the new ways of doing database stuff, and that you do not have to learn new techniques. ADO.NET is the same way no matter the type of application.
Get used to the documentation too. It is a lot better than it was in VB6. It's just that it is so huge that it takes a while before you grab the proper ways to use it. Install the local help that is not installed by default and use it as your first source instead of online help. Local help can be adapted to what you do. If you do not do Web development, do not install the web modules and they won't show up when you search. And the local help has an Index, something that is really lacking with online help, where the only way to go is through search. When you need to search outside of the tools that Visual Studio link you with, use Bing instead of Google. Bing being a Microsoft thing, they have a tendency to emphasize their own products. I find that you usually find information about Microsoft tools and apllications more easily on Bing than when you go through Google, that makes its money by throwing in stuff for companies that paid to get moved up the result of a search.
As for Crystal Report, well... it's Crystal Report. Don't blame .NET. Blame the 101 companies who worked on Crystal Report since it's inception, and who have never completely nailed it. And still don't, even if .NET has been officially around for more than 13 years.