Jump to content
Xtreme .Net Talk

PlausiblyDamp

Administrators
  • Posts

    7016
  • Joined

  • Last visited

Everything posted by PlausiblyDamp

  1. Does the user running the applicaion have access to that folder? What are you trying to do with the folder - any chance of posting some of your code? Where are you running the application from?
  2. Try 2 or 3 servers for Team System! Different parts are built against different versions of the framework and SQL 2005 is required with it's own version apparently. Also another nice feature in VS 2005 is the shortcusts in the IDE - things like if you are creating an exception class just type exception and hit tab and watch it fill out a basic exception class and automatically overload the constructor etc.
  3. Couldn't build the app as it's missing a few references, however make sure that the build action for the jpeg is set to 'Embedded Resource' in the property window. Also it may be worth mentioning that you are using a beta version of vs.net and as such things may differ from the current release.
  4. integer arithmetic inside a checked block will throw an exception if the statement would cause either an overflow or an underflow. unchecked blocks will just wrap round and not generate any errors. The reason both keywords exist is the default behaviour can be set on a project by project basis - and as such you may need to override that behaviour in certain places.
  5. Is the .jpeg in a sub-folder of your project? If so C# requires you to use Namespace.FolderName.ResourceName - I've just updated the earlier link to include both a VB and a C# version.
  6. Have you looked at the sample found here?
  7. Do you mean the image is included as an embedded resource within the executable? If so then clicky
  8. You should have a look at the command line tool caspol.exe - seems to do what you require.
  9. sp_attach_db and sp_detach_db are two stored procedures that are part of a standard SQL server install. If you use a tool like Query Analyzer to execute them they will allow you to copy the physical DB files from one location to another and then re-attach the database to the new server - effectively allowing you to copy a DB between PCs.
  10. The web client only supports Http / https and not ftp. If you have a search in these forums you will find a couple of examples of downloading via ftp.
  11. Does the file 1.txt already exist? IIRC i think you need to specify a file that doesn't already exist. If not you may want to check if the file is in use and as such prevented from being over-written.
  12. Any chance of a clue as to what the error was? It is a lot easier for people to help if you give them more information.
  13. When you try to instantiate an object the New keyworld should always result in a valid object being returned - for this to just result in a null reference (I.e. the object is set to nothing) is extremely unusual behaviour. Within VB the only way for a Sub New to not return an object is for it to throw an exception, this however can be a performance hit and again is not standard behaviour. A more OO way of acheiving this is to delegate the creation of class instances to a shared method - this may return Nothing. i.e. Public Class DemoClass Private _number As Integer Public ReadOnly Property Number() As Integer Get Return _number End Get End Property 'Declared protected so cannot be called directly Protected Sub New(ByVal i As Integer) End Sub Public Shared Function CreateDemo(ByVal number As Integer) As DemoClass 'for demonstration purposes we validate the number and only 'create a class for odd numbers If number Mod 2 <> 0 Then Dim tmp As New DemoClass(number) Return tmp End If Return Nothing End Function End Class and this could be called like Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim c, d As DemoClass c = DemoClass.CreateDemo(1) 'works d = DemoClass.CreateDemo(2) 'Returns nothing End Sub
  14. C# uses the same operators as C/ C++ for bit shifting.
  15. Seems a bit hit and miss at times but if you just type class MYClass: IMyInterface yo u should get a tooltip telling you to hit tab - that will implement the interface. 2005 is a lot more reliable though. Also if you use the class explorer you can drill down to the interface and right-click and select implement interface.
  16. Also if you haven't looked at http://www.xtremedotnettalk.com/showthread.php?t=83092 then you may want to have a quick glance.
  17. You can always detach a sql database (sp_detach_db), copy the .mdf .ldf (and any .ndf if they exist) to the new server and can then attach them there (sp_attach_db)
  18. If temp is declared as the parent object then yes, you can make it equal to a sub-class. In fact you can always implicitly cast to a base class i.e. you don't even need the (...) bit.
  19. Operator overloading is in the next version of VB. IIRC they are not introducing the ++ or -- operators though - however this is worth a glance.
  20. Is this happening with all files or just one in particular? If just a single file would it be possible to attach the file here and see if anybody else has the same problem?
  21. Which line generates the error? The error indicates that you are trying to reference a variable that is set to nothing - may be worth stepping through in the debugger and see which objects are not being instantiated.
  22. Where is the image located? Have you tried specifying a full path to the file?
  23. You have declared the array inside the InitializeComponent routine - therefore it is only visible in that routine. If it needs to be accessed from several procedures then move the PictureBox *Gallery[]; bit to the form itself.
  24. Could you post the code for the web method in question? Also have you tried refreshing the web reference in the client - just to make sure it was using the most current version of the WSDL.
  25. Best thing to do is look at Forms Authentication within the .Net framework - does exactly waht you're after.
×
×
  • Create New...