SQLexamp: Command-Line Interpreter

Click to open or copy the files for the SQLexamp sample.

This program provides a simple example of logging onto a SQL Server, sending down commands, and retrieving metadata and result rows. It also demonstrates formatting and printing the results on the console.

Building SDK Samples

This sample uses the following keywords:

dbcancel; dbclose; dbcmd; dbcolinfo; dbcollen; dbcolname; dbcoltype; dbconvert; dbcount; dbdata; dbdatlen; dberrhandle; dbinit; dblogin; dbmsghandle; dbnextrow; dbnumcols; dbopen; dbresults; dbsetlhost; dbsetluser; dbsetlversion; dbsettime; dbsqlexec; defined; determinerowsize; err_handler; free; gets; malloc; memmove; memset; msg_handler; printf; printheaders; printrow; strcat; strcpy; strncpy; strnicmp; switch