Jump to content
Xtreme .Net Talk

PlausiblyDamp

Administrators
  • Posts

    7016
  • Joined

  • Last visited

Everything posted by PlausiblyDamp

  1. You may also want to investigate this site although his tutorial is in C# the ideas are the same.
  2. You could use a switch statement within the SQLException handler to decide based on the SQL error number and also have multiple Exception handlers to handle other (non-SQL) exceptions i.e. try { } catch (SqlException e01) { //Response.Write(e01.Number.ToString()); switch (e01.Number) { case 2601: { Label4.Text ="Error msg"; } case 50001: { //etc } default: { Label1.Text = e01.Message.ToString(); } } } catch (ArithmeticException ex) //and so on { }
  3. You would need to convert the .resx file to a valid .resources file using resgen.exe resgen.exe /compile strings.en-US.resx and then convert this into a dll using al.exe al.exe /out:en-US\App.resources.dll /culture:en-US /embedresource:strings.en-US.resources This will put the resultant DLL in a sub folder named after the culture (en-US in this case) which is the location the resource manager expects to find them. You would do the same with the French etc. resources - just change the en-US to correctly reflect the culture.
  4. http://www.xtremedotnettalk.com/showthread.php?t=84989 may be worth a look
  5. COM+ is COM with extensions - it is an evolution of COM / DCOM and also Microsoft Transaction Server. It provides a middleware hosting framework with support for state management, connection pooling, security etc. Some of it's features are now a bit redundant as they have been superceded by Web Services / remoting but things like transaction control are still useful. Under .Net you are probably best investigating the System.EnterpriseServices namespace as this is where most (all?) of the COM+ support is found.
  6. It may be worth having a look at The Soap Toolkit from MS - it is a COM component that gives basic Webservice functionality. It could save you a bit of time in getting VB6 to talk to a webservice rather than writting your own COM Dll and the intermediate saving XML to disk step. Haven't used it myself for a long time but thought you would appreciate anything that might stop you having to do too much VB6 :)
  7. Have you tried sending the strings back as UnmanagedType.BStr to see if that changes anything? Also are these methods behaving consistently wrong or do they sometimes work (or fail in differernt ways?)
  8. SendMessage should still work under .Net - could you post your existing code? If you have copied the SendMessage declare from a VB6 app then it will need to be modified to take into account the changes in data types, try this one. Declare Auto Function SendMessage Lib "user32.dll" (ByVal hWnd As IntPtr, ByVal Msg As Integer, ByVal wParam As UIntPtr, ByVal lParam As IntPtr) As IntPtr
  9. Probably better looking at the DataList control, you would have to define your own ItemTemplate (Label and an Image) but it would then allow you to repeat these in several columns.
  10. writer.Write("Hello World") should be writer.Write("Hello World")
  11. http://jakarta.apache.org/poi/index.html may be worth a look, open source project to read / write MS formats (including Excel) in Java.
  12. You never actually stated you needed to be able to read them back individually - so the code I threw together just shows how to use serialization in a simple fashion. If you want to read elements sequentially using serialization then don't close the file after each read and it will maintain it's position in the file. The loading of the array certainly works here - it's just that I didn't bother to give every single array element a new value, you should see element 2 was loaded correctly though. In the case given as the file only contains an array then yes it will load the entire file again. If you need more control over the actual file format then you probably want to investigate the BinaryReader, BinaryWriter and FileStream classes.
  13. Sub Main() Dim f As New Form1 f.Show() Application.Run(f) End Sub
  14. This may be worth a look, and also here (under Data and ADO.NET:) Also if you have any specific questions on the usage of those objects feel free to ask. Also I would personally recomend against learning C++ and raw API calls to do data access.
  15. Could you also post the line of code wher eyou are building the command string along with the variable declarations. If you do a Debug.WriteLine () what does it lookl like?
  16. Briefly, coupled applications are applications were the seperate tiers (UI, Business, Data Access etc.) are linked together in some way or form. Loosley coupled means the dependencies between them are minimal - you could change the inner workings of one component without having to propagate those changes through other tiers.
  17. Does the C# version work as it stands or are you also experiencing problems with that version? When you say some of the functions are returning data through the out parameters is it any function(s) in particular? DO you have any VB code so far? If not you may want to look here for a starting point.
  18. You may find this thread worth a read
  19. If you have installed the Framework SDK (free download from MS) then: You should be able to use the commandline tool wsdl.exe to generate a proxy class for a web service and then either csc (C#) or vbc (VB.Net) command line compilers to generate the .EXE All these tools provide help if invalid arguments are given and are also covered in the SDK documentation. If you find all the commandline arguments a bit tedious you may want to investigate a better build tool like NAnt
  20. The MSDN documentation should help a lot - most function's documentation also lists what exceptions may be raised and under what scenarios, this means at least you can decide what exceptions to trap. Any chance you could post a sample of you existing exception handling code - it may be that you are only missing something simple.
  21. within IIS you need to allow anonymous access.
  22. Here's a quick sample of using serialization and the new file I/O methods.Form1.zip
  23. http://www.xtremedotnettalk.com/showthread.php?t=85178
  24. Are you looking to output these objects in a readable format or is it something you will need to load back in later? Also I would recomend moving away from the old VB6 File based functions (FilePut, FileOpen etc) and look at using the classes under System.IO instead.
  25. Toolbar buttons don't have a name property so there is no way to retrieve it through code. Also as you will be only passing controls into the function you would be better of strongly typing the parameter. i.e. Function name(cont as Control) as string return (cont.name) end function saying that the function itself seems a bit un-needed - is there any reason why you can't just refer to the control's name property in the first place?
×
×
  • Create New...