Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / Extensibility / February 2006

Tip: Looking for answers? Try searching our database.

DDEX for Compact Framework?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Robert Simpson - 31 Jan 2006 15:46 GMT
I've been pretty frustrated with the lack of response over the last few
months over at forums.microsoft.com regarding the DDEX portion of the VSIP
SDK, so I thought I'd give the newsgroups a try.

I've managed to put together a VS2005 data designer extensibility project
for my ADO.NET 2.0 provider for SQLite.  Right now it is a packageless
provider, but I plan to finish it off just as soon as I get a few nagging
issues resolved.

Specifically, there is zero documentation in the VSIP on how to implement a
DDEX provider for a Compact Framework project/data source.

As you know, the CF version of ADO.NET is a subset of the full framework.
No factory support, no ConnectionStringBuilder, etc.  In order to have a
design-time experience for it, you have to create some kind of proxy that
acts as a stand-in for all that functionality, and somehow tell VS2005 that
you're acting on behalf of the "real" provider and that the "real"
provider's reference should be added to the project and not the proxy's
reference.

There seems to be no documented way to do this, and furthermore, it appears
as though some of the implementation guts are in Microsoft.VSDesigner.DLL
which appears in the VS installation cab files, but is ngen'd to the GAC and
the original DLL is never really installed on your development machine.

So how can I implement a CF data designer?  How can I keep it open source if
the references it would depend on are not available on everyone's
development machines?

Milind Lele where are you?!  :)

Robert
Yan-Hong Huang[MSFT] - 01 Feb 2006 04:25 GMT
Hi Robert,

I have reviewed this issue. Since the issue is complicated, I will contact
our VSIP support team on it first. We will get back here with more
information as soon as possible.

If there is any informantion you want to add, please don't hesitate to
reply here. We are closely monitoring this issue and will follow up.

Thanks very much for your patience.

Best regards,
Yanhong Huang
Microsoft Community Support

Get Secure! ¨C www.microsoft.com/security
Register to Access MSDN Managed Newsgroups!
http://msdn.microsoft.com/subscriptions/managednewsgroups/

This posting is provided "AS IS" with no warranties, and confers no rights.
Robert Simpson - 01 Feb 2006 05:05 GMT
Thanks for the followup, I appreciate it.  I agree, the issue does appear to
be rather complicated and seems to delve pretty deep into undocumented
territory.

Robert

> Hi Robert,
>
[quoted text clipped - 17 lines]
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
"Gary Chang[MSFT]" - 03 Feb 2006 03:29 GMT
Thanks for your understanding, Robert!

We just contacted our VSIP support engineer for this issue, currently they
have already looking into the problem. We will reply you as soon as
possible.

If you have any more concerns on it, please feel free to post here.

Have a nice weeekend!

Best regards,

Gary Chang
Microsoft Community Support
======================================================
PLEASE NOTE the newsgroup SECURE CODE and PASSWORD will be updated at 9:00
AM PST, February 14, 2006.  Please complete a re-registration process by
entering the secure code mmpng2006 when prompted. Once you have entered the
secure code mmpng2006, you will be able to update your profile and access
the partner newsgroups.
======================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from this issue.
======================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
======================================================
Sumit Badjatia - 04 Feb 2006 20:59 GMT
Hi All,

I completed with my research and we tested filter values can't accept
formula even we tried with sharepoint OM code. So possible workaround here
could be to use SPList object to access list and call GetItems against it
with specific query,  which will return dataset and we can bind it to grid or
display it by rendering html. So we can put this logic in webpart.

If you are fine with this solution we can provide some sample code snippets.

Thanks and Regards,
Sumit Badjatia
Microsoft Developer Support – SPS/CMS
E-Mail: sumitba@microsoft.com

> Thanks for your understanding, Robert!
>
[quoted text clipped - 22 lines]
> This posting is provided "AS IS" with no warranties, and confers no rights.
> ======================================================
Robert Simpson - 05 Feb 2006 03:19 GMT
Are you sure your reply was meant for this thread?  I have absolutely no
idea what you're talking about ...

Robert

> Hi All,
>
[quoted text clipped - 7 lines]
> If you are fine with this solution we can provide some sample code
> snippets.
Sumit Badjatia - 06 Feb 2006 21:30 GMT
Sorry Robert ,  There was some confusion with different thread.

Regards,
Sumit

> Are you sure your reply was meant for this thread?  I have absolutely no
> idea what you're talking about ...
[quoted text clipped - 12 lines]
> > If you are fine with this solution we can provide some sample code
> > snippets.
"Ed Dore [MSFT]" - 06 Feb 2006 21:45 GMT
Hi Robert,,

I have some pending email out to the development team that actually wrote
the designer for the compact framework provider. The team that wrote the
DDEX SDK didn't author that particular component, and we're working to
establish a contact the team that authored the provider. As soon as I hear
back, I'll post another response to this thread.

Sincerely,
Ed Dore [MSFT]

This post is 'AS IS' with no warranties, and confers no rights.
Robert Simpson - 06 Feb 2006 22:03 GMT
> Hi Robert,,
>
[quoted text clipped - 3 lines]
> establish a contact the team that authored the provider. As soon as I hear
> back, I'll post another response to this thread.

Excellent!  I appreciate the followups to the thread ... beats banging my
head against the wall!

Robert
Robert Simpson - 12 Feb 2006 05:54 GMT
Aha!  I made some progress today.  I smell success on the horizon!

I found some little gems of registry keys under
HKLM\Microsoft\.NETCompactFramework\v2.0.0.0 that has a list of platforms
and a wonderful little subkey called "DataProviders".  I added the GUID of
my provider to the list, and boom!  I was able to successfully add a project
data source to my Pocket PC application.

Now, it is still adding the reference to my full framework DLL to the CF
project instead of the CF version, but this is a big step in the right
direction.

I feel like the Indiana Jones of DDEX!

Robert

> Hi Robert,,
>
[quoted text clipped - 8 lines]
>
> This post is 'AS IS' with no warranties, and confers no rights.
Robert Simpson - 12 Feb 2006 06:07 GMT
Well, that was short-lived.  I got past the datasource wizard, but it didn't
actually let me reference the new project data source.  I'm still
spelunking.

Robert

> Aha!  I made some progress today.  I smell success on the horizon!
>
[quoted text clipped - 25 lines]
>>
>> This post is 'AS IS' with no warranties, and confers no rights.
Robert Simpson - 12 Feb 2006 07:51 GMT
Ok, I'm really really close now ... I've successfully gotten the wizard to
add the reference to the compactframework version of the library.  Needed to
add another key under AssemblyFoldersEx.  I have a few technical
difficulties to overcome, but I'm knockin' things down one by one.

Robert

> Well, that was short-lived.  I got past the datasource wizard, but it
> didn't actually let me reference the new project data source.  I'm still
[quoted text clipped - 32 lines]
>>>
>>> This post is 'AS IS' with no warranties, and confers no rights.
Robert Simpson - 12 Feb 2006 09:26 GMT
Well, I promise to stop replying to myself -- especially since I've hit the
final roadblock.  I think I've gotten about 80% there.  Something is
screwing up internally and is likely due to a piece I just don't have any
information about.

From within a smart device project:
I can get to the "add project datasource wizard" from a bindingsource
object.
I can create a new connection
I can view and select the table(s) to add
When I hit "finish" a proper reference to the CF version of the provider is
added to the project, but an unusable typed dataset is constructed.

Somewhere during the typed dataset construction piece, things go haywire.
The final typed dataset is unusable by a BindingSource object and generates
all kinds of first-chance exceptions when you try and reference it.
Sometimes its so garbled the typed dataset can't even be opened and your
only option is to delete it.

One thing I've noticed ...If I change the path in the AssemblyFoldersEx key
to point to the "full framework" version of the provider I get even stranger
results.  The above still continues to occur, but if I right-click on the
project, add a new dataset to it, and drag and drop a table from the server
explorer, then I can reference it properly from the bindingsource object.

If I subsequently remove the full framework reference and put in the CF
reference, and then edit the typed dataset to where it needs to be saved
again --then its toasted afterwards and can't be used anymore.

So I don't even have a clue where to go next.  Based on rough observation,
I'm guessing perhaps it could be buried in the CF code generation process
for typed datasets.

Robert
"Ed Dore [MSFT]" - 13 Feb 2006 18:51 GMT
Hi Robert,

What sort of exceptions are you seeing get generated, can you configure the
debugger to break when the exception is thrown, and post back the callstack
from whence the exception is getting thrown. Knowing this, we might be able
to figure out where the dataset is getting garbled.

Sincerely,
Ed Dore [MSFT]

This post is 'AS IS' with no warranties, and confers no rights.
Robert Simpson - 13 Feb 2006 19:37 GMT
The 4 errors I am getting a kindof large and the newsgroup may reject them,
so I'm posting each error 1 at a time subsequent to this message.  They're
ordered 1-4 in the order they are thrown.

What I'm doing ... I have a new form, Form1

I drag and drop a bindingSource from the toolbox onto the form.

I go to the data source property and drop it down.

I select "Add new project data source"

I create a new connection and hit Next

I select the table, in this case its called "Cellars" (don't ask, its from
another user's test table)

I hit "Finish" ...

Then I get the attached errors.  They're ordered from 1-4 in the order they
are thrown.

Included are the local variables at the point of the error followed by the
stack dump.

The above steps complete successfully on the full framework provider.

If you're interested, I can send you all the code and binaries for the
provider to see if you can duplicate things over there.  Feel free to email
me.  robert at blackcastlesoft dot com

Robert

> Hi Robert,
>
[quoted text clipped - 10 lines]
>
> This post is 'AS IS' with no warranties, and confers no rights.
Ed Dore [MSFT] - 14 Feb 2006 03:42 GMT
Hi Robert,

Feel free to zip these up and post directly to my email address (just remove
the '.online' portion and it should wind up in my inbox). I'll have a look
at this tomorrow and see if I can decipher what's going on.

Thanks
Ed...
Robert Simpson - 15 Feb 2006 05:44 GMT
E-mail sent last night late -- If you didn't receive it, let me know.
Otherwise I'll just wait patiently :)

Robert

> Hi Robert,
>
[quoted text clipped - 4 lines]
> Thanks
> Ed...
Ed Dore [MSFT] - 17 Feb 2006 04:09 GMT
Thanks Robert,

The email wound up in my junk mail folder. Sorry about that. Will look into
that .zip file first thing tomorrow. My team's gotten a bit busy, and I'm
going to be out of the office for a couple weeks after tomorrow. But if I
don't make much progress tomorrow, I'll hand off the file to my team mate to
look into while I'm out.

Sincerely,
Ed Dore {MSFT}
Microsoft Developer Support
Robert Simpson - 17 Feb 2006 15:32 GMT
Excellent.  Thanks again for looking into this, Ed -- it's above and beyond,
and very much appreciated.

Robert

> Thanks Robert,
>
[quoted text clipped - 7 lines]
> Ed Dore {MSFT}
> Microsoft Developer Support
Robert Simpson - 13 Feb 2006 22:53 GMT
I've been doing a lot more testing ...

If I add a new typed dataset to the project (but don't add any tables), then
of course the BindingSource can reference it just fine.  I noticed there's
an obj\TempPE\DataSet1.Designer.cs.DLL that's compiled during this process
and is 7k when no tables have been added to the dataset.

After I drag and drop a table onto the dataset, or add a new table to the
dataset by right-clicking, and the Dataset1.Designer.cs.DLL file is
recompiled, (which may not be right away -- but things only go south AFTER
this DLL is rebuilt) and nothing works.

The DLL *looks* fine to me, but there's no way for me to be sure it IS fine.
After dropping a table onto the dataset, the Dataset1.Desginer.cs.DLL file
is 32kb, and I can no longer reference the dataset from a BindingSource.

Robert

> Hi Robert,
>
[quoted text clipped - 10 lines]
>
> This post is 'AS IS' with no warranties, and confers no rights.
Robert Simpson - 28 Feb 2006 07:52 GMT
Turns out this wasn't so complicated and undocumented a bug as I originally
thought!

After digging around, I found that all I had to do was give the assembly a
Retargetable AssemblyFlagAttribute!  Once I did that, then everything
started magically working.

Many thanks to Ed Dore and Gary Lewis for their willingness to help track
down this little gem.  Looks like Gary won't have to step through the
debugger after all :)

Robert

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.