Click here to Skip to main content
15,897,226 members
Home / Discussions / C#
   

C#

 
GeneralRe: string declare Pin
michaelgr15-Jun-09 0:45
michaelgr15-Jun-09 0:45 
GeneralRe: string declare Pin
Manas Bhardwaj5-Jun-09 0:49
professionalManas Bhardwaj5-Jun-09 0:49 
GeneralRe: string declare Pin
Henry Minute5-Jun-09 4:54
Henry Minute5-Jun-09 4:54 
GeneralRe: string declare Pin
molesworth5-Jun-09 0:48
molesworth5-Jun-09 0:48 
AnswerRe: string declare Pin
I Believe In GOD5-Jun-09 0:59
I Believe In GOD5-Jun-09 0:59 
GeneralRe: string declare Pin
DaveyM695-Jun-09 1:20
professionalDaveyM695-Jun-09 1:20 
GeneralRe: string declare Pin
I Believe In GOD5-Jun-09 1:34
I Believe In GOD5-Jun-09 1:34 
QuestionHow to make a network connection at this case? Pin
Majid_grok5-Jun-09 0:04
Majid_grok5-Jun-09 0:04 
AnswerRe: How to make a network connection at this case? Pin
stancrm5-Jun-09 0:37
stancrm5-Jun-09 0:37 
GeneralRe: How to make a network connection at this case? Pin
Majid_grok5-Jun-09 1:36
Majid_grok5-Jun-09 1:36 
GeneralRe: How to make a network connection at this case? Pin
stancrm5-Jun-09 1:39
stancrm5-Jun-09 1:39 
QuestionCan we use pointers or similar in C# ? Pin
Otex4-Jun-09 23:53
Otex4-Jun-09 23:53 
AnswerRe: Can we use pointers or similar in C# ? Pin
0x3c05-Jun-09 0:01
0x3c05-Jun-09 0:01 
GeneralRe: Can we use pointers or similar in C# ? Pin
Otex5-Jun-09 0:15
Otex5-Jun-09 0:15 
GeneralRe: Can we use pointers or similar in C# ? Pin
0x3c05-Jun-09 0:21
0x3c05-Jun-09 0:21 
AnswerRe: Can we use pointers or similar in C# ? Pin
Christian Graus5-Jun-09 0:12
protectorChristian Graus5-Jun-09 0:12 
QuestionOutlook 2003 VSTO Addin deployment on Windows Vista - Registry and other issues - How to Pin
Chaitanya Joshi4-Jun-09 23:28
Chaitanya Joshi4-Jun-09 23:28 
AnswerRe: Outlook 2003 VSTO Addin deployment on Windows Vista - Registry and other issues - How to Pin
led mike5-Jun-09 4:37
led mike5-Jun-09 4:37 
GeneralRe: Outlook 2003 VSTO Addin deployment on Windows Vista - Registry and other issues - How to Pin
Chaitanya Joshi7-Jun-09 23:26
Chaitanya Joshi7-Jun-09 23:26 
GeneralRe: Outlook 2003 VSTO Addin deployment on Windows Vista - Registry and other issues - How to Pin
led mike8-Jun-09 5:37
led mike8-Jun-09 5:37 
QuestionBatch Insert Problem with SqlBulkCopy. Pin
hdv2124-Jun-09 22:33
hdv2124-Jun-09 22:33 
Hi i have access db as client db and sql server db as web db. all structures of two database is same except PKs, in sql server PK is uniqueidentifier and in access, PK is Text (with 255 max Length).

in client app i want to send some data from client to web(access to sql) via SqlBulkCopy class, to do this, i use this code to transfer data :

this.personsTableAdapter1.Fill(this.testDataSet1.Persons);

            DataTable dtImported = this.testDataSet1.Persons.Clone();

            // because PK dataType in sql server is uniqueidentifier, hence i convert PK column to guid
            dtImported.Columns["PersonID"].DataType = typeof(Guid);
            foreach (TestDataSet.PersonsRow row in this.testDataSet1.Persons.Rows)
            {                
                Guid g = new Guid(row.PersonID);                
                dtImported.Rows.Add(new object[] { g, row.PersonName }); // Error occur
            }

            System.Data.SqlClient.SqlBulkCopy bc = new System.Data.SqlClient.SqlBulkCopy(Properties.Settings.Default.TestSqlConnectionString);
            bc.DestinationTableName = "Persons";
            bc.WriteToServer(dtImported);


but at runTime the following error show me in above line of code:

Cannot set column 'PersonID'. The value violates the MaxLength limit of this column.


where does my problem and how to solve it ?
Thanks
AnswerRe: Batch Insert Problem with SqlBulkCopy. Pin
Manas Bhardwaj4-Jun-09 22:41
professionalManas Bhardwaj4-Jun-09 22:41 
GeneralRe: Batch Insert Problem with SqlBulkCopy. Pin
hdv2124-Jun-09 23:45
hdv2124-Jun-09 23:45 
GeneralRe: Batch Insert Problem with SqlBulkCopy. Pin
Manas Bhardwaj4-Jun-09 23:49
professionalManas Bhardwaj4-Jun-09 23:49 
GeneralRe: Batch Insert Problem with SqlBulkCopy. Pin
hdv2125-Jun-09 0:41
hdv2125-Jun-09 0:41 

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.