Jump to content
Xtreme .Net Talk

PlausiblyDamp

Administrators
  • Posts

    7016
  • Joined

  • Last visited

Everything posted by PlausiblyDamp

  1. thenerd: That code is perfectly legal under VB, no need to use an ArrayList there. neuropathie: I am assuming the error occurs on the line cmd = New SqlCommand(sqlInstall, conn) as there is no indication of where the problem lies in your original post - the constructor for a Sqlcommand object only expects a string for the first parameter, not an array of strings. If you are trying to execute multiple command strings then you may want to loop over the array and execute each in turn, try something like cmd.connection = conn for each s as string in sqlInstall cmd.commandtext = s cmd.executenonquery() next [/code]
  2. http://www.xtremedotnettalk.com/showthread.php?t=49407
  3. If you step through the code in a debugger what are the values for daUpEmp and dsUpEmp when you reach the line that throws the error?
  4. You could use the simple string.Split method dim s as string = "Blah1, Blah2, Blah3, Blah4, Blah5" 'or whatever the string is dim ans() as string = s.split(",") or if you really require regular expressions then something like Dim r as new RegEx("(,)") Dim s as String = "Blah1, Blah2, Blah3, Blah4, Blah5" dim ans() as String = r.Split(s) should do it. may not be exact as I don't have VS on this PC.
  5. Does it give any errors or fail in any particular way when using it with the express edition, have you tried just including the .cs file in your application?
  6. try http://www.mentalis.org - they have a few useful classes there.
  7. You could just use the Visiblechanged event - the first time the visibility changes will be when the form is first displayed.
  8. You may be better of using the HttpWebRequest class - either look at it's async Begin / End GetRequestStream methods, or if you just want to display some indication of progress during a download look at clicky
  9. What code are you executing before your splash screen is displayed? Any chance you could post your startup code to see if anyone could spot a potential bottleneck?
  10. The entire .Net framework is not loaded into memory on application startup though - only the core runtime and then any dlls that are required by the application as they are needed. This means if you launch a splash screen from a sub main and do minimal code at this point then the number of dlls loaded should be kept to a minimum. While the splash screen is displayed load the main form and at this point other dlls can get loaded for the 1st time (data, security, xml etc).
  11. http://www.xtremedotnettalk.com/showthread.php?t=83092
  12. You would have to upload the file to the server and parse it there, there is an HTML Input file control on the toolbox (or similar name) that you could use. If you have a search of these forums you should find some hits.
  13. If a webservice ever 'dies' then it will normally just respawn the worker process and it can start accepting request again, the clients might just have to trap an error and resubmit their data. Not having multiple instances of the app in memory will greatly reduce memory requirements as well. Without knowing a great deal more about what kind of state is needed or what kind of data (and the frequency of and duration of) these transactions entail it is nigh on impossible to say what system would work best. If you are moving to .Net from VB6 many, many things have changed and this could be a good time to go back to the drawing board and see if any improvements could be made in the design of the software as well as how it is coded.
  14. You would just have a single instance of the web service and it would handle all requests. Web services do not follow the same conventions as ActiveX exes and as such don't have the concept of running multiple instances; just like you do not have multiple instances of a web site to support browsing by multiple users - the same service fullfills all requests. If you do not require permanent connections or any explicit state management between calls to the webservice / database then there is no need to track or maintain session ids or any other information between method calls. You just need to encapsulate the data you wish to send to the web service either in a class / structure or pass it as a series of parameters to the web service's method; the web service will do it's work and the function returns.
  15. You are not declaring the array size anywhere - hence it will not accept any entries. You will need to either decalre it with a size large enough to take all possible entries or investigate the redim command to see how to change the size of the array at runtime. Also it usually helps to get a response if you give an indication of exactly what error you are getting rather than expecting people to guess.
  16. Web services really work better when no permanent connections are being maintained. Could the Manager app not maintain a constant link to the scanners via sockets (or whatever) and just pass data to the webservice as a parameter to a method. Is there any real need to maintain a permanent session between the manager and the web service (does the associated sessionId have any meaning to the system other than tracking connections)?
  17. What kind of information would the Manager app be passing to the client? Would it require a permanently open connection to the DB or would it be a series of self contained requests?
  18. Did you also look at the literal control like I mentioned?
  19. Something like System.IO.FileStream fs; fs = System.IO.File.Open(imgpath, /*other parameters required - can't remember them at the moment and I don't have VS on this PC*/ ) int imageSize = fs.Length;
  20. You may find using session variables are what you need. However if you could give a bit more detail / background on what you are doing there may be an alternative approach to the problem. In most cases you want to minimise (and if possible remove) any state from the server as this will increase scalability and performance while often producing easier to maintain code.
  21. If you are using VS then you can create a breakpoint in the code behind and use all the standard debugger functionality.
  22. Are the forms all declared within a single Dll or in separate ones? Either way you are probably better off looking at creating a framework for how these forms get used. One way is to define a base form in a separate dll and if anyone requires the ability to create their own forms for your app to use then the must inherit from this base form (or you could choose to define an interface - the basic idea is the same) When your function is called they would be required to provide the fully qualified name (namspace.formname) and via the reflection API you could then load the correct dll and instantiate the form for them. A good starting point is Divil's Plugin Tutorial as this will cover the basic ideas of what is required.
  23. clicky may be worth a read
  24. If you put WaitToExit then it will hang your application till the called executable exits. If this is causing problems you could either not wait and have both apps running. As an alternative you could handle the Process.Exited event to react to the spawned application closing.
  25. http://www.xtremedotnettalk.com/showthread.php?t=69889 http://www.xtremedotnettalk.com/showthread.php?t=80819 http://www.xtremedotnettalk.com/showthread.php?t=31372
×
×
  • Create New...