Search:

Type: Posts; User: jmcilhinney

Page 1 of 13 1 2 3 4

Search: Search took 3.77 seconds.

  1. Thread: Logic

    by jmcilhinney
    Replies
    8
    Views
    160

    Re: Logic

    With regards to saving the data, I suggest that you check out my CodeBank thread on Retrieving & Saving Data. It includes an example of saving data from a DataTable using a data adapter. That's what...
  2. Thread: Logic

    by jmcilhinney
    Replies
    8
    Views
    160

    Re: Logic

    You're making a mess of something very simple. You should be binding one DataTable to the grid, another to the column and then saving the changes with a single call to Update on a data adapter. I...
  3. Thread: Logic

    by jmcilhinney
    Replies
    8
    Views
    160

    Re: Logic

    For the record, you don't need to nest Using blocks if there is not code between them. A single using statement can be used to create multiple objects:

    Using con As New SqlConnection("Data...
  4. Replies
    3
    Views
    102

    Re: [RESOLVED] IndexOutOfRange Exception

    That seems a slightly odd solution. Why add an alias just to use on that one line when you could just use the actual column name when adding the items:

    Using cmd As New...
  5. Re: ssl Localhost privacy error.How to resolve

    Is the URL for HTTP or HTTPS?
  6. Replies
    5
    Views
    198

    Re: How to change label based on day?

    I get that a lot. ;)
  7. Replies
    6
    Views
    204

    Re: Optimise a For loop VB.net

    You should also not be adding the rows to the grid one at a time. Compile all the data first, then add it all to the grid at the end. You might populate a DataTable or a List(Of T) and then bind it...
  8. Replies
    4
    Views
    147

    Re: Combo box with data source

    It ought to be done in the same place as the binding of the ComboBox. If the ComboBox is bound in code then the TextBox ought to be bound in code immediately after. If the ComboBox is bound in the...
  9. Re: Request Assistance to convert VBA to VB

    That first snippet is not VB.NET. The Set keyword is not used in VB.NET. It must be VB6. I don't really know what you're asking for. Are you saying that you want VB.NET code equivalent to that VB6...
  10. Replies
    7
    Views
    135

    Re: Data Reader

    That's still a bad idea because that's still not making use of the typed DataSet. The code should be using a table adapter, not a data adapter. You can mix and match typed DataSets and untyped...
  11. VS 2017 Re: Execute SQL query entered inside TextBox control and display results in Datagridv

    Do some research on ADO.NET and make an attempt for yourself, then ask a question here if and when you encounter an actual issue. There's loads of information out there already, so there's no need...
  12. Replies
    7
    Views
    135

    Re: Data Reader

    Actually, looking more closely at that code, it makes even less sense. You obviously have a typed DataSet because you're calling Fill on a table adapter just before that code, so why are you using a...
  13. Replies
    7
    Views
    135

    Re: Data Reader

    Isn't it obvious? You're being told that you have an open data reader and you have to close it. Look at the code you posted:
    Dim myreader As SqlClient.SqlDataReader = cmd.ExecuteReader
    That line...
  14. Replies
    4
    Views
    166

    Re: Read XML File

    What have you tried and where are you stuck? There's information about reading XML files all over the place so you'll be able to find that information if you look for it. If you don't try to do it...
  15. Replies
    3
    Views
    145

    Re: Must Declare a Variable

    I'm fairly sure that there is no such overload of Add. The enumeration of interest is SqlDbType rather than SqlTypes. For data types with a variable size, you should specify the size, e.g....
  16. Re: draw a transparented image to form background (vb.net)

    There is no Timer, which you would know if you could click a link and had read my example. I'm done here.
  17. Re: draw a transparented image to form background (vb.net)

    How can you hope to write software if you can't even use a web browser? Click the VB CodeBank link in my signature and search for the keywords I gave you on the page. It's not rocket surgery. We...
  18. Re: draw a transparented image to form background (vb.net)

    Of course it is. The Paint event is raised every time any part of the form needs to be painted/repainted on the screen, so it will be raised when the form is first displayed, as well as any other...
  19. Re: Application interperting textbox context as SQL Code

    I don't see how that new code could possibly be generating that exception. As you can see for yourself, there are no quotes at all in that SQL code. Parameter values are not interpreted as part of...
  20. Re: draw a transparented image to form background (vb.net)

    I'm not upset that you told us to write it. I'm annoyed that you think it's OK to put in no effort of your own and ask strangers on the internet to do your work for you. I created an example...
  21. Re: draw a transparented image to form background (vb.net)

    If only someone had directed you to an example that you could learn from. Oh look, they did.
  22. Re: draw a transparented image to form background (vb.net)

    Instead of expecting us to write your code for you, how about you check out the example I pointed you to, learn how to do it yourself and then write your own code? If there's something you don't...
  23. Re: draw a transparented image to form background (vb.net)

    You might like to follow the CodeBank link in my signature and check out my Simple Drawing thread. It demonstrates what .paul. suggested by storing Line objects in a generic List assigned to a field...
  24. VS 2019 Re: Covert Report code from Access to MYSQL ?

    How about you take the time and make the effort to explain the problem and post only the relevant code directly, rather than expect us all to download the file, extract it, open it in VS and then...
  25. Replies
    6
    Views
    197

    VS 2019 Re: ContextMenuStrip - click

    The delete doesn't work OK. You're removing the row from the grid but you're not deleting the data. Bind your data to the grid via a BindingSource, then use that to add and remove data. RemoveCurrent...
  26. Re: windows 10: how disable Just-In-Time on programs execution?

    Why are you pressing Cancel in the first place? Why aren't you pressing OK to terminate if that's what you want to do?
  27. Re: [RESOLVED] Events triggered when typing in ComboBox dropdown list

    Perhaps you should have been handling SelectionChangeCommitted rather than SelectedIndexChanged.

    Also, what are you actually trying to achieve? I strongly suspect that there should be no Timer...
  28. Re: windows 10: how disable Just-In-Time on programs execution?

    As for the issue, why not just press OK on the first dialogue and not try to debug in the first place? The root of the problem is that the application is throwing an exception and not catching it....
  29. Re: windows 10: how disable Just-In-Time on programs execution?

    Why would you take a shot of your entire screen when all we need is the text of the error dialogue? You could have copied and posted it as text even, but at least just take a shot of the dialogue. I...
  30. Replies
    3
    Views
    170

    Re: conversion of an data array to list

    Your question is very general so we can only give very general answers. A DataTable would work, as would a List(Of T), where T is a type of your own. How about you get specific and tell us what...
  31. Replies
    6
    Views
    197

    VS 2019 Re: ContextMenuStrip - click

    In order to use something in a Handles clause, it must be a field declared WithEvents. You're signing your grid to a local variable, not such a field. If you created the grid in the designer then it...
  32. Replies
    5
    Views
    228

    Re: It's ok if you know

    There is THE documentation. Microsoft has documented the entire .NET Framework and other APIs available. We all learn new stuff as we go and get more experienced but one of the reasons that I always...
  33. Replies
    5
    Views
    228

    Re: It's ok if you know

    They are not functions. Queue(Of T) and List(Of T) are classes.
  34. VS 2017 Re: Listview population issue in a tabcontrol

    If your code is in an event handler and you cut and paste the control whose event was being handled then the Handles clause would have been removed, thus breaking the link. You can add the Handles...
  35. VS 2017 Re: Listview population issue in a tabcontrol

    The code would not change just because they are in a different parent. ListView1 is still ListView1, whether it is on the form, a TabPage or a GroupBox. The same code will work regardless so, if it's...
  36. Re: Reading and editing a binary file as a array of Ushorts?

    You already know what the code looks like. It looks exactly like what you have but with Byte changed to UShort. Instead of expecting us to write your code for you, how about you show us the code that...
  37. Re: Reading and editing a binary file as a array of Ushorts?

    Um, you change the type of the parameters from Byte to UShort. Why should the actual algorithm be any different? The steps are the same regardless of the type.
  38. Re: Write interactive code "Print Spooler" in C# ?

    I just ran this code and it worked:

    using System;
    using System.ServiceProcess;
    using System.Threading;

    public class Program
    {
    static void Main()
    {
  39. Re: Command buttons from upgrade and newly added in Visual Studio 2019 are different

    UseVisualStyleBackColor is a member of ButtonBase, so you can only access it on a reference of that type or a derived type. If you wanted to do this on every Button then you would need a Button...
  40. Re: Command buttons from upgrade and newly added in Visual Studio 2019 are different

    If you do it in code then it would have to be done on a per-form basis, even if you do use a loop. If that property is set to False in the designer code file then you can do a Find & Replace In...
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4



Click Here to Expand Forum to Full Width