any help please....#!/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; print header; ######################################### ## 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:\\Ine +tpub\\domains\\rvnuccio.com\\applications\\Test\\Clients.mdb'; my $dbh = DBI->connect("dbi:ODBC:$DSN", '','') or die "$DBI::errstr\n"; ############################### ## Generate SQL Statement ############################### # my $sql = "SELECT ClientName,ClientEmail FROM billing"; my $sql ="INSERT INTO Billing VALUES ('Doyle','doyle.com','1010','1 +00','Yes')"; ############################### ## Prepare and execute the ## SQL Statement ############################### my $loadHandle = $dbh->prepare($sql); $loadHandle->execute|| die "Could not execute SQL statement ... maybe invalid?"; # my @row; # while (@row=$loadHandle->fetchrow_array) # { print "@row\n\n" } ######################################### ## Close the connection when finished: ######################################### $dbh->disconnect;
Retitled by davido from 'Access'.
In reply to Inserting a record into an Access database by Doyle
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |