Click here to Skip to main content
15,886,810 members
Home / Discussions / C#
   

C#

 
GeneralRe: Syste.OutOfMemoryException Pin
DaveyM6911-Mar-09 15:26
professionalDaveyM6911-Mar-09 15:26 
GeneralRe: Syste.OutOfMemoryException Pin
Luc Pattyn11-Mar-09 15:46
sitebuilderLuc Pattyn11-Mar-09 15:46 
GeneralRe: Syste.OutOfMemoryException Pin
DaveyM6911-Mar-09 15:56
professionalDaveyM6911-Mar-09 15:56 
GeneralRe: Syste.OutOfMemoryException Pin
Luc Pattyn11-Mar-09 16:06
sitebuilderLuc Pattyn11-Mar-09 16:06 
GeneralRe: Syste.OutOfMemoryException Pin
DaveyM6911-Mar-09 23:03
professionalDaveyM6911-Mar-09 23:03 
GeneralRe: Syste.OutOfMemoryException Pin
Member 461797111-Mar-09 15:06
Member 461797111-Mar-09 15:06 
GeneralRe: Syste.OutOfMemoryException Pin
Luc Pattyn11-Mar-09 15:13
sitebuilderLuc Pattyn11-Mar-09 15:13 
GeneralRe: Syste.OutOfMemoryException Pin
Member 461797111-Mar-09 15:16
Member 461797111-Mar-09 15:16 
int i = 0,duration, year;
                string artist, title, album, bandname, genre, path;
                string delSql = "DELETE * FROM Library";
                musLibConn.ConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program Files\GeneSys\Library.mdb";
                OleDbCommand deleteLib = new OleDbCommand(delSql, musLibConn);
                musLibConn.Open(); 
                if (tbMusPath.Text != "")
                {
                    utility util = new utility();
                    filepaths = Directory.GetFiles(util.getLibPath(), "*.mp3", SearchOption.AllDirectories);
                    deleteLib.ExecuteNonQuery();
                    pBar.Visible = true;

                    foreach(string str in filepaths)
                    {
                        //pBar.Value = i % 100;
                        //path = filepaths[i].ToString();
                        //duration = Convert.ToInt32(CurrSong.ID3v2Info.GetTextFrame("TLEN"));
                        lblPath.Text = str;

                        ID3Info CurrSong = new ID3Info(filepaths[i], true);
                        artist = CurrSong.ID3v2Info.GetTextFrame("TPE1");
                        title = CurrSong.ID3v2Info.GetTextFrame("TIT2");
                        album = CurrSong.ID3v2Info.GetTextFrame("TALB");
                        
                        string insSql = "INSERT INTO Library(Artist,Title,Album,Path)" +
                                        "VALUES('" + artist.Replace("'", "''") + "','" + title.Replace("'", "''") + "','" +
                                        album.Replace("'", "''") + "','" + str.Replace("'", "''") + "')"; 
                        using (OleDbCommand insertLib = new OleDbCommand(insSql, musLibConn))
                        {                           
                            insertLib.ExecuteNonQuery();
                        }
                        i++;
                    }
                    
                    pBar.Visible = false;
                    lblNum.Text = Convert.ToString(filepaths.Length);
                    util.setNoFiles(filepaths.Length);

GeneralRe: Syste.OutOfMemoryException [modified] Pin
Luc Pattyn11-Mar-09 15:49
sitebuilderLuc Pattyn11-Mar-09 15:49 
GeneralRe: Syste.OutOfMemoryException Pin
Member 461797111-Mar-09 16:53
Member 461797111-Mar-09 16:53 
GeneralRe: Syste.OutOfMemoryException Pin
Luc Pattyn11-Mar-09 16:10
sitebuilderLuc Pattyn11-Mar-09 16:10 
GeneralRe: Syste.OutOfMemoryException Pin
Member 461797111-Mar-09 16:55
Member 461797111-Mar-09 16:55 
GeneralRe: Syste.OutOfMemoryException Pin
Luc Pattyn11-Mar-09 17:13
sitebuilderLuc Pattyn11-Mar-09 17:13 
GeneralRe: Syste.OutOfMemoryException Pin
Member 461797111-Mar-09 17:48
Member 461797111-Mar-09 17:48 
AnswerRe: Syste.OutOfMemoryException Pin
Ennis Ray Lynch, Jr.11-Mar-09 19:46
Ennis Ray Lynch, Jr.11-Mar-09 19:46 
QuestionSetting Form2's start position as Form1's last position Pin
Paulo Toureiro11-Mar-09 13:05
Paulo Toureiro11-Mar-09 13:05 
AnswerRe: Setting Form2's start position as Form1's last position Pin
DaveyM6911-Mar-09 13:21
professionalDaveyM6911-Mar-09 13:21 
GeneralRe: Setting Form2's start position as Form1's last position Pin
Paulo Toureiro11-Mar-09 13:40
Paulo Toureiro11-Mar-09 13:40 
GeneralRe: Setting Form2's start position as Form1's last position Pin
Expert Coming11-Mar-09 14:16
Expert Coming11-Mar-09 14:16 
GeneralRe: Setting Form2's start position as Form1's last position Pin
Paulo Toureiro11-Mar-09 14:21
Paulo Toureiro11-Mar-09 14:21 
GeneralRe: Setting Form2's start position as Form1's last position Pin
DaveyM6911-Mar-09 14:31
professionalDaveyM6911-Mar-09 14:31 
GeneralRe: Setting Form2's start position as Form1's last position Pin
Paulo Toureiro11-Mar-09 14:40
Paulo Toureiro11-Mar-09 14:40 
GeneralRe: Setting Form2's start position as Form1's last position Pin
DaveyM6911-Mar-09 14:49
professionalDaveyM6911-Mar-09 14:49 
QuestionUsing Generic Method to Determine if All Elements in an Array is Zero Pin
mfcuser11-Mar-09 12:17
mfcuser11-Mar-09 12:17 
AnswerRe: Using Generic Method to Determine if All Elements in an Array is Zero Pin
Christian Graus11-Mar-09 12:27
protectorChristian Graus11-Mar-09 12:27 

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.