#!/usr/bin/perl -w ################################################# ## This is an Example of how to Connect to an ## Access Database using a DSN-less Connection ################################################# use POSIX; use strict; use CGI qw(:standard); use CGI::Carp qw(fatalsToBrowser); use DBI; ######################################### ## Create the Connection String ## To use a DSN just replace the string ## with the DSN name. ######################################### my $DSN = 'driver=Microsoft Access Driver (*.mdb);dbq=c:\\Inetpub\\domains\\rvnuccio.com\\doytest\\cgi-bin\\Clients.mdb'; my $dbh = DBI->connect("dbi:ODBC:$DSN", '','') or die "$DBI::errstr\n"; ############################### ## Generate SQL Statement ############################### my $sql = "Select 'John Smith' from TblOne"; # my $sql ="Select ClientName from Billing"; ############################### ## Prepare and execute the ## SQL Statement ############################### my $loadHandle = $dbh->prepare($sql); $loadHandle->execute|| die "Could not execute SQL statement ... maybe invalid?"; print header; print "