Please help me using DBI for the first time

From: Abhishek Jain (mail_at_ejain.com)
Date: 03/27/04


To: <dbi-users@perl.org>
Date: Sat, 27 Mar 2004 14:23:07 +0530

Hi Friends,
I am in bit of the proble. I am using DBI for the first time and have made a simple program. But am not able to run on mine PC.I am using windows . Please tell me what wrong I am doing in the following program.
I have made a DSN with name abhijain

#!/usr/bin/perl
  use DBI;
$dbh = DBI->connect("dbi:ExampleP:abhijain","sa","");
my $sth = $dbh->do("create table student(rollno int,name varchar(20))");
$dbh->disconnect();

I am getting the following error DBD::ExampleP::db do failed: Syntax error in select statement ("create table student(rollno int,name varchar(20))") at noname.pl line 4.
Also I want insert statement in the program please tell me what code i must write.I have tried many tutorials but nothing solved mine problem.
Please help me I shall be very very grateful
Thanks,
Abhishek jain
                    ***********************************************
                            GOD BLESS MISSION 2020
                    ***********************************************



Relevant Pages

  • Re: Error - DBD::Oracle / ORA-1008 problem with placeholders
    ... As well what operation system are you using and which version of DBI? ... I encouter an error with DBD::Oracle and Oracle instances 10g that I ... If I used placeholders like ":param1", it works the first time, then ... My tests against the SQL query: ...
    (perl.dbi.users)
  • Re: Problem reattaching databases
    ... its my first time to code in vb 6... ... a proble with my insert into statement... ... Runtime Error '2147217900 ' ... Conn.Execute (SQL) ...
    (microsoft.public.vb.general.discussion)