Click here to Skip to main content
15,919,749 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: regarding list box in vc++ Pin
haasini4-Sep-06 21:05
haasini4-Sep-06 21:05 
GeneralRe: regarding list box in vc++ Pin
Hamid_RT5-Sep-06 20:37
Hamid_RT5-Sep-06 20:37 
AnswerRe: regarding list box in vc++ Pin
Viorel.4-Sep-06 21:45
Viorel.4-Sep-06 21:45 
GeneralRe: regarding list box in vc++ Pin
haasini5-Sep-06 18:24
haasini5-Sep-06 18:24 
Questiontry ... catch problem Pin
Programm3r4-Sep-06 20:21
Programm3r4-Sep-06 20:21 
AnswerRe: try ... catch problem Pin
prasad_som4-Sep-06 20:32
prasad_som4-Sep-06 20:32 
QuestionRe: try ... catch problem Pin
Programm3r4-Sep-06 20:37
Programm3r4-Sep-06 20:37 
AnswerRe: try ... catch problem Pin
prasad_som4-Sep-06 20:48
prasad_som4-Sep-06 20:48 
Programm3r wrote:
O.k, but if what you you are saying is true, then the catch block will catch it .. right?


As I said earlier,catch will execute only if exception is thrown from try block.
In above case, its not necessarily checked by SQLConnect for invalid memory.
consider this code for understanding
int foo1(char* p)
{
	try 
	{
           memset(p,0,10);
	}
	catch(...)
	{
	   throw;
	}
    return 0;
}

int main(int argc, char* argv[])
{
try
{
	char *p=NULL;
	foo1(p);
}
catch(...)
{
  cout<<"in Catch"<<endl;
}
}

In you case foo1 like implementation might not implemented by SQLConnect.
If you try removing try, catch from foo1 function, above code will crash irrespective of try, catch in main.


GeneralRe: try ... catch problem Pin
Programm3r4-Sep-06 21:02
Programm3r4-Sep-06 21:02 
Questionhow to update data from into database? Pin
ravi04794-Sep-06 19:57
ravi04794-Sep-06 19:57 
QuestionHow to integrate msxml 6 with my installer Pin
code4jigar4-Sep-06 19:38
code4jigar4-Sep-06 19:38 
AnswerRe: How to integrate msxml 6 with my installer Pin
Michael Dunn4-Sep-06 20:18
sitebuilderMichael Dunn4-Sep-06 20:18 
QuestionRe: How to integrate msxml 6 with my installer Pin
code4jigar4-Sep-06 20:36
code4jigar4-Sep-06 20:36 
Questioncheck the characters in a string Pin
Anu_Bala4-Sep-06 19:21
Anu_Bala4-Sep-06 19:21 
AnswerRe: check the characters in a string Pin
prasad_som4-Sep-06 19:33
prasad_som4-Sep-06 19:33 
GeneralRe: check the characters in a string Pin
Anu_Bala4-Sep-06 20:58
Anu_Bala4-Sep-06 20:58 
QuestionRe: check the characters in a string Pin
prasad_som4-Sep-06 21:10
prasad_som4-Sep-06 21:10 
AnswerRe: check the characters in a string Pin
Anu_Bala4-Sep-06 21:28
Anu_Bala4-Sep-06 21:28 
GeneralRe: check the characters in a string Pin
prasad_som4-Sep-06 22:42
prasad_som4-Sep-06 22:42 
GeneralRe: check the characters in a string Pin
Hamid_RT4-Sep-06 22:52
Hamid_RT4-Sep-06 22:52 
GeneralRe: check the characters in a string Pin
Anu_Bala4-Sep-06 23:34
Anu_Bala4-Sep-06 23:34 
GeneralRe: check the characters in a string Pin
Hamid_RT5-Sep-06 0:58
Hamid_RT5-Sep-06 0:58 
AnswerRe: check the characters in a string Pin
velayudhan_raj4-Sep-06 19:42
velayudhan_raj4-Sep-06 19:42 
AnswerRe: check the characters in a string Pin
Hamid_RT4-Sep-06 20:10
Hamid_RT4-Sep-06 20:10 
QuestionHow to use the exports functions of control panel? Pin
Tcpip20054-Sep-06 19:20
Tcpip20054-Sep-06 19: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.