Jump to content
Xtreme .Net Talk

PlausiblyDamp

Administrators
  • Posts

    7016
  • Joined

  • Last visited

Everything posted by PlausiblyDamp

  1. When you build the project the referenced DLL is copied to the output folder (where the .EXE resides).
  2. Is Javascript enabled for that URL or Zone though?
  3. What browser(s) have you tested this with? What are the security settings for the zone in which the page is running from? Is JavaScript enabled or not on the browser for this zone / site / url?
  4. Are you running this from the folder that contains the Catalog.vb file?
  5. Could you post the SQL you are using to populate the dataset?
  6. It might be easier to wrap the name / path into another class. i.e. Public Class FileItem Private ReadOnly _DisplayName As String Private ReadOnly _FilePath As String Public Sub New(ByVal DisplayName As String, ByVal FilePath As String) _DisplayName = DisplayName _FilePath = FilePath End Sub Public Sub New(ByVal FilePath As String) _FilePath = FilePath _DisplayName = System.IO.Path.GetFileNameWithoutExtension(FilePath) End Sub Public Overrides Function ToString() As String Return _DisplayName End Function Public ReadOnly Property DisplayName() As String Get Return _DisplayName End Get End Property Public ReadOnly Property FilePath() As String Get Return _FilePath End Get End Property and use this with the list box. If you create an array of these you could use the array as the datasource and it will automatically use the DisplayName for the listbox text.
  7. You would use the restore option if you had previously backed up the database, if you have just copied the files the the attach option is the one to use.
  8. Thats why parameterised queries can be an enourmous help.
  9. The line looks like you are passing an empty string somewhere when it should be a string containing a number.
  10. http://www.xtremedotnettalk.com/showthread.php?t=94339
  11. Are you adding the data table to the dataset anywhere? Also if you use [ vb ] [ /vb ] for the code blocks instead of the [ code ] [ /code ] it will colour the text for you anyway.
  12. Can you still access the service via code though? If so is it really a big problem about not being able to test it over SSL through the simple web page that is generated?
  13. Does the oDSParentChild dataset have any tables created in it at the point of error? Looking at your posted code it looks like it hasn't had any tables created in it so far.
  14. Just a couple of points on exceptions in general... Be aware that catching all Exceptions with code like catch(Exception ex) (well CLS compliant ones anyway) is potentially a bad thing - you are basically saying that whatever goes wrong you are happy to catch and correctly handle the resultant exception, regardless of what it is. Some exceptions are going to be well beyond your ability to deal with e.g. OutOfMemoryException, StackOverflowException and similar, if you must catch all exceptions then you also probably want to rethrow them rather than just swallowing them... Also using a series of specific catch blocks, that target the exceptions you are expecting to deal with, rather than a single catch block with a nested if statement makes it much harder for exceptions to be accidently ignored during development only to surface in someway after deployment. As a final note you also need to be aware of the relative performance aspects, although exceptions can be less efficient than checking in advance you need to weigh up a couple of things: 1) How often is the exception likely to occur? If you are checking for the presence of a file before opening it and you would expect the file to be present nearly all the time it may be simpler in the long run to assume it is present and handle the odd occasion when it isn't by catching the exception. 2) Code like //May not compile, no VS on this pc but you should get the idea if (System.IO.File.Exists("c:\\test.txt") { System.IO.FileStream = System.IO.File.Open("C:\\test.txt"); //use fs } introduces a race condition - there is always the possibility that the file could be present when the initial check is performed but deleted before the attempt to open it! You would still need to handle the possibility of an exception anyway...
  15. You can use one connection for multiple DataAdapters just fine. The only time this could be a problem is if you are using multiple threads / async methods to run multiple adapters on the same connection at the same time.
  16. If it expects an integer as 0105 then either it will accept 105 or it is not expecting an integer. Are you sure it isn't requesting a string that contains an integer? If possible could you post the API declaration here.
  17. Integers do not contain formatting 205 is numerically the same as 0205 (as is 00000000000000000000205) the leading 0s have no meaning.
  18. MSDN should have a full list of all the Exceptions thrown by .Net and the framework - see clicky for a starting point. Then again you may be better of investigating the Exception Handling Application Block to see if it can prevent you re-inventing the wheel.
  19. Are you wanting to identify what type of error occured and then display an appropriate error messge based on that or are you looking at generating your own error messages of the form: "Error XXX: Some error occurred" - where XXX is a unique error number? If the latter then you would just need to provide your own error numbers in the messages themselves. If the former then your try catch would need to trap the correct exception types and act accordingly. try { //do something that could cause an error here FileStream fs = new FileStream("c:\\test.txt"); } catch (FileNotFoundException ex) { //handle file not found } catch(SecurityException ex) { //handle insufficient permissions here }
  20. The deserialise method accepts a stream as a parameter and will deserialise the next object at the current file location - it doesn't attempt to deserialise the entire file in one go. If the structures are at known boundaries (seems to be the case if they are all 32 bytes long), you could read a chunk of the file in to a byte array and process that - then read the next chunk and so forth.
  21. Is the web service already in existance or are you planning on writing that as well? If it already exists what format does it expect the data in?
  22. You could simply count hte occurence of each letter in the original list of letters, then given a song name you could just count the number of times each letter crops up and compare against the original list - if they list contains the same or greater number of letters then the song name is in there. If you have a more specific question then feel free to ask - however nobody here is just going to do your assignment for you...
  23. You will need to declare MyDS outside of the form load if you want it to be used in other methods of the form.
  24. It hardly takes a lot of keystrokes to build a .exe in .Net either though, do it straight from the build menu and every time you run the app it is building a .exe - I fail to see how this is harder than VB6. If you wanted to deploy a VB6 application you still needed to make sure the runtimes were installed (and the correct versions if you had serviced packed your installation), deploying a .Net application isn't any different in that respect. In regards to Rot13's help - it will only be of use if the destination PC has the framework installed, otherwise it will not run.
×
×
  • Create New...