SQLTestN
SQLTestN is a Win32® API, graphical user interface sample. The sample illustrates connecting to a Microsoft® SQL Server™ and executing a simple SELECT statement.
Default Location
C:\Program Files\Microsoft SQL Server\80\Tools\Devtools\Samples\DBLib\SQLTestN
- Open the sqltestn.dsw in Microsoft Visual C++® 6.0.
- From the Tools menu, choose Options, and then click the Directories tab.
- From the Show directories for box, choose Include files and Library files, and ensure that the following directories (as appropriate) are included:
- Include files: C:\Program Files\Microsoft SQL Server\80\Tools\Devtools\Include
- Library files: C:\Program Files\Microsoft SQL Server\80\Tools\Devtools\Lib
- Include files: C:\Program Files\Microsoft SQL Server\80\Tools\Devtools\Include
- Ensure that the hard-coded user name is correct. The password is assumed to be NULL.
- Compile the program.
- Open a Command Prompt window, and then change the current directory to C:\Program Files\Microsoft SQL Server\80\Tools\Devtools\Samples\DBLib\Sqltestn.
- Run the program by entering "sqltestn".
Functions Illustrated
Dbbind | dbmsghandle |
Dbclose | dbnextrow |
Dbcmd | dbopen |
Dberrhandle | dbresults |
Dbexit | DBSETLUSER |
Dbfreelogin | DBSETLVERSION |
Dbinit | dbsqlexec |
DBLOCKLIB | DBUNLOCKLIB |
Dblogin | dbuse |