Article ID: 103226 - Last Review: August 5, 2004 - Revision: 3.1 SAMPLE: VBCobSQL.exe - Mixed-Language Apps (VB, COBOL, SQL)This article was previously published under Q103226 SUMMARY
VBCobSQL.exe demonstrates a mixed-language (Microsoft Visual Basic, COBOL, and ESQL)
application.
You can use Microsoft(R) Visual Basic(TM), Microsoft COBOL, and Microsoft SQL Server to build full-featured client-server applications that use the strengths of each product. Visual Basic creates the graphical user interface. Subroutine calls are made in the Basic code to COBOL dynamic-link libraries (DLLs). The COBOL DLL contains Embedded SQL (ESQL) to request the necessary data from the SQL Server. The COBOL DLL manipulates the retrieved data as required, then passes the data back to Visual Basic. In other words, Visual Basic is the graphical front-end and COBOL DLL is the back-end of the client application. MORE INFORMATIONThe following file is available for download from the Microsoft Download Center: VBCobSQL.exe
(http://download.microsoft.com/download/platformsdk/sample82/3.1/w31/en-us/vbcobsql.exe)
For additional information about how to download Microsoft Support files, click the following article number to view the article in the Microsoft Knowledge Base:
119591
(http://support.microsoft.com/kb/119591/EN-US/
)
How to Obtain Microsoft Support Files from Online Services
Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help to prevent any unauthorized changes to the file.
VBCOBSQL uses the PUBS database from the SQL Server package. The demo makes several queries to the PUBS database, such as Author Search and List Publications in a Category. It also allows you to insert and delete authors and add new publications to the database. To build VBCOBSQL, you will need Visual Basic version 2.0 Professional Edition, Microsoft COBOL version 5.0 or Micro Focus(R) COBOL version 3.0, and Embedded SQL Toolkit for COBOL. In Visual Basic, load the VBCOBDEM.MAK project and build an .EXE file for the application. Before building the COBOL DLL that accesses SQL Server, make sure that your build environment is set up to build COBOL/SQL Server applications. Set the LIB environment variable to include the drive and path of the following files:
Next, edit the VBCOBSQL.DIR directives file to use your own server, database, user ID, and password. There are two ways to build the DLL:
Before running the demo, make sure that the following files are in your current directory or in your PATH:
VBCOBSQL is a companion application for the "Building VB/COBOL/ESQL Mixed-Language Applications" technical article on the Microsoft Developer Network CD. | Article Translations
|

Back to the top
