Click here to Skip to main content
15,892,839 members
Home / Discussions / C#
   

C#

 
AnswerRe: Interview Pin
Septimus Hedgehog9-May-12 3:20
Septimus Hedgehog9-May-12 3:20 
AnswerRe: Interview Pin
Sandeep Mewara9-May-12 7:25
mveSandeep Mewara9-May-12 7:25 
QuestionCouldn't able to receive large file from webservice Pin
NarVish8-May-12 21:05
NarVish8-May-12 21:05 
AnswerRe: Couldn't able to receive large file from webservice Pin
Richard MacCutchan8-May-12 21:58
mveRichard MacCutchan8-May-12 21:58 
GeneralRe: Couldn't able to receive large file from webservice Pin
OriginalGriff8-May-12 22:13
mveOriginalGriff8-May-12 22:13 
AnswerRe: Couldn't able to receive large file from webservice Pin
Abhinav S8-May-12 22:11
Abhinav S8-May-12 22:11 
GeneralRe: Couldn't able to receive large file from webservice Pin
NarVish8-May-12 22:28
NarVish8-May-12 22:28 
GeneralRe: Couldn't able to receive large file from webservice Pin
Richard MacCutchan8-May-12 22:44
mveRichard MacCutchan8-May-12 22:44 
GeneralRe: Couldn't able to receive large file from webservice Pin
NarVish8-May-12 22:56
NarVish8-May-12 22:56 
GeneralRe: Couldn't able to receive large file from webservice Pin
Richard MacCutchan8-May-12 23:09
mveRichard MacCutchan8-May-12 23:09 
GeneralRe: Couldn't able to receive large file from webservice Pin
NarVish8-May-12 23:16
NarVish8-May-12 23:16 
GeneralRe: Couldn't able to receive large file from webservice Pin
Pete O'Hanlon8-May-12 23:26
mvePete O'Hanlon8-May-12 23:26 
GeneralRe: Couldn't able to receive large file from webservice Pin
NarVish9-May-12 0:06
NarVish9-May-12 0:06 
AnswerRe: Couldn't able to receive large file from webservice Pin
Keith Barrow8-May-12 23:47
professionalKeith Barrow8-May-12 23:47 
AnswerRe: Couldn't able to receive large file from webservice Pin
Pete O'Hanlon9-May-12 0:07
mvePete O'Hanlon9-May-12 0:07 
QuestionHow do Merge cell in excel of xml? Pin
Apocalypse Now8-May-12 21:03
Apocalypse Now8-May-12 21:03 
AnswerRe: How do Merge cell in excel of xml? Pin
Richard MacCutchan8-May-12 21:57
mveRichard MacCutchan8-May-12 21:57 
GeneralRe: How do Merge cell in excel of xml? Pin
Apocalypse Now8-May-12 22:20
Apocalypse Now8-May-12 22:20 
SuggestionWhat are the references for the code bellow [Solved] Pin
jojoba20118-May-12 19:41
jojoba20118-May-12 19:41 
Hi,
I dont know the references for this code . please some one copy the code to VS2008 and check for the reference.
Thanks!
C#
using System; 
using System.Collections.Generic; 
using System.Linq; 
using System.Text; 
using Microsoft.SqlServer.Management.Smo; 
using System.Diagnostics; 
using System.Collections.Specialized; 

namespace Transfer2008To2005 
{ 
    class Program 
    { 
        static void Main(string[] args) 
        { 

            string sourceserver = "SourceServerName"; 
            string destinationserver = "DestinationServerName"; 

            Server src = new Server(sourceserver); 
            Server dest = new Server(destinationserver); 

            string[] myarray = new string[] { "databasename", "otherdbname" }; 

            foreach (Database db in src.Databases) 
            { 
                if (db.IsSystemObject == false && db.Status == DatabaseStatus.Normal) 
                { 
                    Debug.WriteLine("Now moving " + db.Name); 

                    if (dest.Databases.Contains(db.Name)) 
                        dest.KillDatabase(db.Name); 

                    Transfer t = new Transfer(db); 

                    t.DestinationServer = destinationserver; 
                    t.DestinationDatabase = db.Name; 
                    t.CreateTargetDatabase = true; 
                    t.PreserveDbo = true; 
                    t.TargetDatabaseFilePath = "D:\\SQLDATA\\"; 
                    t.TargetLogFilePath = "F:\\SQLLOGS\\"; 

                    t.CopyAllDefaults = true; 
                    t.CopyAllFullTextCatalogs = true; 
                    t.CopyAllRoles = true; 
                    t.CopyAllRules = true; 
                    t.CopyAllSchemas = true; 
                    t.CopyAllStoredProcedures = true; 
                    t.CopyAllSynonyms = true; 
                    t.CopyAllTables = true; 
                    t.CopyAllUserDefinedDataTypes = true; 
                    t.CopyAllUserDefinedFunctions = true; 
                    t.CopyAllUserDefinedTypes = true; 
                    t.CopyAllUsers = true; 
                    t.CopyData = true; 
                    t.CopySchema = true; 

                    t.CopyAllObjects = false; 
                    t.DropDestinationObjectsFirst = true; 

                    t.Options.WithDependencies = true; 
                    t.Options.IncludeDatabaseRoleMemberships = true; 
                    t.Options.Indexes = true; 
                    t.Options.DriAll = true; 
                    t.Options.Permissions = true; 
                    t.Options.SchemaQualify = true; 
                    t.Options.SchemaQualifyForeignKeysReferences = true; 
                    t.Options.Statistics = true; 
                    t.Options.TargetServerVersion = SqlServerVersion.Version90; 
                    t.Options.WithDependencies = true; 
                    t.Options.IncludeIfNotExists = true; 
                    t.Options.FullTextIndexes = true; 
                    t.Options.ExtendedProperties = true; 

                    t.TransferData(); 

                    t = new Transfer(db); 

                    t.DestinationServer = destinationserver; 
                    t.DestinationDatabase = db.Name; 
                    t.DestinationLogin = "schemalogin"; 
                    t.DestinationPassword = "schemapassword"; 
                    t.DestinationLoginSecure = false; 

                    t.CopyAllViews = true; 
                    t.CopyAllTables = true; 
                    t.CopyAllObjects = false; 
                    t.CopyAllDatabaseTriggers = true; 
                    t.Options.Triggers = true; 
                    t.CopyData = false; 
                    t.CopySchema = true; 
                    t.Options.IncludeIfNotExists = true; 

                    t.TransferData(); 
                } 
            } 
        } 
    } 
} 

AnswerRe: What are the references for the code bellow Pin
Richard MacCutchan8-May-12 22:00
mveRichard MacCutchan8-May-12 22:00 
AnswerRe: What are the references for the code bellow Pin
Eddy Vluggen9-May-12 0:08
professionalEddy Vluggen9-May-12 0:08 
AnswerRe: What are the references for the code bellow Pin
Dain Ucak9-May-12 4:16
Dain Ucak9-May-12 4:16 
GeneralRe: What are the references for the code bellow Pin
jojoba20119-May-12 17:43
jojoba20119-May-12 17:43 
QuestionUser Settings Not Persisting Pin
Kevin Marois8-May-12 10:53
professionalKevin Marois8-May-12 10:53 
AnswerRe: User Settings Not Persisting Pin
SledgeHammer018-May-12 13:03
SledgeHammer018-May-12 13:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.