Wrox Programmer Forums
|
BOOK: Wrox's SQL Server 2005 Express Edition Starter Kit ISBN: 978-0-7645-8923-2
This is the forum to discuss the Wrox book Wrox's SQL Server 2005 Express Edition Starter Kit by Rajesh George, Lance Delano; ISBN: 9780764589232
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Wrox's SQL Server 2005 Express Edition Starter Kit ISBN: 978-0-7645-8923-2 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 March 31st, 2006, 11:21 AM
Registered User
 
Join Date: Mar 2006
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default Workaround for DB Update Issue

Hi,

Anyone following the "Try It Out" steps has probably discovered that the database does not update as expected. Unfortunately, there is no explanation in the book for this.

However, here is a workaround published in the MS Press book "Build a Program Now." A .pdf version of the book is available for download from MS after Visual Basic or Visual C# is registered. The download link is provided by email from MS. There is a flavor for each language but the books are almost identical. The issue and workaround is explained on pages 152-153 (VB) and 154-155 (C#).

Regards,
Sturdy

 
Old April 4th, 2006, 04:09 PM
Authorized User
 
Join Date: Mar 2006
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Sturdy,

this one ?
http://www.microsoft.com/MSPress/books/8776.asp

do you mean that I have to buy a product to be able to download
the book, using Express Edition today - beeing a student, you see.

regards, i

 
Old April 4th, 2006, 07:16 PM
Registered User
 
Join Date: Mar 2006
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by inkimar
 Hi Sturdy,

this one ?
http://www.microsoft.com/MSPress/books/8776.asp

do you mean that I have to buy a product to be able to download
the book, using Express Edition today - beeing a student, you see.

regards, i


Not quite...you don't have to buy anything. You already have the express edition of VB or C#. When you register the EE software (which is free from MS) an email is sent that will have a link to a .pdf version of that book if you are registering C#. If you register the VB edition, the link will be to the VB version of the book.

Sturdy







 
Old April 7th, 2006, 02:40 AM
Authorized User
 
Join Date: Mar 2006
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks. :D

did register, but some time ago.

regards, i

 
Old April 11th, 2006, 10:49 AM
Registered User
 
Join Date: Apr 2006
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello,

I don't see how that fix works with VB. I have the MS book (and read it), and I don't see an explanation for the connection there. I tried the suggestion on the blue sidebar, and still nothing. The last exercise in the MS Press book did not work either.

/J

 
Old April 11th, 2006, 11:47 AM
Authorized User
 
Join Date: Dec 2005
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks Sturdy! I hade the MS Press book "Build a Program Now" but hadn't read it and so didn't know that the work around had been published. Would have saved a lot of time dissging out the workaround. Perhaps the book contains some other jewels and so will read it.

Jay: we covered the original problem & workaround in the "Master-Detail, Chapter 4 - Not Updating in C#" thread". I have used it in VB and found that the workround (i.e. the blue sidebar)works.

Weeble

Growilng old is compulsory! Growing up is optional!
 
Old April 11th, 2006, 11:56 AM
Registered User
 
Join Date: Apr 2006
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ok?

I just tried what the side-bar suggested, and NO it does not work. All that happens is VB will not build because it cannot find the SQL DB. That effect is worse than the built program not being able to update. My code is verbatim from the book. I made no improvisation on my part.

I stayed away from the C# post because I am not using C#. I don't see how that would have helped me at all. Why complicate matters with C#, when VB is an easier alternative?

Thank you

/J
 
Old April 11th, 2006, 03:41 PM
Registered User
 
Join Date: Apr 2006
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello,

I just re-coded the entire exercise from the beginning, with the same result. The exercise just doesn't work!!! This is the last Wrox book I buy.

/J
 
Old April 12th, 2006, 12:15 PM
Registered User
 
Join Date: Apr 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

It looks to me like the authors actually do mention what the problem is, but you have to really read carefully to see it.

In Chapter 8 ("Debugging Database Applications"), p. 135, they talk about how the database is copied when the application is compiled. BuBut they say that the default copy mode is to copy only if the source is newer than the output directory. But, at least in my copy of VisualStudio(I have the Pro version, not VB Express), the default is "copy always". Since the output directory is where the modified DB is saved when you click the "Save" button, when you recompile, that modified DB is overwritten by the original source copy. So you don't see the changes after you app is recompiled. This is essentially what was said in the other posting that was mentioned.

When I changed the "copy to output directory" option to "copy if newer", the try it out worked. It certainly wasn't clear. There seems to be a lot of problems like this in the book, which makes it pretty hard to run their examples.

One other thing I found. After seeing the other post, and being a little confused when their fix didn't work, I opended windows explorer to see what DB was being changed and when. That's when I saw that the DB in the debug directory was being saved, but then was reverted back to the DB in the source directory (you can see what the source directory is by looking at the "full path" property in the VB property window. Another thing I saw was that the output DB didn't save when I clicked the save button, but instead was saved when I Closed the app.

Chuck Gantz






Similar Threads
Thread Thread Starter Forum Replies Last Post
Range copy Excel crash workaround TrevK Excel VBA 1 March 22nd, 2008 12:30 AM
image/db issue chaosengel PHP How-To 1 July 11th, 2007 02:22 PM
SQL 2000 - TRY/CATCH workaround? seananderson SQL Server 2000 1 February 23rd, 2007 12:17 PM
Gridview Update Issue jpgregg ASP.NET 2.0 Professional 0 September 1st, 2006 07:35 PM
DB issue Hasee VS.NET 2002/2003 0 February 11th, 2004 07:57 AM





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