PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: Michael Peppler <mpeppler at MBAY dot NET>
Subject: Re: ANNOUNCE: DBD::Sybase 0.06
Date: Nov 3 1997 11:09PM

It appears that I've been coding in perl too much, and can't even
get a simple call to strcpy() right anymore.

Here's a patch that fixes the problem:

*** /tmp/T0a000WK	Mon Nov  3 14:52:31 1997
--- dbdimp.c	Mon Nov  3 14:37:08 1997
***************
*** 381,387 ****
  	extractFromDsn("language=", dsn, language, 64);
  	extractFromDsn("interfaces=", dsn, ifile, 255);
      } else {
! 	strcpy(dsn, server);
      }
  
      if(ifile[0]) {
--- 381,387 ----
  	extractFromDsn("language=", dsn, language, 64);
  	extractFromDsn("interfaces=", dsn, ifile, 255);
      } else {
! 	strcpy(server, dsn);
      }
  
      if(ifile[0]) {


This patch is needed to make things work if you have scripts
that use
	
	$dbh = DBI->connect('dbi:Sybase:SERVER_NAME', etc...)

It is not needed if you use the DSQUERY environment variable to
set the server name, or if you use the new

	$dbh = DBI->connect('dbi:Sybase:server=SERVER_NAME', etc...)

syntax.

Michael



Dion Almaer wrote:
> 
> At 10:36 AM 11/3/97 -0800, Michael Peppler proclaimed:
> 
> Hmm... installation didn't work for me.
> 
> PERL_DL_NONLAZY=1 /usr/global/bin/perl5.004 -I./blib/arch -I./blib/lib
> -I/usr/global/lib/perl5.004/sun4-solaris/5.004 -I/usr/global/lib/perl5.004
> -e 'use Test::Harness qw(&runtests $verbose); $verbose=0; runtests @ARGV;'
> t/*.t
> t/base..............ok
> t/main..............Unable for connect to MSI: Open Client Message:
> Message number: LAYER = (6) ORIGIN = (8) SEVERITY = (5) NUMBER = (3)
> Message String: ct_connect(): directory service layer: internal directory
> control layer error: Requested server name not found.
> dubious
>         Test returned status 13 (wstat 3328)
> DIED. FAILED tests 2-12
>         Failed 11/12 tests, 8.33% okay
> Failed Test  Status Wstat Total Fail  Failed  List of failed
> ------------------------------------------------------------------------------
> t/main.t         13  3328    12   11  91.67%  2-12
> Failed 1/2 test scripts, 50.00% okay. 11/17 subtests failed, 35.29% okay.
> make: *** [test_dynamic] Error 2
> 
> --
> 
> seems that although it is finding the right server name (MSI for me not
> SYBASE)
> it doesn't send that to connect?
> 
> more info:
> 
> dion@skywalker [/usr/global/src/perlmods/DBD-Sybase-0.06]> perl -V
> Summary of my perl5 (5.0 patchlevel 2) configuration:
>   Platform:
>     osname=solaris, osver=2.5, archname=sun4-solaris
>     uname='sunos genesis 5.5 generic sun4m sparc sunw,sparcstation-5 '
>     hint=recommended, useposix=true
>   Compiler:
>     cc='cc', optimize='-O', gccversion=2.5.6
>     cppflags='-I/usr/local/include'
>     ccflags ='-I/usr/local/include'
>     stdchar='unsigned char', d_stdstdio=define, usevfork=false
>     voidflags=15, castflags=0, d_casti32=define, d_castneg=define
>     intsize=4, alignbytes=8, usemymalloc=y, randbits=15
>   Linker and Libraries:
>     ld='cc', ldflags =' -L/usr/local/lib -L/opt/gnu/lib'
>     libpth=/usr/local/lib /opt/gnu/lib /lib /usr/lib /usr/ccs/lib
>     libs=-lsocket -lnsl -ldl -lm -lc -lcrypt
>     libc=/lib/libc.so, so=so
>   Dynamic Linking:
>     dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=, ccdlflags=' '
>     cccdlflags='-fpic', lddlflags='-G -L/usr/local/lib -L/opt/gnu/lib'
> 
> Sybase Version: SQL Server/11.0.1/P/Sun_svr4/OS 5.4/1/OPT/Tue Apr  9
> 21:25:40 PDT 1996
> 
> Dion
> 
> .. I have just uploaded DBD::Sybase 0.06 to PAUSE.
> ..
> .. This version fixes the bug I discoverd on Friday (ie inability to
> .. execute certain DDL type SQL (statements like CREATE TABLE, etc).
> .. This was due to an incorrect understanding (on my part) of how
> .. the AutoCommit attribute gets set - meaning that AutoCommit was
> .. always false!
> ..
> .. This new release also includes dbschema.pl (ported from sybperl's
> .. Sybase::DBlib module). dbschema.pl is a script that extracts (nearly)
> .. all the DDL for a Sybase database and creates an isql script
> .. that can be used to recreate the database (without the data, of
> .. course).
> ..
> .. I have also added the ability to specify an alternate interfaces
> .. file in the connect() call for the case where you have multiple
> .. interfaces files.
> ..
> .. If you are using DBD::Syabse please take a look at this new
> .. version and report any problems (and successes!!!) to me.
> ..
> .. As usual this release is available now from my homepage, and in a
> .. day or so from your local CPAN site in /authors/id/MEWP.
> ..
> .. Thanks.
> ..
> .. Michael
> .. --
> .. Michael Peppler       -||-  Data Migrations Inc.
> .. mpeppler@datamig.com  -||-  http://www.mbay.net/~mpeppler
> .. Return-Path: 
> .. Received: from mail.mbay.net by kiruna.mbay.net (SMI-8.6/SMI-SVR4)
> ..      id KAA01441; Mon, 3 Nov 1997 10:25:15 -0800
> .. Received: from franz.ww.TU-Berlin.DE (franz.ww.TU-Berlin.DE
> [130.149.200.51]) by otter.mbay.net (8.8.5/8.6.12) with ESMTP id KAA25604
> for ; Mon, 3 Nov 1997 10:22:29 -0800
> .. Received: (from root@localhost) by franz.ww.TU-Berlin.DE (8.7.3/8.7.3) id
> TAA17558; Mon, 3 Nov 1997 19:22:12 +0100 (CET)
> .. Date: Mon, 3 Nov 1997 19:22:12 +0100 (CET)
> .. Message-Id: <199711031822.TAA17558@franz.ww.TU-Berlin.DE>
> .. Subject: Upload to the Perl Authors Upload Server
> .. To: "Michael Peppler" , koenig@franz.ww.TU-Berlin.DE
> .. From: PAUSE 
> .. X-Filter: mailagent [version 3.0 PL44] for mpeppler@mbay.net
> ..
> .. The uploaded file
> ..
> ..     DBD-Sybase-0.06.tar.gz
> ..
> .. has been added to PAUSE as
> ..
> ..   file: $CPAN/authors/id/MEWP/DBD-Sybase-0.06.tar.gz
> ..   size: 26624 bytes
> ..    md5: 166cabfc54eb41abec998e909c388920
> ..
> .. No action is required on your part
> .. Request entered by: MEWP (Michael Peppler)
> .. Request entered on: Mon, 03 Nov 1997 18:20:54 GMT
> .. Request completed:  Mon, 03 Nov 1997 18:22:12 GMT
> ..
> ..      Virtually Yours,
> ..      Id: paused,v 1.33 1997/10/12 11:23:45 k Exp k
> ..
> ..
> ..
> --
> o---------------------------------------------------------------------o
> |   /\ /\  | M e m b e r  S e r v i c e s  I n t e r n a t i o n a l  |
> + /\\ \\ \ +    Dion Almaer       o   Technical Director              +
> | \/ \/ \/ |  dion@member.com     o   http://www.member.com/~dion     |
> o---------------------------------------------------------------------o

-- 
Michael Peppler       -||-  Data Migrations Inc.
mpeppler@datamig.com  -||-  http://www.mbay.net/~mpeppler