Click here to Skip to main content
15,938,218 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: Memory allocation problem !!! Pin
CPallini3-Nov-09 1:54
mveCPallini3-Nov-09 1:54 
AnswerRe: Memory allocation problem !!! Pin
PrafullaShirke273-Nov-09 2:02
professionalPrafullaShirke273-Nov-09 2:02 
GeneralRe: Memory allocation problem !!! Pin
CPallini3-Nov-09 2:04
mveCPallini3-Nov-09 2:04 
GeneralRe: Memory allocation problem !!! Pin
CPallini3-Nov-09 2:03
mveCPallini3-Nov-09 2:03 
QuestionRe: Memory allocation problem !!! Pin
David Crow3-Nov-09 3:08
David Crow3-Nov-09 3:08 
Questionhow to insert data in sqlserver 2005 using vc++6.0 Pin
eswar pothula2-Nov-09 22:56
eswar pothula2-Nov-09 22:56 
AnswerRe: how to insert data in sqlserver 2005 using vc++6.0 [modified] Pin
super2-Nov-09 23:08
professionalsuper2-Nov-09 23:08 
AnswerRe: how to insert data in sqlserver 2005 using vc++6.0 Pin
CPallini2-Nov-09 23:15
mveCPallini2-Nov-09 23:15 
eswar pothula wrote:
SQLExecDirect(hstmt,(unsigned char *)"insert into emp values(empnum,'ename',esal)",SQL_NTS);


That's wrong.
Try to change it to:
const int SIZE = 256;
char sqlcmd[SIZE];
sprintf(sqlcmd, "insert into emp values(%d,'%s',%f)", empnum, ename, esal);
SQLExecDirect(hstmt,(unsigned char *) sqlcmd, SQL_NTS);


of course, in real life, you should check for buffer overruns, etc...
Smile | :)

If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.

This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke

[My articles]

QuestionMaking an Application Hang. Pin
Hari_162-Nov-09 22:52
Hari_162-Nov-09 22:52 
AnswerRe: Making an Application Hang. Pin
CPallini2-Nov-09 22:57
mveCPallini2-Nov-09 22:57 
GeneralRe: Making an Application Hang. Pin
Hari_162-Nov-09 23:01
Hari_162-Nov-09 23:01 
GeneralRe: Making an Application Hang. Pin
Adam Roderick J2-Nov-09 23:06
Adam Roderick J2-Nov-09 23:06 
GeneralRe: Making an Application Hang. Pin
Hari_162-Nov-09 23:12
Hari_162-Nov-09 23:12 
GeneralRe: Making an Application Hang. Pin
Adam Roderick J2-Nov-09 23:47
Adam Roderick J2-Nov-09 23:47 
GeneralRe: Making an Application Hang. Pin
Rajesh R Subramanian2-Nov-09 23:58
professionalRajesh R Subramanian2-Nov-09 23:58 
GeneralRe: Making an Application Hang. [modified] Pin
CPallini2-Nov-09 23:17
mveCPallini2-Nov-09 23:17 
GeneralRe: Making an Application Hang. Pin
Hari_162-Nov-09 23:56
Hari_162-Nov-09 23:56 
JokeRe: Making an Application Hang. Pin
PrafullaShirke272-Nov-09 22:57
professionalPrafullaShirke272-Nov-09 22:57 
GeneralRe: Making an Application Hang. Pin
Hari_162-Nov-09 22:59
Hari_162-Nov-09 22:59 
AnswerRe: Making an Application Hang. Pin
Rajesh R Subramanian2-Nov-09 23:47
professionalRajesh R Subramanian2-Nov-09 23:47 
GeneralRe: Making an Application Hang. Pin
Hari_162-Nov-09 23:58
Hari_162-Nov-09 23:58 
AnswerRe: Making an Application Hang. Pin
Randor 3-Nov-09 5:21
professional Randor 3-Nov-09 5:21 
GeneralRe: Making an Application Hang. Pin
Hari_163-Nov-09 18:14
Hari_163-Nov-09 18:14 
QuestionDirect3D (DXUT) Problem Pin
Ali Tavakol2-Nov-09 22:37
Ali Tavakol2-Nov-09 22:37 
QuestionChange background color of combo box's dropdown list. Pin
Member 38346302-Nov-09 22:00
Member 38346302-Nov-09 22: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.