Jump to content
Xtreme .Net Talk

PlausiblyDamp

Administrators
  • Posts

    7016
  • Joined

  • Last visited

Everything posted by PlausiblyDamp

  1. Just put a breakpoint on the line that fails, then in the debugger you can inspect the variables contents.
  2. Are you doing anything else involving threads? I can't see why either your original code or the above background worker code would throw a cross thread exception.
  3. Would it not be easier to either use the tables DefaultView property or create a new DataView over the table and bind to that rather than creating an array of datarows?
  4. When you are using the client table does the dataset look correct in the debugger? i.e expected column names and contained data.
  5. I suppose the easiest way would be to recurse the sub folders yourself and either check permissions first or simply catch and ignore any permission related errors.
  6. It would use System.Data.SqlCLient classes rather than the OleDb classes and the connection string would point to a sql server rather than be an ole db provider pointing to a jet database but the actual sql commands are by and large identical for the more common tasks.
  7. On top of what? Is it not displaying the form or is it displaying it beneath other forms?
  8. Would something like private List GetFiles(string path, params string[] patterns) { List files = new List(); foreach (string pattern in patterns) { files.AddRange(Directory.GetFiles(path, pattern)); } return files; } not do the trick? Not sure what you mean about an access violation returning an empty array though - do you mean a folder containing a file a user doesn't have permission to, the user not having permission to the folder itself or something else?
  9. The Emails table has a 1000 columns? Other than listing the 250 columns in one query and then the next 250 in another I can't think of an easy way. Personally I would avoid SELECT * anyway, but then again I would tend to avoid tables with a 1000 columns as well. In all honesty it might be easier if you could split the table into multiple tables with each table containing related bits of information. Out of interest what are these columns generall used for?
  10. Have you considered SqlExpress or SQL Server Compact as an alternate? Both are 32 / 64 bit compatible and can use the sql .mdf file as a stand alone file without needing sql to be installed as a service.
  11. Have you looked at http://www.xtremedotnettalk.com/showthread.php?t=73162 and http://www.xtremedotnettalk.com/showthread.php?t=73163 as these two postings cover designer support in quite a bit of detail and may be of some use.
  12. I think you will need to create a new client for each connection - TCP is a connection orientated protocol and the TcpClient reflects that in how it operates. Is there a reason you can't maintain the connection and need to keep disconnecting and reconnecting? If you do not require permanent connection would UDP be a better option?
  13. Ones I tend to follow are http://blogs.msdn.com/ericgu/default.aspx http://blogs.msdn.com/ericlippert/default.aspx http://blogs.msdn.com/tess/default.aspx http://marlongrech.wordpress.com/ http://davidaiken.com/ http://blogs.msdn.com/chrsmith/default.aspx and the previously mentioned Scott Guthrie one.
  14. IIRC SP1 is an updated version of the framework and effectively replaces it, easiest way to check is probably trying to install .Net 2 and see if it detects a newer version installed.
  15. Is the other thread actually updating the UI? If so this is likely the problem as you should only update the UI from the UI thread.
  16. Java isn't my strong point - just to check... The method isn't part of the abstract class or the class that inherits from it but is assigned at runtime - that correct? If so delegates are probably the best way to go.
  17. Public Must Inherit class myclass public must override sub execute end class is what you are after.
  18. If you look at the dataset / datatable in the debugger are the column names the same as you would expect to see?
  19. Does the column contain nulls? If so you need to check for null before assigning the contents to a label / variable? Just as an aside I would tend to avoid using SELECT * and actually list the columns I need as this makes he code more readable and prevents strange errors if the underlying table changes ion the future; similarly I would tend to refer to the columns by name rather than an offset when accessing the data tables. You might also want to look at parametrising the query rather than relying on string concatenation as this can sometimes introduce hard to track down issues.
  20. = (short) r.Next(256);
  21. Any chance you could post the code you are using in both cases?
  22. Something like Random r = new Random(); label1.Text = r.Next(10).ToString(); should do it (or at least be close)
  23. There is no real way for a webservice to force anything out to a client, the client would need to call the web service and act on the result in some way. If you need the server to be able to contact the client then you may find an alternate mechanism (such as remoting) to be more useful.
  24. Should you not be using the Session_End event in global.asax to catch a session ending? Although you do need to be aware that this is never fired if you are storing your session anywhere other than InProc
×
×
  • Create New...