sprakash has asked for the wisdom of the Perl Monks concerning the following question:
my $dbh; $dbh = CreateObject OLE "ADODB.Connection" or die "Can't create connec +tion to DataBase: $!" unless $dbh; $dbh->Open("Driver={Microsoft Access Driver (*.mdb)};DBQ=../_private/d +b1.mdb"); my $rs = CreateObject OLE "ADODB.Recordset" or die "can not create rec +ordset"; my $sql; if ($formfriend eq 'surya') { $sql = "INSERT INTO surya VALUES ($formemail,$formpass)"; } if ($formfriend eq 'rahul') { $sql = "INSERT INTO rahul VALUES ($formemail,$formpass)"; } if ($formfriend eq 'deepika') { $sql = "INSERT INTO deepika VALUES ($formemail,$formpass)"; } if ($formfriend eq 'everyone') { $sql = "INSERT INTO everyone VALUES ($formemail,$formpass)"; } $rs = $dbh->Execute( $sql );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Inserting data into MS Access databse.........
by boo_radley (Parson) on Dec 17, 2000 at 21:27 UTC | |
|
Re: Inserting data into MS Access databse.........
by turnstep (Parson) on Dec 17, 2000 at 20:30 UTC | |
|
Re: Inserting data into MS Access databse.........
by wardk (Deacon) on Dec 18, 2000 at 02:38 UTC | |
|
Re: Inserting data into MS Access databse.........
by 2501 (Pilgrim) on Dec 17, 2000 at 11:06 UTC | |
by merlyn (Sage) on Dec 17, 2000 at 11:26 UTC |