Wrox Programmer Forums
|
BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0
This is the forum to discuss the Wrox book ASP.NET 2.0 Website Programming: Problem - Design - Solution by Marco Bellinaso; ISBN: 9780764584640
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 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 June 27th, 2006, 12:14 AM
Authorized User
 
Join Date: Jun 2006
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I didn't notice the lost of records. And it's caused the the cascading/update. I'll take a look at that

But the one that's been bugging me is the different in idenity.
Probably I have to disable the constrain on BOTH my local tables and the remotes tables.


Thank you for your time


 
Old June 27th, 2006, 02:46 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 917
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The records were only lost if you used SQL to correct the bad identities. If you left the bad values alone then all the records would still be there, but they'd be useless :-)

I wrote a program that will correctly insert the records into a destination database. The destination DB must exist and must have all the tables (Marco's create script in the app_data folder will set up the tables). Also, the tables must be empty first, so use Marco's script to empty them if needed.

Of course, you have to be in the "dbo" role on the target DB. But you don't need administrative rights to the target server (most of us use shared hosting sites and this works fine for them).

Create a new C# 2005 Console application and paste in the code from here:
http://www.ericengler.com/downloads/...bleData.cs.txt

Edit the connection strings as needed. You will likely have to attach Marco's DB files to your local SQL Express (or full SQL) if you haven't done that yet. Only ASP.NET 2.0 can use the app_data folder automatically - not console programs. See the readme.txt that came with the code download for instructions. Although the readme didn't specifically say this works with SQL Express also, you can take my word for it that it does.

I only tested this once, so let me know if you find problems! Life in the fast lane - it's more exciting that way!

Eric





Similar Threads
Thread Thread Starter Forum Replies Last Post
how to import excel data into sql server khaink ASP.NET 1.0 and 1.1 Basics 1 July 31st, 2007 09:10 PM
Import Data In MS SQL SERVER 2000 The Beginner Classic ASP Basics 1 August 14th, 2006 04:59 PM
how to import data from excel,csv into sql server therisingsun ASP.NET 1.0 and 1.1 Basics 2 October 1st, 2005 12:17 AM
Import data in SQL Cinderella Classic ASP Basics 7 July 28th, 2004 05:06 PM





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