Recent content by Don Delegate

  1. D

    save data that is entered

    I do and can not know if this code is correct for your purpose. I have no idea what the content of these textboxes is. If TextBox1.Text contains the name of your table and TextBox2.Text contains the name of the primary key or another identifying column in that table, then: yes this is correct...
  2. D

    save data that is entered

    Yes, it is. Const DeleteSQL As String = "DELETE FROM {0} WHERE {1} = @PK" cmd.CommandText = String.Format(DeleteSQL, tableName, pkName) ' ... But this is rarely really necessary. You could also define several Const strings (one for each table) for the delete statements. Const...
  3. D

    save data that is entered

    Something along the lines of: cmd.CommandText ="DELETE FROM Liquor WHERE [Product Id] = @Id" cmd.Parameters.AddWithValue("Id", productId ) cmd.ExecuteNonQuery where productId is the [Product Id] you want to remove. Do not concatenate your SQL strings, always use Parameter objects .
  4. D

    save data that is entered

    Are you sure you are looking in the right database? The database where your insert is executed is in the bin/debug or bin/release directory. Furthermore: if you added the database file to your project, check the property "Copy to Output Directory". If it says "Copy Always", the database in the...
  5. D

    Question null reference exception unhandled problem

    Combobox2.SelectedValue is Nothing. Use TextBox4.Text = String.Format("{0}", Combobox2.SelectedValue) or test for Nothing If Combobox2.SelectedValue IsNot Nothing Then TextBox4.Text = Combobox2.SelectedValue.ToString Else TextBox4.Clear End If Also: do yourself a favour and give your...
  6. D

    designer can't find custom controls

    With file, do you mean assembly (.dll) or just code file? If they're in the same assembly: always put your custom and usercontrols in a separate assembly . You are probably running a previous version of your program?
  7. D

    Can't create new DLL?

    Did you remove the reference to the old assembly from your project and did you add a reference to the new assembly in your project?
  8. D

    Limiting Combox Display

    Your variable heatInput is always 0: you declare it, and never give it a value.
  9. D

    add assembly language

    That is not the problem here. The problem seems to be that you have some assembler code and you seem to have no clue about what it does. Says who? No, trying to assign the value 181 (decimal) or B5 (hexadecimal) to a System.SByte, will result in a System.OverflowException. Take a step back...
  10. D

    add assembly language

    So actually you have no idea what your assembler code does? Where did you get that code? I think it is the equivalent of this Delphi code beginStartPositie := ZoekStartPositie + 181; Is that possible? Also: .NET has several encryption libraries. Why not use one of those?
  11. D

    Array.Sort method places each lowercas letter before the uppercase.

    Try Array.Sort(stary, StringComparer.CurrentCulture) With my current culture this returns aAbBcCdD (still not what you wanted). What CultureInfo is your CurrentCulture?
  12. D

    Question dropdownlist problem

    Use System.IO.Directory.GetDirectories to get the folders as an array of strings, or System.IO.Directory.GetFileSystemeEntries to get both files and folders as an array of string. Or use one of the System.IO.DirectoryInfo methods: EnumerateDirectories Method...
  13. D

    Web Page Snapshots

    If the url is the direct url for the image, there's no need to launch a browser. Just download the image into a memory stream.
  14. D

    Question Database Path Error

    Why don't you use the |DataDirectory| substitution string? (If needed you can even set this value from AppDomain.SetData).
  15. D

    Question dropdownlist problem

    What happens if you set a breakpoint in the event handler for the first dropdown? Does the eventhandler execute? If it does you probably selected a folder with no files in it. Can you show your relevant code and relevant markup?
Top Bottom