Click here to Skip to main content
15,920,438 members
Home / Discussions / Database
   

Database

 
AnswerRe: How to declare First Record of file? Pin
sreejith ss nair8-Oct-04 5:46
sreejith ss nair8-Oct-04 5:46 
GeneralRe: How to declare First Record of file? Pin
DotNet8-Oct-04 5:52
DotNet8-Oct-04 5:52 
GeneralRe: How to declare First Record of file? Pin
Colin Angus Mackay8-Oct-04 9:35
Colin Angus Mackay8-Oct-04 9:35 
AnswerRe: How to declare First Record of file? Pin
rajla10-Oct-04 21:02
sussrajla10-Oct-04 21:02 
GeneralRe: How to declare First Record of file? Pin
DotNet10-Oct-04 21:48
DotNet10-Oct-04 21:48 
Generalhandling errors from accessing SQL Database Pin
bekunkun7-Oct-04 23:14
bekunkun7-Oct-04 23:14 
GeneralRe: handling errors from accessing SQL Database Pin
Colin Angus Mackay8-Oct-04 1:17
Colin Angus Mackay8-Oct-04 1:17 
GeneralInvalidOperationException ADO . NET Pin
wilsonian7-Oct-04 14:06
wilsonian7-Oct-04 14:06 
Hi, I'm using ADO .NET but sometimes I get an InvalidOperationException:

ExecuteReader requires an open and available Connection. The connection's current state is Open, Executing.

The class where I'm doing the db stuff has the following in it:
<br />
MyDB::MyDB() {<br />
     String* connection = String::Concat(S"Provider=Microsoft.Jet.OLEDB.4.0; Data Source=",<br />
          getPath(), S"\\MyDB.mdb;");<br />
     m_pDB = new OleDbConnection(connection);<br />
     m_pDB->Open();<br />
}<br />
<br />
void MyDB::Query(String* query){<br />
<br />
try {<br />
    m_pTable = NULL;<br />
    m_pDA = new OleDbDataAdapter(query, m_pDB);<br />
    m_pDataSet = new DataSet(" Database");<br />
<br />
    m_pDA->Fill(m_pDataSet, "Results");<br />
    m_pTable = m_pDataSet->get_Tables()->get_Item("Results");<br />
    } catch (Exception* e) {<br />
        // just using this to find when I've got problems, not to solve them at run time<br />
        a =  e->GetType()->ToString();<br />
        b =  e->Message;<br />
        c=   e->StackTrace;<br />
    }<br />
}<br />
<br />
}<br />

There more, but I think the problem's in there. I'd guess I'm running into problems with different threads using the database concurrently? What should I be doing differently?

Thank you, let me know if you need more information.
GeneralTwo Tables and Datalist problem Pin
David Fawn7-Oct-04 8:18
David Fawn7-Oct-04 8:18 
GeneralRe: Two Tables and Datalist problem Pin
Colin Angus Mackay7-Oct-04 11:11
Colin Angus Mackay7-Oct-04 11:11 
GeneralRe: Two Tables and Datalist problem Pin
David Fawn8-Oct-04 4:15
David Fawn8-Oct-04 4:15 
GeneralOutput vs select Pin
Not Active7-Oct-04 7:37
mentorNot Active7-Oct-04 7:37 
GeneralRe: Output vs select Pin
Kurt _B7-Oct-04 13:00
Kurt _B7-Oct-04 13:00 
GeneralRe: Output vs select Pin
Steven Campbell8-Oct-04 7:11
Steven Campbell8-Oct-04 7:11 
GeneralRe: Output vs select Pin
Grimolfr12-Oct-04 4:43
Grimolfr12-Oct-04 4:43 
GeneralRe: Output vs select Pin
Not Active12-Oct-04 6:09
mentorNot Active12-Oct-04 6:09 
GeneralRe: Output vs select Pin
Grimolfr12-Oct-04 7:59
Grimolfr12-Oct-04 7:59 
GeneralRe: Output vs select Pin
Not Active12-Oct-04 9:54
mentorNot Active12-Oct-04 9:54 
QuestionCan I bind more than 1 field in a HyperlinkColumn? Pin
DotNet7-Oct-04 7:14
DotNet7-Oct-04 7:14 
AnswerRe: Can I bind more than 1 field in a HyperlinkColumn? Pin
Not Active7-Oct-04 7:32
mentorNot Active7-Oct-04 7:32 
GeneralRe: Can I bind more than 1 field in a HyperlinkColumn? Pin
Michael Winburn7-Oct-04 7:40
Michael Winburn7-Oct-04 7:40 
QuestionOQL: Where to get started? Pin
sefaen6-Oct-04 19:50
sefaen6-Oct-04 19:50 
AnswerRe: OQL: Where to get started? Pin
sreejith ss nair7-Oct-04 1:15
sreejith ss nair7-Oct-04 1:15 
GeneraldataAdapter update problem Pin
PJ-Intellia6-Oct-04 3:32
PJ-Intellia6-Oct-04 3:32 
GeneralRe: dataAdapter update problem Pin
sreejith ss nair7-Oct-04 1:20
sreejith ss nair7-Oct-04 1:20 

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.