Jump to content
Xtreme .Net Talk

PlausiblyDamp

Administrators
  • Posts

    7016
  • Joined

  • Last visited

Everything posted by PlausiblyDamp

  1. IIRC File.Copy takes a file name as a string and the resource is treated as a stream, you can't just use the two things interchangeably. You would need to open the resource as a stream and copy the contents to the destination.
  2. The DataAdapter needs to be told what command to use when inserting, updating and deleting - you would need to assign your cmdupdate to the adapter's UpdateCommand property/
  3. Which line is the one throwing the exception? If you step through the code what is the value of testda on the line testda.UpdateCommand.ExecuteNonQuery() if it is non-null then what about the value of testda.UpdateCommand?
  4. Re: Accesing Another Class Methods If you are creating a class member without the shared keyword then that member is associated with an instance of a class - this means you would need to declare a variable and assign an instance of the class to this variable and access the member via this variable. If it is marked as shared then it is associated with the class rather than an instance and only one copy would ever exist in memory - this is accessed via the class as opposed to an instance. In practice though you would normally be looking at instances rather than shared members unless you have a good reason to use shared. It might help if you gave a little more detail about what you are trying to do and see if anyone can give you more specific advice.
  5. I suspect you might need to mark the property as being virtual to get the relationship working, I don't have VS handy at the moment to try it out though.
  6. If you wish EF to allow you to navigate the relationship between the various entities then you need to create a property of the same type rather than just use the ID, e.g. if you have a type like public class MachineType { public int MachineTypeId { get; set; } [Required] [DataType(DataType.Text)] [Display(Name = "Type Display")] public string Name { get; set; } } Then the report class would look more like public class Report { public int ReportId { get; set; } //[Required] [Display(Name = "Machine Type")] public MachineType MachineType { get; set; } //rest of class
  7. Re: Access or SQL You can't update a UI element from a non UI thread, your ProgressChanged event is being raised on the background thread and as such is causing this problem. Is there a reason you aren't using the built in BackgroundWorker component as you seem to be emulating it's way of doing things.
  8. Re: Maybe try this Not sure about lazy as it seems to be effort than just using a UserControl to get the same result but without having to hack at designer generated code.
  9. Re: "The upgarde patch cannot be installed" error while installing Visual studio 2003 Have you actually installed visual studio before attempting to service pack it?
  10. Forms aren't normally contained inside of another form in that way, if you were to make form1, form2 and form3 into user controls instead then things would be a lot easier.
  11. I can't see any reason from the code posted why this should happen, if you step through the code can you spot which line is executed before notepad opens?
  12. Is there any different software installed on this third machine? What happens if you you use another application to create a file with the same name as one of the above files?
  13. Strange, is there a proxy set up for vlc at all? Seems odd one app can play the streams while another can't. It might be worth trying to clear the proxy for media player and see if that helps.
  14. Can media player be used to play the stream on it's own rather than an embedded control? If so then it should also work if embedded in your application, Media Player itself can certainly play streamed media and it does support UDP amongst the various network types so it might be worth trying and seeing what happens.
  15. Have you tried embedding the media player control into your application and pointing it to the url of the streaming media?
  16. The #If Debug Then statement will equal true at compile time if it is a debug build, this won't be effected by a debugger being attached or not.
  17. It looks like you will need a page or handler on the server to set as the destination url, this would then receive the uploaded file and would be responsible for saving it out the the actual physical location.
  18. The problem I can see is the requirement that these things get signed, if you are waiting for a full page the time delay between the first item that should go on a page being entered and the actual page being printed could be long enough that the person needing to sign the first item is no longer in the vicinity.
  19. It looks as though it is attempting to take the file contents and pass them to the URL you are specifying. You are getting a 404 because it is expecting http://www.callistocreations.co.uk/licensing/keys/test.txt to exist on the server already. Have you tried uploading to a destination URL of http://www.callistocreations.co.uk/licensing/keys to see what happens?
  20. How did you pass in the username and password?
  21. Do you need to log into the site before you are allowed to upload files? If so you need to pass your login credentials with the upload request.
  22. Do you know what the server is (e.g. Apache?) or id this is hosted externally would the hosting provider be able to supply this information.
  23. Does the folder you are uploading to exist? Just because you have access to the file system doesn't mean the server is also configured to allow uploads though. What type of web server is it and how is security configured on the server?
  24. If you try the code you posted above (without the last two lines commented out) what happens? Doe you get any specific errors raised or does it fail in some other way? Do you actually have permissions to upload to the specific area on the destination server? If so you will need to pass the appropriate credentials along with your request.
  25. Unless the printed record is required immediately wouldn't it be easier to just store the information in the database and not bother printing anything at all, if people need a printed record then they could always print off a report from the DB anyway.
×
×
  • Create New...