I guess the title pretty much says it all. I'm trying to cut my teeth on a C# application that's a bit out of my depth, and if there's anyone here with a knowledge of C# and/or SQL (preferably and ), who'd be willing to share some of your time, I'd appreciate it.
Announcement
Collapse
No announcement yet.
A Shot in the Dark: Any C# and/or SQL guys here?
Collapse
X
-
Originally posted by Freyr View PostI've got the OR part covered... never dealt with C#, but if it's just basic algorithmic logic, I might be able to give you a hand.
I'm using a foreach loop to populate the list, but it's counting the row that's the "add new row" row (if that makes sense). So even though my stored procedure is "Select * from Table where ProfileName is not null" it's still counting that in the DataSet.
(Looking at this, it sounds like more of a C# issue, actually).
As for C# being "Java by Microsoft" I couldn't disagree more. C# is a nifty language. I was sold on it the first couple of times I used it. I used to dabble in Visual Basic and I now write in C++ for my job. C# seems like a logical marriage of VB and C/C++.
Comment
-
Yeah, doesn't sound like a SQL problem persay, unless there are some weird unescaped characters messing around (it's happened).
See, I can't stand VB/Flash/Javascript from a programming perspective. I learned them because it was needed for various jobs... so I don't willing go out and learn languages like C#... I'd rather learn brainfuck
Comment
-
Originally posted by Freyr View PostYeah, doesn't sound like a SQL problem persay, unless there are some weird unescaped characters messing around (it's happened).
See, I can't stand VB/Flash/Javascript from a programming perspective. I learned them because it was needed for various jobs... so I don't willing go out and learn languages like C#... I'd rather learn brainfuck
Comment
-
Oh yeah, C++ is atrocious for GUI interfaces. I usually take the cheap way out and use the allegro library. I do mostly backend modules though, so it's all bash shell and g++. Borland was always one of the worst, imo. Dev-Cpp is an awesome (free) IDE.
Comment
-
Originally posted by Freyr View PostOh yeah, C++ is atrocious for GUI interfaces. I usually take the cheap way out and use the allegro library. I do mostly backend modules though, so it's all bash shell and g++. Borland was always one of the worst, imo. Dev-Cpp is an awesome (free) IDE.
The ironic thing is that we're switching to C# due to it's better integration with SQL (supposedly). Most of the server side of things will actually be GUI-less in the near future, and that's nice. I am trying to get a head start on the learning curve!
Comment
-
Originally posted by SeventhSon View PostI code in C# and SQL all the time...but not for UI work, so I don't know the answer to your question. i will tell you this...almost every C#/SQL question I have ever had, I found the answer pretty quickly through google.Originally posted by Tashtego View PostIt has been a while but I think another approach to this is to set the datasource of the combobox to the query result rather than for-looping. I second Seventh's advice. Google sees all, knows all.
I'm sure I'll get it figured out...
Comment
-
-
Why not just put a test to see if the field is empty before adding it to the combobox? Something like (and this is in VB, not C#, but you should get the picture)
For Each item as String in items
If item <> "" Then
cmbList.Add(item)
End If
Next
And not to get too far OT, but in my opinion C# is MS's attempt at a Java-like language.Scott
Comment
-
Originally posted by Spivonious View PostWhy not just put a test to see if the field is empty before adding it to the combobox? Something like (and this is in VB, not C#, but you should get the picture)
For Each item as String in items
If item <> "" Then
cmbList.Add(item)
End If
Next
And not to get too far OT, but in my opinion C# is MS's attempt at a Java-like language.
I'll give that a go when I get home tonight. Thanks.
Comment
Comment