Click to open or copy the files for the Example2 sample.
This example opens a data file, inserts data from the file into a newly created table containing several of the SQL Server datatypes, and binds and prints the results. You must have a file named datafile and CREATE DATABASE permission in your login database. You must have enough room in your default device to create a new database (minimum 2 MB).
This sample uses the following keywords:
char; dbbind; dbcmd; dbdatlen; dbdead; dberrhandle; dbexit; dbfcmd; dbinit; dblogin; dbmsghandle; dbnextrow; dbopen; dbresults; dbsetlapp; dbsetlpwd; dbsetluser; dbsetlversion; dbsqlexec; dbuse; decimal; defined; err_handler; fgets; fopen; msg_handler; printf; values; varbinary; varchar