Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
N

nativespirits

@nativespirits
About
Posts
7
Topics
3
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Anyone use Stored Procs return multiple results?
    N nativespirits

    I think I solved this one also. At least it compiled, have to run it to test that it works. Basically bind the columns of the first result set to the db_command using db_column. Then in the receiving method check to see if you can .MoveNext record in the first result set if not use the .GetNextResult method to move to the next one. Heres the code: while (S_OK!=GetStudents.MoveFirst()) { GetStudents.GetNextResult(&numRecs, true); }

    ATL / WTL / STL database c++ wpf wcf sysadmin

  • C++ compile error C3358: CSoapHandler symbol not found
    N nativespirits

    Never mind. The problem with using MSDN samples is not being clear on Wizard options selected. Anyway, as I was perusing the process of running sproxy.exe for Console App linkage to ATL Web Services, I came across the .wsdl file that needed to be generated. .NET Studio does this under the Add Rerferences utility, however you first have to open the .disco file to get the http path to your web service. Studio then generates the XML document to link your client to the soap handlers ( .wsdl file). Tis done and tis works. Whew!

    ATL / WTL / STL c++ security wcf sysadmin xml

  • C++ compile error C3358: CSoapHandler symbol not found
    N nativespirits

    I have the code exactly like the sample OnlineAddressBook from the MSDN library yet I get the error whereas that app does not. Such simple things can stop a programmer for hours. Here is the code I am using. Note that the Web Service this code is in compiles fine, it's when I compile the SRF (ATL Server) project that the error occurs, let me know if you need to see more code. // DataConsumerWS.h : Defines the ATL Server request handler class // #pragma once namespace DataConsumerWSService { const wchar_t MYDATASOURCE[] = L"Provider=SQLOLEDB.1ersist Security Info=False;User ID=me;Initial Catalog=mine;Data Source=SERVER;Use Procedure for Prepare=1;Auto Translate=Trueacket Size=4096;Use Encryption for Data=False;Tag with column collation when possible=False"; // all struct, enum, and typedefs for your webservice should go inside the namespace // IDataConsumerWSService - web service interface declaration // [ uuid("2E179D71-E436-42EE-A1D6-00758BF3D7AA"), object ] __interface IDataConsumerWSService { // HelloWorld is a sample ATL Server web service method. It shows how to // declare a web service method and its in-parameters and out-parameters [id(1)] HRESULT GetStudents([out] int *arrSize,[out,size_is(*arrSize)] BSTR **NameList,[out,size_is(*arrSize)] LONG **IDList); // TODO: Add additional web service methods here }; // DataConsumerWSService - web service implementation // [ request_handler(name="Default", sdl="GenDataConsumerWSWSDL"), soap_handler( name="DataConsumerWSService", namespace="urn:DataConsumerWSService", protocol="soap" ) ] class CDataConsumerWSService : public IDataConsumerWSService { public: // uncomment the service declaration(s) if you want to use // a service that was generated with your ISAPI extension CDataConnection m_dc; HTTP_CODE InitializeHandler(AtlServerRequest *pRequestInfo, IServiceProvider *pProvider) { if (HTTP_SUCCESS != CSoapHandler::InitializeHandler(pRequestInfo, pProvider)) return HTTP_FAIL;

    ATL / WTL / STL c++ security wcf sysadmin xml

  • C++ ATL Server project
    N nativespirits

    :confused: I understand what you've said here, however I cannot find why I constantly receive the error: error C3358: 'CSoapHandler': symbol not found I have the code exactly like the sample OnlineAddressBook from the MSDN library yet I get the error whereas that app does not. Such simple things can stop a programmer for hours. Here is the code I am using. Note that the Web Service this code is in compiles fine, it's when I compile the SRF (ATL Server) project that the error occurs, let me know if you need to see more code. // DataConsumerWS.h : Defines the ATL Server request handler class // #pragma once namespace DataConsumerWSService { const wchar_t MYDATASOURCE[] = L"Provider=SQLOLEDB.1;Persist Security Info=False;User ID=me;Initial Catalog=mine;Data Source=SERVER;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Use Encryption for Data=False;Tag with column collation when possible=False"; // all struct, enum, and typedefs for your webservice should go inside the namespace // IDataConsumerWSService - web service interface declaration // [ uuid("2E179D71-E436-42EE-A1D6-00758BF3D7AA"), object ] __interface IDataConsumerWSService { // HelloWorld is a sample ATL Server web service method. It shows how to // declare a web service method and its in-parameters and out-parameters [id(1)] HRESULT GetStudents([out] int *arrSize,[out,size_is(*arrSize)] BSTR **NameList,[out,size_is(*arrSize)] LONG **IDList); // TODO: Add additional web service methods here }; // DataConsumerWSService - web service implementation // [ request_handler(name="Default", sdl="GenDataConsumerWSWSDL"), soap_handler( name="DataConsumerWSService", namespace="urn:DataConsumerWSService", protocol="soap" ) ] class CDataConsumerWSService : public IDataConsumerWSService { public: // uncomment the service declaration(s) if you want to use // a service that was generated with your ISAPI extension CDataConnection m_dc; HTTP_CODE InitializeHandler(AtlServerRequest *pRequestInfo, IServiceProvider *pProvider) { if (HTTP_SUCCESS != CSoapHandler::InitializeHandler(pRequestInfo, pProvider)) return HTTP_FAIL;

    ATL / WTL / STL c++ sysadmin oop question

  • OLE DB templated samples
    N nativespirits

    I have had success with the Microsoft example OnlineAddressBook from the MSDN library (comes with Visual Studio .NET Enterprise). I believe you can download it off the msdn site as well. It shows record retrieval, update, delete etc...

    ATL / WTL / STL database c++ com help announcement

  • Anyone use Stored Procs return multiple results?
    N nativespirits

    :confused: I have a stored procedure that returns more than one result set (mulitiple select statements). I am using ATL Server and have found an example from Microsoft called OnlineAddressBook. This example has helped me considerably with the OLEDB Consumer Template, specifically db_command and db_column. However, all though it indicates the possibility of moving thru more than one result set it doesn't give any clear example, such as syntax or whether or not binding can be manual or has to be automatic. I am sure this is a simple process but it is eluding me and I cannot find any examples or user posts anywhere on this. I have: [ db_command(L"{CALL dbo.spTranscriptGetStudents(?, ?, ?) }") ] class CGetStudents { public: // In order to fix several issues with some providers, the code below may bind // columns in a different order than reported by the provider [ db_column(1) ] LONG m_StudentNum; [ db_column(2) ] TCHAR m_LastName[DB_MAX_FIELDLEN + 1]; [ db_column(3) ] TCHAR m_FirstName[DB_MAX_FIELDLEN + 1]; [ db_param(1) ] DBTIMESTAMP m_asofdate; [ db_param(2) ] LONG m_schnum; [ db_param(3) ] LONG m_schyear; };

    ATL / WTL / STL database c++ wpf wcf sysadmin

  • Max Length of BSTR
    N nativespirits

    I am building an Ad Hoc tool for work. Using a DLL to access the SQL Server database via ADO Smart Pointers (_RecordsetPtr, _ConnectionPtr). Anyway after I generate the SQL string the end user will create it gets truncated when converted to the BSTR datatype (which is necessary to pass out of the DLL via IDL). It appears to truncate at 511 chars (so I assume BSTR maxes at 512 with a NULL terminating character). What I need to know is if there is a way around this limitation. Is there a wrapper or function that expands the length of the BSTR to be passed? Or is there away to send it in pieces and have SQL Server concatenate it together when it receives it? I know that Query Analyzer, Cold Fusion and other tools pass incredibly long strings to SQL Server so it's got to be possible! Does anyone know the trick? Please let me know! Adam Murray Contract Programmer Microsoft Certified Professional

    COM database sql-server sysadmin tools question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups