HOWTO: Debug a Visual Basic Component Invoked Through the RDS.Dataspace

ID: Q247271


The information in this article applies to:
  • Microsoft Data Access Components versions 1.5, 2.0, 2.1, 2.1 (GA), 2.1 SP1, 2.1 SP2


SUMMARY

Using Remote Data Services (RDS), specifically the RDS.Dataspace object, you can invoke remote business objects residing on a Web server running Internet Information Server (IIS). When these components are instantiated through the RDS.Dataspace object, the remote Visual Basic (VB) ActiveX DLL is loaded and runs within the IIS process space (Inetinfo.exe) on the Web server. When developing components that are invoked through the RDS.Dataspace, you may need to debug these components while they are running under IIS. Do this by compiling the Visual Basic ActiveX DLL with symbolic debug information, then attaching to the IIS process with Visual C++ and debugging the compiled DLL code. This article discusses the specific steps necessary to do this.


MORE INFORMATION

Below are steps to set up and debug a compiled Visual Basic ActiveX DLL running under IIS that has been invoked remotely through the RDS.Dataspace object. For additional information on how to create an RDS Custom Business object to use as a test case for the following steps, click the article number below to view the article in the Microsoft Knowledge Base:

Q166277 Create a VB Component that Returns a Recordset in RDS
  1. First you need to recompile the Visual Basic ActiveX DLL with symbolic debug information. To do this, open the Visual Basic ActiveX DLL project. From the Project menu, select Properties. On the Compile tab, select the box labeled Create Symbolic Debug Info. Recompile the component. You should now see a file with a .pdb extension in the same directory as the DLL. This is the file that contains the symbolic debug information. Make sure this file stays in the same directory as the compiled DLL.


  2. Open Visual C++ 6.0. From the File menu, select Open Workspace. In the Open Workspace dialog box, set Files of Type to All files(*.*), and then select your compiled Visual Basic component.


  3. Again from the File menu select Open and choose the .cls or .bas file that contains the Visual Basic source code you wish to debug.


  4. Create a break point in the code by positioning the cursor on that line and pressing F9.


  5. From the Project menu, select Settings. Click the Debug tab and then Additional DLLs from the Category drop down list. Add your compiled Visual Basic ActiveX DLL to the listing of DLLs.


  6. From the Debug menu, select Start Debug and then Attach to Process. You have to select the Show System Processes box. Once you have done this, select the Inetinfo process and click OK.

    NOTE: If the IIS service is not started, you have to start it before attaching to the process.


  7. Now execute the client code that uses the RDS.Dataspace to invoke your Visual Basic component. Execution should stop at the break point you set inside of the Visual C++ debugger. You can now step through the code inside of the debugger.



REFERENCES

For additional information, click the article numbers below to view the articles in the Microsoft Knowledge Base:

Q166275 HOWTO: Debug a Native Code Visual Basic Component in VC++
Q193133 HOWTO: Compile VB Programs with Debug Symbols Embedded
Q191741 INFO: RDS Registry/Security Settings For Custom Business Objects
Q166277 HOWTO: Create a VB Component that Returns a Recordset in RDS
Q181092 FAQ: Remote Data Service (RDS) Frequently Asked Questions

Additional query words: debugging native symbols createobject

Keywords : kbMDAC kbRDS kbGrpMDAC kbDSupport kbGrpASPDB
Version : WINDOWS:1.5,2.0,2.1,2.1 (GA),2.1 SP1,2.1 SP2
Platform : WINDOWS
Issue type : kbhowto


Last Reviewed: January 20, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.