From ben at blackavar.com Thu Jul 10 11:00:36 2003 From: ben at blackavar.com (Ben Boulanger) Date: Mon Aug 2 21:33:08 2004 Subject: [Nh-pm] ODBC Connections Message-ID: Hi, I'm trying to setup an ODBC connection to a MSSQL Server. I've downloaded the DBD-ODBC module, but I'm just not familiar enough with ODBC.. Anyone have any experience with using perl (on linux) to do this? I'm not understanding how to get the Microsoft SQL Server driver setup to work here... Ben -- Keep your broken arm inside your sleeve. From pll at lanminds.com Thu Jul 10 12:59:25 2003 From: pll at lanminds.com (Paul L Lussier) Date: Mon Aug 2 21:33:08 2004 Subject: [Nh-pm] ODBC Connections In-Reply-To: Message from Ben Boulanger of "Thu, 10 Jul 2003 12:00:36 EDT." References: Message-ID: <20030710175926.6A652F5E2@tater> In a message dated: Thu, 10 Jul 2003 12:00:36 EDT Ben Boulanger said: >Hi, > I'm trying to setup an ODBC connection to a MSSQL Server. I've >downloaded the DBD-ODBC module, but I'm just not familiar enough with >ODBC.. Anyone have any experience with using perl (on linux) to do this? > >I'm not understanding how to get the Microsoft SQL Server driver setup to >work here... Never done this, but my understanding was that you should just need to write a connect line, which is pretty standard, and then everything else is either a prepare, or exec call on the DB handle? Do you have the DBD/DBI book? -- Seeya, Paul -- Key fingerprint = 1660 FECC 5D21 D286 F853 E808 BB07 9239 53F1 28EE It may look like I'm just sitting here doing nothing, but I'm really actively waiting for all my problems to go away. If you're not having fun, you're not doing it right! From fblack at docucorp.com Fri Jul 11 13:18:58 2003 From: fblack at docucorp.com (Black, Franklin) Date: Mon Aug 2 21:33:08 2004 Subject: [Nh-pm] RE: Nh-pm Digest, Vol 1, Issue 49 Message-ID: <60F043336182D3118E930050041891973D75B7@BED1CN02> use DBI::DBD; # simple test to make sure it's okay my $db; use Config; use Getopt::Long; use strict; my $db = DBI->connect('DBI:ODBC:,,) or die "Couldn't connect to database: " . DBI->errstr; my $SelLine="select * from table"; my $sth = $db->prepare("$SelLine") or die "Couldn't prepare statement: " . $dbh->errstr; $sth->execute(); my @Data; my $i; while (@Data = $sth->fetchrow_array()) { print @Data; } -----Original Message----- From: nh-pm-request@mail.pm.org [mailto:nh-pm-request@mail.pm.org] Sent: Friday, July 11, 2003 12:00 PM To: nh-pm@mail.pm.org Subject: Nh-pm Digest, Vol 1, Issue 49 Send Nh-pm mailing list submissions to nh-pm@mail.pm.org To subscribe or unsubscribe via the World Wide Web, visit http://mail.pm.org/mailman/listinfo/nh-pm or, via email, send a message with subject or body 'help' to nh-pm-request@mail.pm.org You can reach the person managing the list at nh-pm-owner@mail.pm.org When replying, please edit your Subject line so it is more specific than "Re: Contents of Nh-pm digest..." Today's Topics: 1. Re: ODBC Connections (Paul L Lussier) ---------------------------------------------------------------------- Message: 1 Date: Thu, 10 Jul 2003 13:59:25 -0400 From: Paul L Lussier Subject: Re: [Nh-pm] ODBC Connections To: Ben Boulanger Cc: NH Perlmongers Message-ID: <20030710175926.6A652F5E2@tater> In a message dated: Thu, 10 Jul 2003 12:00:36 EDT Ben Boulanger said: >Hi, > I'm trying to setup an ODBC connection to a MSSQL Server. I've >downloaded the DBD-ODBC module, but I'm just not familiar enough with >ODBC.. Anyone have any experience with using perl (on linux) to do this? > >I'm not understanding how to get the Microsoft SQL Server driver setup to >work here... Never done this, but my understanding was that you should just need to write a connect line, which is pretty standard, and then everything else is either a prepare, or exec call on the DB handle? Do you have the DBD/DBI book? -- Seeya, Paul -- Key fingerprint = 1660 FECC 5D21 D286 F853 E808 BB07 9239 53F1 28EE It may look like I'm just sitting here doing nothing, but I'm really actively waiting for all my problems to go away. If you're not having fun, you're not doing it right! ------------------------------ _______________________________________________ Nh-pm mailing list Nh-pm@mail.pm.org http://mail.pm.org/mailman/listinfo/nh-pm End of Nh-pm Digest, Vol 1, Issue 49 ************************************ From fblack at docucorp.com Tue Jul 22 15:32:58 2003 From: fblack at docucorp.com (Black, Franklin) Date: Mon Aug 2 21:33:08 2004 Subject: [Nh-pm] Record Errors Message-ID: <60F043336182D3118E930050041891973D75F2@BED1CN02> foreach my $rec (@farray1) { my @parray=@{$rec->{'parray}}; if(SearchForm($rec)==0) { print "$rec->{'rev'}\n"; } } This was working, now it says "Error after rev" Everytime I use the ->{}, I get an error. From andrew at broscom.com Tue Jul 22 16:04:33 2003 From: andrew at broscom.com (Andrew Brosnan) Date: Mon Aug 2 21:33:08 2004 Subject: [Nh-pm] Record Errors In-Reply-To: <60F043336182D3118E930050041891973D75F2@BED1CN02> Message-ID: On 7/22/03 at 3:32 PM, fblack@docucorp.com (Black, Franklin) wrote: > > > foreach my $rec (@farray1) > { > my @parray=@{$rec->{'parray}}; ^^^ unmatched ' > if(SearchForm($rec)==0) > { > print "$rec->{'rev'}\n"; > } > > > } > > > This was working, now it says "Error after rev" > > Everytime I use the ->{}, I get an error. > _______________________________________________ > Nh-pm mailing list > Nh-pm@mail.pm.org > http://mail.pm.org/mailman/listinfo/nh-pm >