| Forum List • Thread List • Refresh • New Topic • Search • Previous • Next 1 | 1. porblem with wxDbTable #5050 | Hi,
It's me again .... sigh... been trying to solve tis prob for the past few days...
I use wxDbConnectInf to open a connection to the database. and use wxDb to make an instance of the ODBC connection...
The main pt here is I get into the postgresql database successfully.
I try to create a table by initialising wxDbTable. after typing in the sql statement, I managed to retrieve the number of rows of data... but not the data itself..
upon using the code...
table->Open();
if(table->Open()==false) { wxMessageBox("Open not table", "Table not opened", wxOK | wxICON_EXCLAMATION); }
An error box pop up saying that the table is not open. So wat exactly is the problem??
Is the problem lies on the fact that the columns are not bind corectly?
| 2. Re: porblem with wxDbTable #5051 | My code....... not including initialising the table....
table->Open(); if(table->Open()==false) { wxMessageBox("Open not table", "Table not opened", wxOK | wxICON_EXCLAMATION); }
table->SetFromClause(""); table->Query(); if(table->Query()==false) { wxMessageBox("No query", "No queries", wxOK | wxICON_EXCLAMATION); }
wxString msg;
while (table->GetNext()!=false) { msg.Printf("#%u, #%s",table->GetRowNum(),&orgname); wxMessageBox(msg, "Data", wxOK | wxICON_INFORMATION, NULL);
}
I managed to get the messagebox... Table not opened... but nv get error from query... but i nv manage to print/show out any data...
So my table is not opened... but my query was performed successfully... so is my error due to insufficient privileges or unable to bind columns?
Can anyone helped me? thanks ahz
| Forum List • Thread List • Refresh • New Topic • Search • Previous • Next 1 |
|
|