Professional Web Applications Themes

How to create a component? - ASP Components

Hi- I've been posting all over the place and trying to get a simple task accomplished- I have a web page running on a CE.NET device, that needs to access a database running on the device with SQL Server CE from an ASP. I haven't gotten a straight answer anywhere (even from MSFT), so I think I'm going to go the route of creating my own Component in C++ to handle this for me, that can be called from an ASP. I know this is inetserver (which isn't technically what runs on CE) but I was wondering if anyone could ...

  1. #1

    Default How to create a component?

    Hi- I've been posting all over the place and trying to get a simple task accomplished- I have a web page running on a CE.NET device, that needs to access a database running on the device with SQL Server CE from an ASP. I haven't gotten a straight answer anywhere (even from MSFT), so I think I'm going to go the route of creating my own Component in C++ to handle this for me, that can be called from an ASP. I know this is inetserver (which isn't technically what runs on CE) but I was wondering if anyone could set me on the right track to building a component? Basically it's going to mirror the functionality of ADOCE, which is not supported on CE 4.2. Any tips/help would be greatly appreciated

    Thanks
    pete landry
    plandry Guest

  2. #2

    Default RE: How to create a component?

    Hello Pete,

    Based on my understanding, now you are developing asp page in CE.NET 4.2.
    However, you are not sure how to implement to data access component under
    this situation since adoce can't be used, right? Please post here if I have
    misunderstood the problem.

    Yes, ADO is not supported in WinCE 4.2. The only native SQLCE API available
    is OLEDB. If you're trying to access SQLCE via vb script from your ASP
    page, you'll probably need to write a wrapper around either OLEDB or
    ADO.NET to do the operations you want on the database.

    Enabling .NET on your platform is optional. However, including the .NET
    Compact Framework in your platform has a number of benefits. The .NET
    Compact Framework is a subset of the popular .NET Framework and is fully
    supported by Visual Studio .NET 2003. It enables millions of Visual Studio
    .NET developers to quickly and easily target your custom platform using
    skills that they already know. Second, the .NET Compact Framework provides
    a powerful, XML Web Services enabled execution environment for your
    platform, including support for Windows Forms, Microsoft ADO .NET data
    access, networking, and more.

    Please understand that ADO.NET is the future of data access for Microsoft
    data storage.

    By the way, this question is better posted in microsoft.public.sqlserver.ce
    group. This group is mostly focused on sql server CE questions. There are
    many active Microsoft Microsoft SQL Server CE Team members in that group.
    So I recommend that group to you.

    Thanks very much.

    Best regards,
    Yanhong Huang
    Microsoft Community Support

    Get Secure! 每 [url]www.microsoft.com/security[/url]
    This posting is provided "AS IS" with no warranties, and confers no rights.

    Yan-Hong Huang[MSFT] Guest

  3. #3

    Default RE: How to create a component?

    Hi
    Thanks for the response. The real heart of the question was - what steps do I have to go through to get a component (in my case a managed C# component that has been wrapped in a non-managed one using Interop and RegAsm.exe) registered on the system and referenced in an ASP. I have a Whatever.dll, and a Whatever.tlb, and I need to be able to call CreateObject("Whatever"). Just to be clear, this is all happening on the CE device..

    Sorry if it was unclear, and I hope this is more on topic..

    pete landry
    plandry Guest

  4. #4

    Default RE: How to create a component?

    Hello Pete,

    Thanks for the quick response. We have also received your email.

    After reviewing your reply carefully, I think the problem is:
    You developed a managed C# component and have data access layer in it. Then
    you use InterOp and RegAsm.exe to register the C# component as a normal COM
    component. Now you want to use this COM component in asp but failed, right?
    If there is any misunderstandings, please feel free to point out.

    If so, I think you met a limitation here. The .NET Compact Framework
    supports a subset of the interoperability of the desktop .NET Framework. In
    particular, you can make function calls into Win32 DLLs, but you cannot
    call COM interfaces (a feature known as COM Interop).

    .NET Compact Framework interoperability only supports calls into Win32
    libraries. It does not support calls from Win32 into the .NET Compact
    Framework. That is why you can't use InterOp here.

    So for the time being, I think of two ways for you:

    1) Stay in managed world and migrate to asp.net programming. So you can use
    ado.net code directly in managed C# component. In this way, you don't need
    to use InterOp any more and can improve the performance much.

    2) Stay in unmanaged world. That means to call database accessing APIs
    directly in a COM component. Then register the COM component and use it in
    asp page.

    I will also consult our CE Developerment team to see their advice on it. If
    you have any more concerns on it, please feel free to post here. I am glad
    to work with you on it.

    Best regards,
    Yanhong Huang
    Microsoft Community Support

    Get Secure! 每 [url]www.microsoft.com/security[/url]
    This posting is provided "AS IS" with no warranties, and confers no rights.

    Yan-Hong Huang[MSFT] Guest

  5. #5

    Default RE: How to create a component?

    Hello Pete,

    Thanks for the quick response. We have also received your email. I have
    also consulted our CE Developerment team to see their advice on it.

    After reviewing your reply carefully, I think the problem is:
    You developed a managed C# component and have data access layer in it. Then
    you use InterOp and RegAsm.exe to register the C# component as a normal COM
    component. Now you want to use this COM component in asp but failed, right?
    If there is any misunderstandings, please feel free to point out.

    If so, I think you met a limitation here. The .NET Compact Framework
    supports a subset of the interoperability of the desktop .NET Framework. In
    particular, you can make function calls into Win32 DLLs, but you cannot
    call COM interfaces (a feature known as COM Interop).

    .NET Compact Framework interoperability only supports calls into Win32
    libraries. It does not support calls from Win32 into the .NET Compact
    Framework. That is why you can't use InterOp here.

    So for the time being, the best way here is to stay in unmanaged world.
    That means to call database accessing APIs directly in a COM component.
    Then register the COM component and use it in asp page. For how to develop
    data access part in unmanaged world, you can refer to some samples. The
    SQLCE 2.0 product ships with two eVC samples. Take a look at NorthwindOleDb
    in the SQL CE sample installation directory.

    There is another solution which would be a hybrid between the two 每 use
    ASP pages as we don*t have ASP.NET in CF, call to a &shim* COM object
    using an interface which pass request / response to and from the managed
    code by some technologys like socket or
    Microsoft.WindowsCE.Forms.MessageWindow class. Its not pretty, but it*s
    the best on offer right now.

    Does that answer your question?

    Best regards,
    Yanhong Huang
    Microsoft Community Support

    Get Secure! ?[url]www.microsoft.com/security[/url]
    This posting is provided "AS IS" with no warranties, and confers no rights.
    Best regards,
    Yanhong Huang
    Microsoft Community Support

    Get Secure! 每 [url]www.microsoft.com/security[/url]
    This posting is provided "AS IS" with no warranties, and confers no rights.

    Yan-Hong Huang[MSFT] Guest

  6. #6

    Default RE: How to create a component?

    Hi Pete,

    You are welcome. If there is any unclear, please feel free to post in the
    group. :)

    By the way, microsoft.public.sqlserver.ce is much better for CE.NET DB
    related programming. Thanks very much.

    Best regards,
    Yanhong Huang
    Microsoft Community Support

    Get Secure! 每 [url]www.microsoft.com/security[/url]
    This posting is provided "AS IS" with no warranties, and confers no rights.

    Yan-Hong Huang[MSFT] Guest

Similar Threads

  1. Cannot Create Activex Component ASP.net
    By tripti_chaudhary@adobeforums.com in forum Adobe Acrobat SDK
    Replies: 6
    Last Post: August 2nd, 01:55 PM
  2. create component
    By trycold in forum Macromedia Flex General Discussion
    Replies: 2
    Last Post: August 24th, 02:40 PM
  3. Can't create component in ASP
    By Stan in forum ASP Components
    Replies: 14
    Last Post: September 18th, 02:49 PM
  4. OWC component cannot be create using ASP
    By Soksophay Lim in forum ASP
    Replies: 4
    Last Post: September 18th, 12:14 PM
  5. Replies: 3
    Last Post: August 17th, 02:18 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139