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

C#

 
QuestionRemoting problems with ArrayList return Pin
drinkingbird21-Sep-06 15:25
drinkingbird21-Sep-06 15:25 
AnswerRe: Remoting problems with ArrayList return Pin
Dave Kreskowiak21-Sep-06 15:58
mveDave Kreskowiak21-Sep-06 15:58 
GeneralRe: Remoting problems with ArrayList return Pin
drinkingbird21-Sep-06 16:14
drinkingbird21-Sep-06 16:14 
QuestionProblem connecting to an Access database Pin
TheBlindWatchmaker21-Sep-06 13:17
TheBlindWatchmaker21-Sep-06 13:17 
AnswerRe: Problem connecting to an Access database Pin
Guffa21-Sep-06 20:53
Guffa21-Sep-06 20:53 
GeneralRe: Problem connecting to an Access database Pin
TheBlindWatchmaker22-Sep-06 5:15
TheBlindWatchmaker22-Sep-06 5:15 
GeneralRe: Problem connecting to an Access database Pin
Guffa22-Sep-06 7:29
Guffa22-Sep-06 7:29 
GeneralRe: Problem connecting to an Access database Pin
TheBlindWatchmaker22-Sep-06 7:53
TheBlindWatchmaker22-Sep-06 7:53 
Damnit! I'm really inept today! Apologies, apologies!

This might be it! Smile | :)

<br />
 public string[] Makes<br />
        {<br />
            get<br />
            {<br />
                OleDbDataReader dbr = null;<br />
                ArrayList Makes = new ArrayList();<br />
<br />
                OleDbCommand cmd = new OleDbCommand(string.Format("SELECT * FROM {0};", "Speakers"), m_dbConn);<br />
                dbr = cmd.ExecuteReader();<br />
<br />
                // Read each record one at a time ...<br />
                while (dbr.Read())<br />
                {<br />
                    // Load our arrays with the Field names<br />
                    // and values.  NOTE: Reloading the field<br />
                    // names over and over again is probably<br />
                    // redundant, but I'm not sure that the order<br />
                    // column names are returned is fixed.<br />
                    for (int it = 0; it < dbr.FieldCount; it++)<br />
                    {<br />
                        string strField = dbr.GetName(it);<br />
                        if (strField == "MAKE")<br />
                        {<br />
                            string make = (string)dbr.GetValue(it);<br />
                            bool found = false;<br />
                            foreach (object o in Makes)<br />
                            {<br />
                                if ((string)o == make)<br />
                                {<br />
                                    found = true;<br />
                                    break;<br />
                                }<br />
                            }<br />
                            if (found)<br />
                                Makes.Add(make);<br />
                            break;<br />
                        }<br />
<br />
                    }<br />
<br />
                }<br />
                string[] strMakes = new string[Makes.Count];<br />
                int i= 0;<br />
                foreach (object o in Makes)<br />
                {<br />
                    strMakes[i++] = (string)o;<br />
                }<br />
                return strMakes;<br />
            }<br />
        }<br />

GeneralRe: Problem connecting to an Access database Pin
Guffa22-Sep-06 9:39
Guffa22-Sep-06 9:39 
GeneralRe: Problem connecting to an Access database Pin
TheBlindWatchmaker22-Sep-06 9:53
TheBlindWatchmaker22-Sep-06 9:53 
AnswerRe: Problem connecting to an Access database Pin
Guffa22-Sep-06 10:37
Guffa22-Sep-06 10:37 
QuestionPathTooLongException, Work around? [modified] Pin
James_12321-Sep-06 12:34
James_12321-Sep-06 12:34 
QuestionVS2005: Unsafe mode in web service? Pin
Goalie3521-Sep-06 11:24
Goalie3521-Sep-06 11:24 
QuestionString with escaped squences... Pin
e-laj21-Sep-06 11:22
e-laj21-Sep-06 11:22 
AnswerRe: String with escaped squences... Pin
Alaric_21-Sep-06 11:41
professionalAlaric_21-Sep-06 11:41 
AnswerRe: String with escaped squences... Pin
Christian Graus21-Sep-06 11:45
protectorChristian Graus21-Sep-06 11:45 
AnswerRe: String with escaped squences... Pin
Alaric_21-Sep-06 11:49
professionalAlaric_21-Sep-06 11:49 
AnswerRe: String with escaped squences... Pin
AndriyZZ21-Sep-06 12:15
AndriyZZ21-Sep-06 12:15 
AnswerMore Details: String with escaped sequences... Pin
e-laj21-Sep-06 13:03
e-laj21-Sep-06 13:03 
GeneralRe: More Details: String with escaped sequences... Pin
Christian Graus21-Sep-06 15:27
protectorChristian Graus21-Sep-06 15:27 
GeneralRe: More Details: String with escaped sequences... Pin
e-laj21-Sep-06 16:33
e-laj21-Sep-06 16:33 
AnswerOK: Here is a method to handle that... Pin
e-laj21-Sep-06 17:53
e-laj21-Sep-06 17:53 
AnswerRe: String with escaped squences... Pin
Rob Graham21-Sep-06 17:54
Rob Graham21-Sep-06 17:54 
GeneralRe: Finally found the method Pin
e-laj21-Sep-06 19:02
e-laj21-Sep-06 19:02 
Questionbinding a listbox Pin
heze21-Sep-06 11:18
heze21-Sep-06 11:18 

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.