Click here to Skip to main content
15,914,016 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: convert CString to SQLCHAR* Pin
Rajesh R Subramanian22-Oct-08 23:11
professionalRajesh R Subramanian22-Oct-08 23:11 
GeneralRe: convert CString to SQLCHAR* Pin
anna mathew22-Oct-08 23:17
anna mathew22-Oct-08 23:17 
GeneralRe: convert CString to SQLCHAR* Pin
Rajesh R Subramanian22-Oct-08 23:20
professionalRajesh R Subramanian22-Oct-08 23:20 
JokeRe: convert CString to SQLCHAR* Pin
CPallini22-Oct-08 23:46
mveCPallini22-Oct-08 23:46 
QuestionRe: convert CString to SQLCHAR* Pin
CPallini22-Oct-08 23:42
mveCPallini22-Oct-08 23:42 
AnswerRe: convert CString to SQLCHAR* Pin
KarstenK22-Oct-08 20:51
mveKarstenK22-Oct-08 20:51 
QuestionRe: convert CString to SQLCHAR* [modified] Pin
CPallini22-Oct-08 21:44
mveCPallini22-Oct-08 21:44 
AnswerRe: convert CString to SQLCHAR* Pin
anna mathew23-Oct-08 0:46
anna mathew23-Oct-08 0:46 
now im using CDatabase....

and modified code to :

void CInsert::OnBnClickedOk()
{
OnOK();
SQLRETURN sr;
SQLHSTMT hstmt;
//SQLCHAR SQL[] ="INSERT INTO Contacts (FirstName, LastName, Address) VALUES('?','?','?')";

//Take the values entered in edit box to CEdit *
m_First.GetWindowText(Firstname);
m_Last.GetWindowText(Lastname);
m_Add.GetWindowText(Address);
CString Full ="INSERT INTO Contacts (FirstName, LastName, Address) VALUES ('" +Firstname+ "', '" +Lastname+"','" + Address+"'))"; SQLINTEGER FirstNameLength = SQL_NTS;
sr = ExecuteSQL(Full);
if(sr != SQL_SUCCESS && sr != SQL_SUCCESS_WITH_INFO)
displayODBCError(sr,"Error in ExecuteSQL");

SQLFreeHandle(SQL_HANDLE_STMT, hstmt);
}

................

still now same error.........

error C2594: 'static_cast' : ambiguous conversions from 'void (__thiscall CInsert::* )(void)' to 'AFX_PMSG'
AnswerRe: convert CString to SQLCHAR* Pin
anna mathew22-Oct-08 23:30
anna mathew22-Oct-08 23:30 
QuestionRe: convert CString to SQLCHAR* Pin
CPallini22-Oct-08 23:56
mveCPallini22-Oct-08 23:56 
AnswerRe: convert CString to SQLCHAR* Pin
anna mathew23-Oct-08 0:11
anna mathew23-Oct-08 0:11 
GeneralRe: convert CString to SQLCHAR* Pin
anna mathew23-Oct-08 0:15
anna mathew23-Oct-08 0:15 
GeneralRe: convert CString to SQLCHAR* Pin
CPallini23-Oct-08 0:49
mveCPallini23-Oct-08 0:49 
GeneralRe: convert CString to SQLCHAR* Pin
anna mathew23-Oct-08 19:24
anna mathew23-Oct-08 19:24 
GeneralRe: convert CString to SQLCHAR* Pin
CPallini23-Oct-08 21:34
mveCPallini23-Oct-08 21:34 
QuestionPicture Control Pin
MsmVc22-Oct-08 18:50
MsmVc22-Oct-08 18:50 
QuestionSendMessage seemingly doing nothing at certain point in recursion Pin
kamrann22-Oct-08 15:33
kamrann22-Oct-08 15:33 
QuestionHow can I display Dlg Message Box? Pin
sabdalla8022-Oct-08 9:53
sabdalla8022-Oct-08 9:53 
AnswerRe: How can I display Dlg Message Box? Pin
David Crow22-Oct-08 9:58
David Crow22-Oct-08 9:58 
GeneralRe: How can I display Dlg Message Box? Pin
sabdalla8022-Oct-08 10:09
sabdalla8022-Oct-08 10:09 
GeneralRe: How can I display Dlg Message Box? Pin
sabdalla8022-Oct-08 10:22
sabdalla8022-Oct-08 10:22 
QuestionRe: How can I display Dlg Message Box? Pin
David Crow22-Oct-08 10:37
David Crow22-Oct-08 10:37 
AnswerRe: How can I display Dlg Message Box? Pin
sabdalla8022-Oct-08 10:43
sabdalla8022-Oct-08 10:43 
QuestionRe: How can I display Dlg Message Box? Pin
David Crow22-Oct-08 10:47
David Crow22-Oct-08 10:47 
QuestionGetting NULL value from 'Win32_LogonSession' through WMI [modified] Pin
Supriya Tonape22-Oct-08 9:40
Supriya Tonape22-Oct-08 9:40 

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.