Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Wrox Announcements and Feedback > All Other Wrox Books
|
All Other Wrox Books Do you have a question about a Wrox book that isn't listed anywhere on p2p.wrox.com or where the forum is locked? Here's a forum to post questions about any other Wrox book so that other readers or one of the authors can help you with your questions. IF YOU ARE LOOKING FOR CODE DO NOT ASK "Where can I find the code for this book?" That question is answered here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the All Other Wrox Books section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old October 29th, 2003, 08:19 AM
Registered User
 
Join Date: Oct 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Visual C++.Net: A primer for C++ developers.

Great 'show by example' book.

In the last chapter developing the stock quotations web service none of the SQL insert statements seem to execute correctly.

Anyone else have this problem?

Clip from sample code that fails below.

[ soap_method ]
HRESULT AddMemberInfo(BSTR strUserID, BSTR strPassword, BSTR UserName, BSTR* strResult)
{

CDataSource ds;
CCommand<CAccessor<CLogin> > cmd;
CSession session;

HRESULT hr=ds.OpenFromInitializationString(L"Provider=Micr osoft.Jet.OLEDB.4.0;User ID=Admin;Data Source=C:\\StockDB.mdb");

if(SUCCEEDED(hr))
{
   if(SUCCEEDED(session.Open(ds)))
   {
      CString userID(strUserID);
      CString password(strPassword);
      CString userName(UserName);

      CString insertQuery("INSERT INTO Login VALUES('");
      insertQuery +=userID;
      insertQuery +="','";
      insertQuery += userName;
      insertQuery += "','";
      insertQuery += password;
      insertQuery += "')";
      // this call always fails ...
      hr= cmd.Open(session, insertQuery);

TIA,


Andy Bache





Similar Threads
Thread Thread Starter Forum Replies Last Post
Something good for .net developers jamesk ADO.NET 0 April 30th, 2008 12:02 PM
professional xml for .net developers code lkr9 All Other Wrox Books 1 March 27th, 2006 05:03 PM
professional xml for .net developers AlbertHu All Other Wrox Books 1 November 5th, 2004 11:09 AM
Visual C++ .NET: A primer for C++ developers error rstaveley All Other Wrox Books 0 November 5th, 2004 07:23 AM
Source code for the book "Visual C++.net: a primer Julie Lin .NET Web Services 0 September 29th, 2003 02:40 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.