Print Page | Close Window

Lost Data Source

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2010
Forum Discription: For .NET 4.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=2028
Printed Date: 21-Apr-2026 at 8:42pm


Topic: Lost Data Source
Posted By: alindzon
Subject: Lost Data Source
Date Posted: 28-Jul-2010 at 3:35pm
I just loaded up my first devforce application, and suddenly the system thinks there are no data sources.  files are all still there including the .edmx and .edmx.tt
Where did it break?
 



Replies:
Posted By: WardBell
Date Posted: 28-Jul-2010 at 3:38pm
Can you elaborate?  Did you create data sources through the Data Sources Window? Or are you talking about something else?


Posted By: alindzon
Date Posted: 28-Jul-2010 at 5:14pm
I connected to my SQL datasource exactly the same way you do in your introductory silverlight videos.  My project still builds and runs, but if I "Show Datasources" it says your project currently has no datda sources associated with it....
 
which is kind of funny considering it runs fine and loads data from the datasource.  So somehow, the Data Sources panel is broken.
 


Posted By: WardBell
Date Posted: 28-Jul-2010 at 6:48pm
I'm struggling with that darned window too. It doesn't seem to behave ... and we're not the only ones complaining.
 
Look under properties for the datasource XML; it's hiding in there somewhere. If not, let me know. If it is, can you send me the XML (it will be short) ... because I have some guesses.
 
If the app runs, that suggests that you got the Data Source working at some point along the way before it disappeared. It must have lived long enough to generate the collection in the resource that you're binding to. You'll see it in the XAML view.
 
That's what really matters. I often blow away the Data Source after it's done its job helping me draft the view.
 
I wish I had a better answer for you. That Data Sources Window has been a royal pain for me. Maybe the light bulb will go on some day; for now ... I have a hard time predicting what it's going to do.


Posted By: alindzon
Date Posted: 28-Jul-2010 at 7:49pm
I have a thought, why not create a new project and then after loading the same datasource, copy the XML file to this project?  Would that repair it?
 
Or since you don't tend to use it anyway, like it is used with ria to drag onto the grid, should I just ignore it?
 
The XML file is definitely not there, which probably explains why the Window cannot see it.
 
 


Posted By: alindzon
Date Posted: 28-Jul-2010 at 7:55pm
I tried with a new clean project, and the new project also shows no data sources, but has perfect edmx and edmx.tt files
 
If its not important, I will just ignore it.  I was looking for it to remind me of the field names.
 


Posted By: WardBell
Date Posted: 28-Jul-2010 at 7:59pm
Yeah - if the XML file is missing ... no data source :-)    Who know where it went.  We didn't touch it ("honest, ma ... I didn't touch it. The dog did it").
 
Yes, creating another Data Source somewhere else and copying it in would do it. Or just create it again in place.
 
I don't think RIA needs it again either. If you look in the XAML, I believe you will see that it plays no active role. Maybe there's a "d:DesignInstance" remnant. Don't remember. As you can tell, I don't roll this way.
 
I do like Blend and Design Data though. I have an article coming out on that in September. I'll probably blog about it too. But don't wait for me. Go learn about it on the web!


Posted By: WardBell
Date Posted: 28-Jul-2010 at 8:05pm
Regarding "remembering the fields" ... there are so many better ways to do that.
 
Check out the new "Solution Navigator" among the http://visualstudiogallery.msdn.microsoft.com/en-us/d0d33361-18e2-46c0-8ff2-4adea1e34fef?SRC=VSIDE - Microsoft Productivity Power Tools Extension s for Visual Studio. Very cool. You can use its tree view to drill into any class ... including the properties of an Entity. You can tear away a sub-window that shows just the entity of interest. Drag it to your second monitor while your working on the view.
 
 



Print Page | Close Window