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

C#

 
GeneralRe: Check if xy point is within a polygon Console App Pin
OriginalGriff12-Nov-18 0:27
mveOriginalGriff12-Nov-18 0:27 
AnswerRe: Check if xy point is within a polygon Console App Pin
OriginalGriff11-Nov-18 23:31
mveOriginalGriff11-Nov-18 23:31 
QuestionWifi and LAN usage Pin
Ashfaque Hussain11-Nov-18 20:08
Ashfaque Hussain11-Nov-18 20:08 
AnswerRe: Wifi and LAN usage Pin
OriginalGriff11-Nov-18 21:17
mveOriginalGriff11-Nov-18 21:17 
GeneralRe: Wifi and LAN usage Pin
Ashfaque Hussain11-Nov-18 23:24
Ashfaque Hussain11-Nov-18 23:24 
GeneralRe: Wifi and LAN usage Pin
OriginalGriff11-Nov-18 23:34
mveOriginalGriff11-Nov-18 23:34 
GeneralRe: Wifi and LAN usage Pin
Ashfaque Hussain12-Nov-18 23:01
Ashfaque Hussain12-Nov-18 23:01 
QuestionData Adapter is failing to load bulk data Pin
venky_CodeProject11-Nov-18 17:11
venky_CodeProject11-Nov-18 17:11 
Hi,

I am working on some migration project where data is exported from Oracle DB to Excel sheets. Extraction tool is different which is able to extract data to Excel around 1 Million also. In extraction tool Oledb Data reader is using which is extracting successfully. Even its extracting more than 1 M data as well in to multiple sheets in the same excel like Sheet1,Sheet2 etc. I need to read the entire excel data and store it in Data table. its working fine for below 6 lac data. But when i am trying to read the data from Excel using OleDb Data Adapter or Data Reader its failing when records exceed 8 Lac and giving error like "System Resources exceeded." My server is free and nothing is running ther and its 64 GB ram as well.

Find the code snap below. 

tried with both Data Adapter and Data reader.


using (var cmd = conn.CreateCommand())
{
                                        cmd.CommandText = "SELECT * FROM [" + sheet + "]";
                                        //var adapter = new OleDbDataAdapter();
                                        //adapter.SelectCommand = cmd;
                                        OleDbDataReader reader = cmd.ExecuteReader();
                                     
                                        if (sheet.Contains(DocSheet))
                                        {
                                            //adapter.Fill(dtDocExcelData);
                                            dtDocExcelData.Load(reader);

                                            LogWriter.LogWrite("No of Files/docs to process for the File : " + inputFilePath + " Sheet Rows Count : " + dtDocExcelData.Rows.Count);
                                        }

                                        else if (sheet.Contains(FileSheet))
                                        {
                                            //adapter.Fill(dtFileExcelData);
                                            dtFileExcelData.Load(reader);

                                            LogWriter.LogWrite("No of Files/docs to process for the File : " + inputFilePath + " Sheet Rows Count : " + dtFileExcelData.Rows.Count);
                                        }

                                        //clearing the resources 
                                        cmd.ResetCommandTimeout();
                                        cmd.Dispose();
                                        reader.Dispose();                                        
                                    }


visual studio is 2013 version and code is in C#. Excel version is also latest as 2016 (.XLSX). 

please check the above code part and let me know where it is failing to load the bulk data from excel. Is there any other way to resolve this.? 

When i googled it, one option is patch update, but client may not be ready for patch update. Provide me any other alternative solutions to over come this. Project is going to live by month end. UAT is phase is failing. please give me alternate solution at earliest.

Awaiting for your valuable suggestions. Thanks in advance.

Regards,
Venkat

AnswerRe: Data Adapter is failing to load bulk data Pin
Dave Kreskowiak11-Nov-18 17:56
mveDave Kreskowiak11-Nov-18 17:56 
GeneralRe: Data Adapter is failing to load bulk data Pin
venky_CodeProject11-Nov-18 19:26
venky_CodeProject11-Nov-18 19:26 
GeneralRe: Data Adapter is failing to load bulk data Pin
Dave Kreskowiak12-Nov-18 13:47
mveDave Kreskowiak12-Nov-18 13:47 
GeneralRe: Data Adapter is failing to load bulk data Pin
venky_CodeProject13-Nov-18 3:49
venky_CodeProject13-Nov-18 3:49 
GeneralRe: Data Adapter is failing to load bulk data Pin
Dave Kreskowiak21-Nov-18 11:15
mveDave Kreskowiak21-Nov-18 11:15 
GeneralRe: Data Adapter is failing to load bulk data Pin
venky_CodeProject22-Nov-18 18:57
venky_CodeProject22-Nov-18 18:57 
QuestionUsing MongoDB in a C# WinForm app with a repository Pin
jkirkerx10-Nov-18 12:43
professionaljkirkerx10-Nov-18 12:43 
QuestionFormatting a number and digits of precision Pin
csharpsucks6-Nov-18 12:19
csharpsucks6-Nov-18 12:19 
AnswerRe: Formatting a number and digits of precision Pin
Mycroft Holmes6-Nov-18 13:28
professionalMycroft Holmes6-Nov-18 13:28 
AnswerRe: Formatting a number and digits of precision Pin
OriginalGriff6-Nov-18 21:01
mveOriginalGriff6-Nov-18 21:01 
GeneralRe: Formatting a number and digits of precision Pin
csharpsucks7-Nov-18 4:32
csharpsucks7-Nov-18 4:32 
GeneralRe: Formatting a number and digits of precision Pin
Richard Deeming7-Nov-18 4:38
mveRichard Deeming7-Nov-18 4:38 
GeneralRe: Formatting a number and digits of precision Pin
OriginalGriff7-Nov-18 4:44
mveOriginalGriff7-Nov-18 4:44 
GeneralRe: Formatting a number and digits of precision Pin
csharpsucks7-Nov-18 6:08
csharpsucks7-Nov-18 6:08 
GeneralRe: Formatting a number and digits of precision Pin
OriginalGriff7-Nov-18 6:28
mveOriginalGriff7-Nov-18 6:28 
GeneralRe: Formatting a number and digits of precision Pin
csharpsucks7-Nov-18 6:44
csharpsucks7-Nov-18 6:44 
QuestionProblem at inserting a DB entry Pin
User 136751145-Nov-18 23:49
User 136751145-Nov-18 23:49 

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.