I need to write unit tests for my WP7 app. Tests are run on desktop(not on device or emulator). The problem is when i try creating DataContext class on desktop framework it fails in ctor.
I use WindowsPhone's mscorlib(2.0.5.0) in references.
Looks like it needs some DLL's from phone, but im not sure what.
Possibly someone had same problem.
Thanx!
Are you using the Silverlight Unit Testing Framework? In that case, I'm afraid there's no way to access SQL Server CE from a SL application. See Can a silverlight client access a local sql compact database that is stored in isolated storage
I think your best go is to mock the data context.
Related
I can't find much documentation on this and I haven't worked with Forms before. As I understand it, Forms 10 doesn't support ActiveX controls any longer.
Does that mean the controls won't work at all in WebForms or that Oracle just doesn't handle bugs on this issue any longer? Has anyone tried using ActiveX controls in Forms 10 and succeded? Can the controls be somehow wrapped in Java and work?
If it helps, I'm seeking to build an ActiveX control to communicate with hardware devices such as scanner and a photo camera, take pictures, process the images and then return them to a WebForms running server.
You are right using Active X and Oracle Forms when deployed on the web is not supported by Oracle.
Oracle recommend the use of Pluggable Java Components instead. The following paragraph is taken from here
I currently have a client-server application that uses an embedded
ActiveX control to communicate with an external device. How can I
maintain this functionality when I deploy the application on the Web?
Assuming that the device in question (for example, a Scanner) is
attached to each client machine, rather than the server, you will use
a Pluggable Java Component (PJC) to extend the capabilities of the
Forms Java Client and allow it to talk to the hardware in question.
JDeveloper 3.2 provides a Wizard to help you build such pluggable Java
Components.
Whether your Active X control will work or not, unfortunately the answer is that it might or it might not. If not you are on your own.
I agree that documentation is hard to find. The best place to start is the Forms Page on OTN Followed by the Forms 10g technical listings and the even older 9i and earlier docs.
is it possible to use DB like Sqlite or sqlCe for wp7 rather than isolated storage? wp6 i have used Sqlce but it was not supported now.
i have searched lot in google but couldn't get right one .
Please help me to getting started with wp7 DB access using sqlite or sqlce?? Thanks in advance
SQL CE is available in WP7 natively, though only via LINQ-to-SQL.
You might want to start with How to: Create a Basic Local Database Application for Windows Phone
I've used UltraLite for modile development for quite some time now and it has not failed me yet. It's a great option.
http://download.sybase.com/pdfdocs/awg0900e/ulesen9.pdf
http://theopensourcery.com/sqlite.htm
I heard that Mango will have a local database available. I'm a bit of a novice regarding this whole thing
Is it possible to use Silverlight data binding to connect to a database and automatically receive updates etc or is it something that takes a bit more work? Perhaps it is necessary to add helper functions that return lists from the database and you bind to those internal lists instead of directly to the database?
There is a msdn tutorial on how to build a MVVM application using a local database for windows phone 7 mango.
You may also take a look at MVVM Light Toolkit.
I have a basic VB.Net application that gets data from some websites and then send them to a MS-SQL database automatically. I have developed it as a desktop application with a WinForm front end with logs writing to the WinForm continuously.
Now, is it possible to convert the Winform to a Windows services so that I do not need to keep it opening in front of my PC and watching the logs, instead, it runs quietly in the background and the data gets logged into the system log viewer?
Many thanks!
In Visual Studio choose File->New Project and in the Windows templates you'll see Windows Service. Choose that option and then start migrating your code. If you kept most to all of your non-UI code in a separate DLL it will be easy because then you can have your service reference that library.
The following MSDN link has step by step instructions on how to get started with Windows Services but the answer is it not possible to convert your application but you can create a new windows service and copy your code across. This should be quite trivial.
If you have a specific interval to run the project, then you can use windows schedular to have the executable invoked as per your requirement and interval. However, as answered earlier, to convert your project to win services, you need to create the windows services from scratch and what you can do is, keep your business logic classes seperate and have objects created from the component classes.
I'm would like some advice on the best data persistence solution to use for an application that will run on the desktop (WPF) and on Windows Phone 7, sharing data between both applications. Ideally I would like to use the Entity Framework. I have considered the following technologies:
Sync Framework 4.0 - only CTP at the moment but has the big advantage of offline use. However it is an immature framework that does not allow me to use Entity Framework and seems not to be very mainstream, requiring a fair bit of a learning curve to get working.
WCF Data Service - has the advantage of allowing me to use Entity Framework. However there seems like a bit of a lag when retrieving data and off-line use is a problem.
SQL CE with syncing to centrally hosted database using Sync Framework 2.1 - will work for my WPF application but not sure about the phone.
There are so many technologies available it is difficult to "see the forest for the trees". I'd like to stay fairly mainstream if possible just to make it easier with getting help and finding code samples etc. I'm open to any suggestions or guidance.
Unfortunately, SQL CE is not currenlty supported on the phone so you'll need to use one of the other available databases there.
Although it's only in a CTP format I'd recommend giving Sync Framework a look. It your synchronization requirements are anything but trivial you should really avoid reinventing the wheel by writing the synchronisation service yourself.
Even if you did use the Sync Framework, I don't understand why that would stop you using Entity Framework on the desktop.
AFAIK there are currently no ORMs for the WP7 so you'll have to create your own DAL there.