Click here to Skip to main content
15,918,031 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
GeneralRe: What is the difference between delete[] and delete? Pin
George210-Feb-03 18:02
George210-Feb-03 18:02 
GeneralSTL remove_copy_if is not working properly Pin
George210-Feb-03 1:15
George210-Feb-03 1:15 
GeneralRe: STL remove_copy_if is not working properly Pin
Joaquín M López Muñoz10-Feb-03 9:29
Joaquín M López Muñoz10-Feb-03 9:29 
GeneralRe: STL remove_copy_if is not working properly Pin
George210-Feb-03 18:00
George210-Feb-03 18:00 
GeneralCompiling error on my simple STL spell-checker. Pin
George29-Feb-03 2:39
George29-Feb-03 2:39 
GeneralRe: Compiling error on my simple STL spell-checker. Pin
Joaquín M López Muñoz9-Feb-03 11:23
Joaquín M López Muñoz9-Feb-03 11:23 
GeneralRe: Compiling error on my simple STL spell-checker. Pin
George210-Feb-03 1:10
George210-Feb-03 1:10 
GeneralManta Web ATL Sample. Pin
Bo Hunter7-Feb-03 11:14
Bo Hunter7-Feb-03 11:14 
I am tring to get this Manta Web sample to work. It does to start with
but when I try to create a new account it gives the error
OLE DB ERROR:
CAddUser::OpenRowset() returned: 0x80004005

Here is the code.

HTTP_CODE AddUser()
{
// Add the user to the database
CAddUser addUser;
lstrcpy(addUser.m_szFirstName, m_strFirstName);
lstrcpy(addUser.m_szLastName, m_strLastName);
lstrcpy(addUser.m_szEmail, m_strEmail);
lstrcpy(addUser.m_szLogin, m_strLogin);
lstrcpy(addUser.m_szHint, m_strHint);

HRESULT hr;

// don't store the real password. only store a one-way encrypted hash
DWORD dwSaltLen = 4;
DWORD dwPasswordLen = DB_MAX_STRLEN;
hr = HashSecret(
(const BYTE*) (LPCSTR) m_strPassword1, m_strPassword1.GetLength(),
(BYTE*) addUser.m_szSalt, dwSaltLen,
(BYTE*) addUser.m_szPassword, dwPasswordLen);
if (FAILED(hr))
return HTTP_FAIL;

addUser.m_szSalt[dwSaltLen] = 0;
addUser.m_szPassword[dwPasswordLen] = 0;

hr = addUser.OpenRowset(m_dataConnection, NULL);
if (hr != S_OK)
return DatabaseError("CAddUser::OpenRowset()", hr);

// Send the confirmation email
#if defined(SEND_CONFIRMATION_MAIL)
if (!SendMail())
return SMTPError();
#endif

// Create the MantaWeb persistant cookie
WritePersistCookie(addUser.m_szLogin, addUser.m_szFirstName, (m_bRememberPass) ? "1" : "0");

// Send the response page
CString strHTML;
LoadHtmlFromResource(MAKEINTRESOURCE(IDR_CONFIRM), strHTML);
strHTML.Replace("[NAME]", m_strFirstName);
strHTML.Replace("[EMAIL]", m_strEmail);
strHTML.Replace("[LOGIN]", m_strLogin);
m_HttpResponse << strHTML;
m_HttpResponse.Flush();

return HTTP_SUCCESS_NO_PROCESS;
}

It gives trouble at hr = addUser.OpenRowset(m_dataConnection, NULL);
It returns FAIL.

Thank You
Bo Hunter

Bo Hunter
GeneralRe: Manta Web ATL Sample. Pin
TigerNinja_19-Feb-03 3:18
TigerNinja_19-Feb-03 3:18 
Generalresume download Pin
Anonymous6-Feb-03 17:34
Anonymous6-Feb-03 17:34 
GeneralRe: resume download Pin
JoeSox6-Feb-03 19:02
JoeSox6-Feb-03 19:02 
GeneralRe: resume download Pin
AlexO7-Feb-03 3:05
AlexO7-Feb-03 3:05 
GeneralRe: resume download Pin
Todd Smith19-Feb-03 9:29
Todd Smith19-Feb-03 9:29 
Generaloutlook express configuration Pin
naradaji6-Feb-03 5:25
naradaji6-Feb-03 5:25 
GeneralRe: outlook express configuration Pin
Michael Dunn6-Feb-03 9:43
sitebuilderMichael Dunn6-Feb-03 9:43 
GeneralRe: outlook express configuration Pin
naradaji6-Feb-03 21:13
naradaji6-Feb-03 21:13 
GeneralRe: outlook express configuration Pin
Michael Dunn8-Feb-03 19:09
sitebuilderMichael Dunn8-Feb-03 19:09 
GeneralRe: outlook express configuration Pin
naradaji9-Feb-03 21:22
naradaji9-Feb-03 21:22 
GeneralProblems connecting DWebBrowserEvents2 Pin
Xavyer5-Feb-03 22:43
Xavyer5-Feb-03 22:43 
GeneralQuestion about input iterator. Pin
George25-Feb-03 21:34
George25-Feb-03 21:34 
GeneralRe: Question about input iterator. Pin
Joaquín M López Muñoz5-Feb-03 22:38
Joaquín M López Muñoz5-Feb-03 22:38 
GeneralRe: Question about input iterator. Pin
George26-Feb-03 0:03
George26-Feb-03 0:03 
GeneralRe: Question about input iterator. Pin
Joaquín M López Muñoz6-Feb-03 7:01
Joaquín M López Muñoz6-Feb-03 7:01 
GeneralRe: Question about input iterator. Pin
George26-Feb-03 15:22
George26-Feb-03 15:22 
GeneralRe: Question about input iterator. Pin
Joaquín M López Muñoz6-Feb-03 19:48
Joaquín M López Muñoz6-Feb-03 19:48 

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.