RE: Problems with the SQL Server Database Project when truncating

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi guys,

Thanks very much for your help in this matter. That explains it all nicely.

I think we're going to go with always recreating the data for new systems
(where we don't care about the data as there are no previous releases of the
database), and write custom scripts (like you can generate automatically
using Enterprise Manager and SQL Server Management Studio) for existing
systems.

Thanks again!

Steve.

""Hongye Sun [MSFT]"" wrote:

Hi Steve,

Thanks for your post.

Visual Studio reports this error because in some situations people do not
want that the database change will cause loss of data. However, it can be
customizable. It depends on what you need.

If you do care loss of data, you'd better leave the error there and force
the person to first correct the data in database then check in the change.

If you do not care about loss of data, please do the actions below:

1. Suppress Warnings
By following the document at
http://msdn.microsoft.com/en-us/library/aa980442.aspx, here are the steps:
Project -> Properties -> Build tab -> In Suppress Warnings, type the list
of warning numbers that you want to suppress, and delimit them with commas
or semi-colons.

A suppressed warning is ignored and will not cause the build to fail, even
if you have chosen to treat warnings as errors.
This is the most elegant way to do this job. However, when testing in our
lab, we found that Visual Studio is not working correctly to exclude the
suppressed warning list. My test versiion is VSTS 2008 SP1. However, after
I upgrade database edition to Visual Studio Team System 2008 Database
Edition GDR, it works perfectly. Here is the download link:
http://www.microsoft.com/downloads/details.aspx?FamilyID=bb3ad767-5f69-4db9-
b1c9-8f55759846ed&displaylang=en

2. Uncheck "Treat warnings as error"
Project -> Properties -> Build tab -> Uncheck "Treat warnings as error"
option

Uncheck this option can definitely solve this issue, but it has a side
effect that all the warnings are not treated as errors.

3. Check "Always re-create database"
Project -> Properties -> Build tab -> Check "Always re-create database"
option

This option will delete all your data and re-create the whole database. So
all the data will be loss. The error will disappeared.
This option is only available in the version before Visual Studio Team
System 2008 Database Edition GDR.

Please let me know the information helpful to you. Thanks.

Regards,
Hongye Sun (hongyes@xxxxxxxxxxxxxxxxxxxx, remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@xxxxxxxxxxxxxx

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

Note: MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within?2 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions. Issues of this
nature are best handled working with a dedicated Microsoft Support Engineer
by contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/en-us/subscriptions/aa948874.aspx
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.







.



Relevant Pages

  • RE: SQL Express attaching doesnt work
    ... I understand that you encountered the database connection error in your ... Visual Studio but cannot attach a mdf file.", ... Server Management Studio, instead it was a connection error only happened ... Microsoft Online Community Support ...
    (microsoft.public.sqlserver.setup)
  • RE: Problems with the SQL Server Database Project when truncating fiel
    ... If you do care loss of data, you'd better leave the error there and force ... the person to first correct the data in database then check in the change. ... if you have chosen to treat warnings as errors. ... Microsoft Online Community Support ...
    (microsoft.public.vsnet.enterprise.tools)
  • Re: Server Explorer & Databases
    ... I got it working, but like verything else from Oracle, it's a pain to get ... I think it also uses the latest Oracle database provider ... Microsoft MSDN Online Support Lead ... lifecycle so that visual studio can choose the best provider. ...
    (microsoft.public.vsnet.ide)
  • Re: What so special about PostgreSQL and other RDBMS?
    ... That's exactly the link the licence agreement for the database points to when it ... comes to what wecan expect for paying support. ... > "Oracle may provide additional releases or versions of its programs ... If the requirements are volatile I'd do a long term contract detailing what ...
    (comp.lang.php)
  • Re: What so special about PostgreSQL and other RDBMS?
    ... > the porting to another database won't be significantly eased. ... not terribly significant and the abstraction can be kept very light ... >> If they where a credible provider of support and development for this ... >> services, exactly like Oracle does, but without trapping you into a ...
    (comp.lang.php)