Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > Other .NET > .NET Web Services
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
.NET Web Services Discussions about .NET XML Web Service technologies including ASMX files, WSDL and SOAP.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET Web Services section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Closed Thread
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 15th, 2004, 05:30 PM
Registered User
Join Date: Apr 2004
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default ATL Server Web service

Hi guys,
i have an ATL Server web service written in C++ and connecting to a SQL database. I noticed the ADO objects do not hold thier state between function calls. After each call, the class member ADO objects do not exist anymore.

section of code is bellow

int InitializeADOComponents()
        HRESULT hr = m_connectionPtr.CreateInstance(__uuidof(Connection ));
            hr = m_commandPtr.CreateInstance(__uuidof(Command));
                hr = m_recordsetPtr.CreateInstance(__uuidof(Recordset)) ;
                    retVal = -1;

        retVal = 101;

    return retVal;

int OpenDatabaseConnection()
        _bstr_t bstrConnection("Provider=sqloledb;Data Source=DSN123;"
                "Initial Catalog=Manager;User Id=test;Password=test;");

            HRESULT hr = m_connectionPtr->Open(bstrConnection,"", "",adConnectUnspecified);
                bConnected = -1;
    catch(_com_error er)
        _bstr_t bs = er.Description();
        return 101;

    return bConnected;
This (OpenDatabaseConnection() ) and other ADO method calls after InitializeADOComponents fail because the ADO objects are NULL.
example m_connectionPtr is NULL.

What can the problem be?

thanks guys
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Web Service Server Requirements ashokparchuri .NET Web Services 0 January 2nd, 2007 06:26 PM
Web Service Vs. Client/Server gabrielboys .NET Web Services 10 January 10th, 2006 06:48 AM
Terra Server Web service problem lkubler BOOK: Beginning Access 2003 VBA 2 October 10th, 2005 11:37 PM
SQL server 2000 as a web service lachupacabra .NET Web Services 0 November 17th, 2003 04:45 PM
C++ Atl Web service wizard Julie Lin .NET Web Services 0 October 1st, 2003 12:44 AM

All times are GMT -4. The time now is 05:15 AM.

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