I am trying to learn WPF and how to connect and bind a sql database I have so i can return information etc. I have connected the database, the dataset is within solution explorer, the data sources are there for selection and there is a .edmx file within solution explorer.
I am trying to drag a table across from the data sources to the main window in the mainWindow.xaml page. I am getting this error. Can anyone advise on what I have to do.
"Cannot add the control to the design surface or bind to the control because the type wpftryout.CiaranTestDataSet cannot be resolved. Please try to build the project or add necessary assembly references."
As per my knowledge, There is no direct way to include SQL Database object for Display purpose. What you can do is get information from database in one table and then you can bind your information to specific object As mentioned in below link
http://www.codeproject.com/Tips/362436/Data-binding-in-WPF-DataGrid-control
In case u required more help, Please let me know
I had the same problem. After reading this: http://social.msdn.microsoft.com/Forums/en-US/9fc4f835-d6c0-4d04-86c2-779c1f8e0791/unable-to-drag-data-source-to-control-to-bind I created a new project on my C: drive (rather than the network location VS defaulted to) and it suddenly worked fine!
Related
I've created PDM in PowerDesigner and I want to generate a database of it. When I choose Database -> Generate database option in main menu, pop-up dialog is shown where I need to configure database properties like data source, credentials and other.
When I check another options in dialog window, everything seems OK to me, and Create database section is selected, meaning the Create Database... code will be included in script. When I generate script using Direct generation (General settings) option, result code doesn't consist Create Database... code.
Am I doing something wrong?
I think it is not very good explanation... Especially script related to direct generation... But if you really mean script (as title of your question says) then most likely you need to create database in your model.
To get it open model properties and press New button near database row:
When model created you need to set corresponding checkbox in Options tab during generation of model (create database, drop, open and so on).
Let's say that I have a simple WPF or Winforms solution. To that solution I add a new project (based on a class library template , which I then reference in the main project) which is intended to be a data layer containing an entity framework data model. When I create the data model in the new project the connection string that it uses gets added to the app.config file of the main project in the solution.
Now let us say that I want to add two more projects to the solution (both of which will again be based on class libraries) to contain details of WCF services that I wish to use. In each case I add the WCF service by using the ADD Service Reference option from the right click context menu of the projects.
Unlike the data model project though the bindings for the service model get added to the local projects app.config file ass opposed to the app.config file of the main start-up project.
Should I simply copy those bindings to the start-up project's app.config file, or should I copy and then delete, or in fact should I be doing something completely different. Thus far trying combination of the first two suggestions I get error messages connected with endpoint configuration, however my knowledge of WCF is not really sufficiently good to fully understand the MSDN articles that the error list points me to.
Note that if the service references are added to the main project I get no errors whatsoever, so I figure this must be a configuration problem of some description.
Would anyone be able to provide the correct procedure for adding projects that essentially contain no more than a WCF service reference to an existing visual studio solution.
Edit
The screenshot below shows my main app.cofig file after having copied over the bindings configurations from the two service contracts. I'm not sure whether I should have commented out the bit that I did or not, I had thought that by doing so I might get rid of the blue squiggly underlines telling me the following (which I must admit to not understanding):
Warning The 'contract' attribute is invalid - The value 'ErsLiveService.IERSAPIService' is invalid according to its datatype 'clientContractType' - The Enumeration constraint failed.
You're likely getting the blue squigglies because the namespace ErsTestService is defined within the project in which you created the service reference. If the root namespace of that project is MyServiceReferenceProject then try changing the namespace to MyServiceReferenceProject.ErsTestService.IERSAPIService.
I just created a data source and now I'm adding a data set. I'm using a dataset that is embedded in my report and then I go click on Query Designer... and it tells me No cube can be found. I click okay and then it tells me No Query Designer is Available. Every time I click on Query Designer... again, it just goes straight to the No Query Designer is Available window.
I looked around for some answers, and some people said that the cube's visibility might be set to false in its properties. However, I checked and it was true. I don't know what to do anymore.
Is there any way I can get this MDX Query Designer window to open? Did I do something wrong?
I don't know if you managed to fix this problem, but when it happened for me it turned out to be a permissions issue with my data source.
I'll put this as an answer here just in case it helps anyone else out - I found the cube visibility answers quite misleading (although obviously it has helped some people).
I was able to fix this same problem.
I had an embedded datasource defined that connected to my cube. I temporarily created another dataset, selected to embed this dataset in my report, selected the embedded datasource and then attempted to use the Query Designer. It worked for this new dataset. So I then cancelled the creation of the new dataset, went back to the old non-working dataset and was able now open the Query Designer window
I'm trying to make a custom column (for a custom list), where the users can upload files without overwriting the previous - this way they can keep past versions of the files and upload newer ones and the new ones append. There already exist "append only" comment columns and file upload columns that I can see.
I'm working with Sharepoint designer 2007 (2010 doesn't work with the site), and I'm referencing this code I found online somewhere (http://pastebin.com/raw.php?i=0qN89meu), trying to research the Sharepoint documentation on MSDN. I can open the site in designer, but don't know where to go from there (it's already running on a web server, not opening it locally).
I'm just not clear on how to start, I thought there'd be a simple "right+click -> new column" feature but I can't find it. If someone could point me in the right direction to where I could start creating columns on the site, that would be great. Thanks!
An untested idea :
Create a document library with a lookup column to the custom list.
Create an event receiver (ItemAdded and ItemUpdated) than will take the attached files and move them to the other list (with the correct lookup value). --> Code with Visual Studio
Grant to this document library only read permissions.
Adapt the view to display the related documents in the dispform of the custom list.
Advantages:
this seems to answer to your need
you gain all the usability of a document library (nothing prevent you to grant edit rights to other users, force check out, etc.)
Disadvantages:
you have to play with lookup. Can be tricky sometimes, if you play with features
you split one business entity to two entities. You will have to deal with cascading delete (if you need it).
I would like to insert my DotNet EXE application in excel sheet just like an OLE object. Is it possible? If yes, how we can do this.
In Excel 2003 when we click Insert->Object menu item, we get the 'Object' diloag. The 'Create New' tab of this dilaog contains varios OLE objects. I would like to display my DotNet exe application in this list so that when I select and click the 'Ok' button of this dialog, EXE should execute like others OLE object of this list.
Thanks,
Amit
Well, its been a long time since you asked, but I don't think that there is a reasonable way to achieve your goal in terms of making the WPF application an OLE object for direct embedding. The technologies are very different, and while there may be some obscure interop path through COM, you'd probably save a lot of time by taking a different approach.
For example, if you are just trying to 'launch' the application from Excel, make an OLE object that 'launches' your WPF application instead of trying to make them both the same thing.
As far as the interop is concerned, here is some more reading.
http://en.wikipedia.org/wiki/Object_Linking_and_Embedding#Interoperability
http://en.wikipedia.org/wiki/Component_Object_Model
http://en.wikipedia.org/wiki/COM_Interop
On a side note, this is an interesting question / technical challenge, but may not be worth your time at the end of the day.