Skip to Content.
Sympa Menu

freetds - Re: FreeTDS 0.47/0.50 & MS-SQL 7.0 & DBD::Sybase 0.21

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Brian Bruns <camber AT umcc.ais.org>
  • To: TDS Development Group <freetds AT franklin.oit.unc.edu>
  • Subject: Re: FreeTDS 0.47/0.50 & MS-SQL 7.0 & DBD::Sybase 0.21
  • Date: Tue, 21 Dec 1999 06:22:43 -0500 (EST)


Can you turn on debugging? (set the TDSDUMP environment variable like:

export TDSDUMP=/tmp/freetds.log

and sent in the query packet from that log. DBD::Sybase does some
processing before sending it on, and I'd like to see what it looks like on
the wire.

Thanks,

Brian

On Mon, 20 Dec 1999, Mike Groeneweg wrote:

>
> Greetings,
>
> Does anybody have any tips on what possibly I am doing wrong (if it is
> me at all)?
>
> I was using FreeTDS 0.47 and DBD::Sybase 0.21 to talk to a MS SQL Server
> 7.0 system. They were talking okay - ie I could information into and out
> of the database... but every transaction that I did generated the
> message: 'Unknown Property 7'
>
> So, last last week, I was trawling around the 'net again, and saw that
> FreeTDS 0.50 was out. I compiled it up - the only flag I set were to
> force version 4.2 protocol and the --prefix install directory. I didn't
> change DBD::Sybase (version 0.21). My same perl program now cannot
> 'prepare' the SQL query, issuing an error message "Unclosed quotation
> mark before the character string '9002'".
>
> The code fragment from perl was this:
>
> my $inner_query = "SELECT primary_extension, last_name, first_name,
> udf1_recID, udf2_recID, udf17_recID,
> udf18_recID, udf19_recID, udf20_recID
> FROM subscriber
> WHERE primary_extension <> '$row[0]' AND
> udf1_recID = '$row[3]' AND
> udf2_recID = '$row[4]'
> ";
>
> then I do:
>
> my $sth2 = $dbh->prepare($inner_query);
>
> to debug it, I printed the $inner_query variable to make sure the SQL
> looked right, this is it:
>
> SELECT primary_extension, last_name, first_name,
> udf1_recID, udf2_recID, udf17_recID,
> udf18_recID, udf19_recID, udf20_recID
> FROM subscriber
> WHERE primary_extension <> '9002' AND
> udf1_recID = '611' AND
> udf2_recID = '1012'
>
> I've got code in before the $inner_query string is set, to ensure that
> any "'" (single quote) is quoted again - to comply with MS-SQL 7.0
> requirements (I assume same for Sybase).
>
> But as you can see, the $inner_query string - SQL SELECT statement -
> looks valid IMHO. What is going on? FreeTDS 0.47 will do it, but with
> the 'Unknown Property 7' and FreeTDS 0.50 just baulks completely.
>
> Other details: Perl is version 5.0502, DBD::Sybase is 0.21, running on
> an Ultra10, Solaris 7.0 with most of the latest patches.
>
> Any help appreciated.
>
> Thanks
> Mike Groeneweg
>
> --
>
> -=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=-
> ,-._|\ M.Groeneweg AT murdoch.edu.au
> / Oz \ Workstation & Network Officer
> x_,--._/ ITS Murdoch University
> v Western Australia
> Ph: (+618) 9360 2766 Fax: (+618) 9360 6156
> ``Vi is my shepherd, I shall not font.''
>
> ---
> You are currently subscribed to freetds as: camber AT ais.org
> To unsubscribe, forward this message to $subst('Email.Unsub')
>
>





Archive powered by MHonArc 2.6.24.

Top of Page