Search results

  1. J

    update the dataset designer

    It's so long since I used a typed DataSet in anger and I don;t recall that being the case, even now that you say so. I can accept that that is almost certainly the fault of my memory though.
  2. J

    update the dataset designer

    I don't know what to tell you. It has always worked for me. As is always the case, when something doesn't work, you should isolate just that in a test project and see whether it works there, to determine whether the issue is with your project or that specific functionality. Try a new project...
  3. J

    update the dataset designer

    Just note that, if you update the DataTable schema, you will have to update any custom queries that don't use a wildcard.
  4. J

    update the dataset designer

    You don't update it in the DataSet designer. You do it in the Data Sources window. There's a button on the toolbar that will re-run the wizard and allow you to refresh the schema.
  5. J

    SImple Bindingsource.Filter problem

    Indeed and, if you need a String for display, you can call ToLongDateString, ToShortDateString, ToLongTimeString, ToShortTimeString or else call ToString and pass an appropriate date and/or time format specifier.
  6. J

    ASP.NET Web API load test problem

    SQL Server can generate GUIDs in exactly the same way that it generates integer IDs, i.e. you create a column of the appropriate type - uniqueidentifier for SQL Server - and then you make that column an identity. That said, a SQL Server table can only have one identity column, so if you are...
  7. J

    SImple Bindingsource.Filter problem

    So did I. I was referring specifically to the database schema, but the same thing applies everywhere. If there exists a data type that is specific to the data you're working with then use that data type. Don't just use a text data type for everything - or anything - because it seems easier...
  8. J

    how do i run a random function from array?

    Doing something randomly pretty much ALWAYS involves using the Random class that JohnH suggests. It will generate a random number and then it's up to you to use that number is whatever way is appropriate for your specific case. If you need a random item from a list of any kind, using the...
  9. J

    SImple Bindingsource.Filter problem

    I would tend to separate them if they're going to be used separately or combine them otherwise. Of course, you don't always know exactly how data will be used when you design a database. Fortunately, it's always possible to combine separate values or separate combined values if you need to, in...
  10. J

    Sending multiple multiple values to an SQL Query

    I originally assumed a WinForms ListBox but I realised after having written the code that you were using a GridView so it was Web Forms, so I took the time to change it. The principles are still the same either way though, so you should have been able to make the requisite changes yourself if...
  11. J

    SImple Bindingsource.Filter problem

    You should NEVER store data that is not text in a text column. ALWAYS use a data type appropriate to the data. If you're storing dates then use a data type intended for dates. You can use date, datetime or datetime2, depending on exactly what you need to store. You should read the...
  12. J

    Getting Multiple selections from Listbox

    I don't use Web Forms but I replied to one of your other threads related to this and, when I read the documentation for the Web Forms ListBox class - which is exactly what you should have done - I found that SelectionMode property and also the GetSelectedIndices method. The documentation for...
  13. J

    Sending multiple multiple values to an SQL Query

    Here's the code updated for today and for your specific case: var connection = new SqlConnection("connection string here"); var command = new SqlCommand(); var query = new StringBuilder("SELECT Name, vmHost, UID FROM db_owner.vms"); var selectedIndices = objectList.GetSelectedIndices(); switch...
  14. J

    Sending multiple multiple values to an SQL Query

    Here's something I posted elsewhere some time ago: Myself and others suggest with regularity that values be inserted into SQL statements using parameters rather than string concatenation. Using parameters is more secure, more readable, less error-prone and negates the need to escape single...
  15. J

    ASP.NET Web API load test problem

    If your unit of work contains the context then to use multiple contexts you need to use multiple units of work. If you have multiple users hitting your service at the same time then they will all have their own unit of work so that's how you ought to be testing.
  16. J

    ASP.NET Web API load test problem

    If you're load testing then you're executing multiple queries. I'd wager that it's the same unit of work in use in each case, thus there will be parallel queries. I did provide two options for a solution.
  17. J

    ASP.NET Web API load test problem

    EF doesn't support parallel queries. You need to either use multiple contexts or execute the queries in serial.
  18. J

    How to add line numbers into stack trace in release version?

    What would you change? The information is in the StakcTrace of the exception. It either contains the line numbers or it doesn't. How you log that information can't change that.
  19. J

    How to add line numbers into stack trace in release version?

    Without having looked right now, I believe that there is a 'PDB only' option, which will generate the PDB files without affecting the assemblies. This should be the case by default though, which is why I was wondering whether you were generating the PDBs but not distributing them.
  20. J

    How to add line numbers into stack trace in release version?

    Are you deploying the PDB file(s) with your EXE/DLL? If not, try that. I'm not sure whether that's enough or not.
Top Bottom