Jump to content
Xtreme .Net Talk

Machaira

Avatar/Signature
  • Posts

    330
  • Joined

  • Last visited

Everything posted by Machaira

  1. I started to whip one up, but I'm not happy with it so I'm tweaking it. I should be able to finish it by tonight. Nice little side project to work on. :)
  2. Sounds like you have another query that's running when you're calling ExecuteReader.
  3. I'll give it a try. Thanks much!
  4. Can you elaborate on this? How would the SQL look? I'm a relative newb in SQL Server. :) Thanks for the reply.
  5. Is "Hello." the only thing you've typed? I believe the code looks for a space before it so if it's the only thing it won't pop up anything
  6. Never claimed it wasn't. ;) That's what happens when you whip something up. :D
  7. The only way I could think to do this would be to select all the IDs in ID order, loop through them and stop at the first hole and use that number in the insert. It would mean your newest record wouldn't be at the bottom of the list if you sort by ID however. If that's a big deal you could do what bri said, although it's a good bit of work.
  8. OK, I'm assuming there's a way to do this in SQL Server but I've never needed to do it before and can't seem to find the exact syntax. I need to create a new record in a table and get back the key field that was created. Can I do this with one statement?
  9. That's the way it works. When you insert a new record the database does a "SELECT Max(ID)" query, adds one to it, and makes it the new ID. If you want to fill in gaps from deleting records you'll have to generate the ID manually, not a process I'd recommend. Usually you don't care what the ID is, just that it's unique.
  10. You can use the SmtpMail class in the framework.
  11. DataGrid null columns (resolved) Maybe I'm missing something. I have a datatable with a field that's a bit type. Due to joins the field could be null. I'm binding the field to a DataGridBoolColumn column style. For the null entries it shows up as a greyed out checked checkbox. I've set the NullValue property for the column style to False and the AllowNull property to both True and False, but I can't seem to get the null entries to display as an unchecked checkbox. Any help would be appreciated. edit: sister board suggestion - use IsNull in the SQL to change the nulls to 0
  12. Here's something I whipped up to get you started. Hopefully it's useful.WindowsApplication1.zip
  13. Use the ORDER BY clause in your SQL to sort the data however you want before populating the combobox.
  14. Add more controls to the form and set their datasource properties just as you did the combobox.
  15. Try: Private _mouseDown As Boolean Private _oldX As Integer Private Sub PictureBox2_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox2.MouseDown _mouseDown = True _oldX = e.X End Sub Private Sub PictureBox2_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox2.MouseUp _mouseDown = False End Sub Private Sub PictureBox2_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox2.MouseMove If _mouseDown Then PictureBox2.Left = e.X - (_oldX - PictureBox2.Left) End If End Sub
  16. Use the MouseDown or MouseUp events. The "e" param contains the point on which the user clicked.
  17. You might be able to get away with not using DirectX for what you're showing with the 2nd and 3rd devices.
  18. The code there looks like it can determine pretty much every version. As for whether the OS is pro, adv server, server, etc. if you need to know this you must have machines that run those OSes. Whip up a quick sample to display the OS info when it runs on those machines and see if there's any difference between say XP Pro and XP Home or any of the Server editions.
  19. Just 5 years?!? Must be nice. I'll be lucky to ever be able to retire (not that I want to as I love coding).
  20. Why do you need to change the device?
  21. I'm assuming the exception is occurring in the second instance. How are you sending the message to the first instance?
  22. I started back in 1980 doing FORTRAN and COBOL with punch cards - fun!! :) It looks like we're tied at around 25 years. God, I'm sooo old!!! :(
  23. See my reply to your previous post about the PropertyGrid control.
  24. The PropertyGrid shows the properties for whatever object you assign to it. I don't believe it's customizable.
  25. Check these URLs: http://www.control.com/1026200822/index_html http://www.startvbdotnet.com/controls/printdialog.aspx http://www.developer.com/net/asp/article.php/3102381
×
×
  • Create New...