Click here to Skip to main content
15,886,362 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Video Card Memory [modified] Pin
Hamid_RT31-May-06 18:44
Hamid_RT31-May-06 18:44 
Questionstack overflow -- in a thread? Pin
Peter Weyzen31-May-06 15:31
Peter Weyzen31-May-06 15:31 
AnswerRe: stack overflow -- in a thread? Pin
John M. Drescher31-May-06 16:04
John M. Drescher31-May-06 16:04 
QuestionRe: stack overflow -- in a thread? Pin
Peter Weyzen31-May-06 18:47
Peter Weyzen31-May-06 18:47 
AnswerRe: stack overflow -- in a thread? Pin
Sarath C31-May-06 20:01
Sarath C31-May-06 20:01 
QuestionHELP! Copy Access data to Excel Error Pin
Jenleonard31-May-06 14:15
Jenleonard31-May-06 14:15 
QuestionRe: HELP! Copy Access data to Excel Error Pin
David Crow1-Jun-06 4:25
David Crow1-Jun-06 4:25 
QuestionMultithreading with databases Pin
sergiuem31-May-06 14:02
sergiuem31-May-06 14:02 
I have to write a clinet/server application with sockets and the client use CODBC classes to conect to a local .mdb file and i don't know what to choose for server implementation .
I have tried CDAO clases but DAO doesn't suport multithreading
Please can anyone tell me what I have to use so i can connect to a db engine o server application and be able to use multithreading?
Eg the server thread
UINT ServerThread (LPVOID pParam)
{
threadstruct* ts = (threadstruct*)pParam;

char buffer[BUFFERSIZE];
int size = BUFFERSIZE;
int blabla=0;
cout << "a new client";
while(1)
{

int sz = ts->pSock->Recv(buffer,size,ts->indice);
if(sz == 0)
{
ts->pSock->ServerClose(ts->indice);
delete ts;
return 0;
}
if (sz>3)
{
CMyMessage msg(buffer);

switch(msg.GetMyMsgType())
{

case 0:
cout << endl;
cout << msg.GetMyMsgComm() << " -> " << msg.GetMyMsgText() << endl;
if (!strcmp(msg.GetMyMsgComm(),".SD4P"))
{
CString strComm;
strComm.Format(".SD4P");
CString strText;
strText.Format("return .SD4P");
CMyMessage msg(strText.GetBuffer(strText.GetLength()),strText.GetLength(),strComm.GetBuffer(strComm.GetLength()),strComm.GetLength(),0);
char buffer1[253];
int size1;
msg.GetMyMsg(buffer1,&size1);
ts->pSock->Send(buffer1,size1,ts->indice);

// here i have to implement a db connection to extract some fields and to send the obtained data to client. CArticolSet is a CDAO inheritance and does not work
/*WaitForSingleObject(hMutex1, INFINITE);
CArticolSet* artset = new CArticolSet();
artset->GetDefaultDBName();
artset->GetDefaultSQL();
artset->Open();
artset->Close();
ReleaseMutex(hMutex1);
delete artset;
*/
}
AnswerRe: Multithreading with databases Pin
Peter Weyzen31-May-06 15:31
Peter Weyzen31-May-06 15:31 
AnswerRe: Multithreading with databases [modified] Pin
John M. Drescher31-May-06 16:07
John M. Drescher31-May-06 16:07 
QuestionRe: Multithreading with databases Pin
David Crow1-Jun-06 4:26
David Crow1-Jun-06 4:26 
QuestionReplace a part of text from text file Pin
Immunity1831-May-06 14:01
Immunity1831-May-06 14:01 
AnswerRe: Replace a part of text from text file Pin
_anil_31-May-06 14:27
_anil_31-May-06 14:27 
GeneralRe: Replace a part of text from text file Pin
Immunity1831-May-06 14:46
Immunity1831-May-06 14:46 
GeneralRe: Replace a part of text from text file Pin
_anil_31-May-06 15:00
_anil_31-May-06 15:00 
GeneralRe: Replace a part of text from text file Pin
Immunity1831-May-06 15:08
Immunity1831-May-06 15:08 
QuestionRe: Replace a part of text from text file Pin
David Crow1-Jun-06 4:32
David Crow1-Jun-06 4:32 
AnswerRe: Replace a part of text from text file Pin
Immunity181-Jun-06 4:37
Immunity181-Jun-06 4:37 
QuestionForcing new to fail [modified] Pin
hint_5431-May-06 11:30
hint_5431-May-06 11:30 
AnswerRe: Forcing new to fail Pin
Jörgen Sigvardsson31-May-06 13:43
Jörgen Sigvardsson31-May-06 13:43 
AnswerRe: Forcing new to fail [modified] Pin
Stephen Hewitt31-May-06 13:51
Stephen Hewitt31-May-06 13:51 
GeneralRe: Forcing new to fail [modified] Pin
hint_541-Jun-06 5:27
hint_541-Jun-06 5:27 
QuestionRe: Forcing new to fail [modified] Pin
David Crow1-Jun-06 4:36
David Crow1-Jun-06 4:36 
AnswerRe: Forcing new to fail [modified] Pin
hint_541-Jun-06 5:25
hint_541-Jun-06 5:25 
QuestionModeless Dialog Disappearing Pin
aei_totten31-May-06 11:00
aei_totten31-May-06 11:00 

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.