Wrox Programmer Forums
|
BOOK: Silverlight 4 Problem - Design - Solution
This is the forum to discuss the Wrox book Silverlight 4 Problem - Design - Solution by Nick Lecrenski; ISBN: 9780470534045
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Silverlight 4 Problem - Design - Solution section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 29th, 2010, 11:00 AM
Registered User
 
Join Date: Jun 2010
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default To the author

I had not seen your reply earlier today before my post. I hope to see scripts posted very soon. Your book is loaded with great ideas and I'm frustrated that I've been unable to access them as your book intended. Thanks for gettting to this.
 
Old August 9th, 2010, 11:10 AM
Wrox Author
 
Join Date: May 2009
Posts: 13
Thanks: 0
Thanked 2 Times in 2 Posts
Default Should have news today

I should have an update today regarding the fix for this. I worked on creating both DB scripts for all chapters as well as new .mdf files built using SQL Express 2008 for those of you who do not have the R2 version.

I will keep everyone posted
 
Old August 10th, 2010, 03:34 PM
Registered User
 
Join Date: Jul 2010
Posts: 5
Thanks: 1
Thanked 0 Times in 0 Posts
Default

I also had problems with SQL Express 2008 at the beginning. The only thing I had to do was to set the option "User Instance" to False. After that I was able to connec to the file.
 
Old August 10th, 2010, 04:23 PM
Authorized User
 
Join Date: Dec 2005
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I get 4004 errors randomly as well.. anyone get these ?

I converted the 2008 r2 db to a 2008 by creating a script to run on 2008 db
 
Old August 11th, 2010, 02:19 PM
Registered User
 
Join Date: Jul 2010
Posts: 5
Thanks: 1
Thanked 0 Times in 0 Posts
Default

I've scripted alll Tables and Views and populated an Access-DB.
You can download it at:
http://www.steffsworld.ch/WROX/Fitness.zip

I didn't try those scripts and DB for other SQL Versions but hopefully you can create a SQL Database and populate the Tables with the values from the Access-file
 
Old August 11th, 2010, 02:43 PM
Wrox Author
 
Join Date: May 2009
Posts: 13
Thanks: 0
Thanked 2 Times in 2 Posts
Default New DB Files

The new DB files and scripts have been made available from the book's download page. These have all been tested against SQL Server Express 2008.

Please let me know if you have any additional problems working with these files!

Nick
The Following User Says Thank You to nlecren For This Useful Post:
shogi (August 16th, 2010)
 
Old August 12th, 2010, 01:31 AM
Registered User
 
Join Date: Jul 2010
Posts: 5
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Your files work also for SQL Server 2005. The only thing you have to change by creating the Files (mdf/ldf) is to set the minimum size to 3MB
 
Old August 17th, 2010, 05:46 PM
Registered User
 
Join Date: Jul 2010
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Update the PDF Version and a stupid question

Are you going to update the PDF version of your book as well?

Have a stupid question, all on timing. I need data out of a data context when the page loads .. without any user intervention.
Current process is to load data from data context then items source it to a data grid. Next step is to do a for each in the data context and creat an ienumerable. Every thing works fine, but only if I do a button click after the data grid has been item sourced. Is there some way i can do this without user intervention?

Would really appreciate any suggestions!
 
Old August 18th, 2010, 02:02 PM
Registered User
 
Join Date: Jul 2010
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi MerrillMarie,

You can create a class that loads your data and fires an event when everything is loaded. In your page, create an instance of your class, call your load method, and also add a handler for the load completed event. In your handler you can bind/enable the grid.


Code:
    Public Sub Load()

        Dim oLoaderList As List(Of LoadOperation) = New List(Of LoadOperation)

        oLoaderList.Add(Context.Load(Context.Table1Query(vars), AddressOf OnTable1Loaded, oLoaderList))
         oLoaderList.Add(Context.Load(Context.Table2Query(vars), AddressOf OnTable2Loaded, oLoaderList))

    End Sub
Each "OnLoaded" procedure calls this procedure which will fire the event when everything is done.

Code:
    Private Sub UpdateLoadStatus(ByVal oOp As LoadOperation)

        Try
            Dim oLoaderList As List(Of LoadOperation) = oOp.UserState
            oLoaderList.Remove(oOp)
            If oLoaderList.Count = 0 Then
                RaiseEvent DataIsLoaded()
            End If

        Catch ex As Exception

        End Try

    End Sub
In your page loaded event, call your data loader class method

Code:
    Private Sub MyPage_Loaded(ByVal sender As Object, ByVal e As System.Windows.RoutedEventArgs) Handles Me.Loaded


        oDataLoader = New cDataLoader
        oDataLoader.Load()


    End Sub
Bind and enable your grid when the event fires

Code:
    Private Sub DataLoadComplete() Handles oDataLoader.LoadComplete

'--- handle grid here

    End Sub
Hope this helps,

Randy
 
Old August 18th, 2010, 02:42 PM
Registered User
 
Join Date: Jul 2010
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Smile c# vs Visual Basic

Thanks, Randy .. Really appreciate it !!!

I am a c# type, so I have asked a good Visual Basic friend who also has some c# experience to take a look at it

if you are bidexterous could i get a c# version?

when I get something to work I will post the code using one of the AdventureWorks tables and RIA services (linq to SQL)..

I think this will eventually help a lot of folks out there ..

Thanks again

Frank (Merrill Marie)





Similar Threads
Thread Thread Starter Forum Replies Last Post
File Downloads - Fix in Progress Teresa BOOK: Access 2003 VBA Programmer's Reference 0 June 7th, 2006 01:23 PM
Session Reuse Problem-- How to Fix CAHyatt Classic ASP Basics 5 June 1st, 2005 07:04 PM
Problem in making database file address virtual akhilvira ASP.NET 1.0 and 1.1 Basics 0 January 4th, 2005 01:33 AM
ASP Database Connection-File permission problem goljazoran Classic ASP Databases 4 November 29th, 2003 05:09 PM
ASP Database Connection-File permission problem goljazoran BOOK: Beginning ASP 3.0 0 November 10th, 2003 10:09 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.