Skip to Content.
Sympa Menu

freetds - Re: How to insert a '*' via FreeTDS / Microsoft SQL V7 etc?

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Bob Kline <bkline AT rksystems.com>
  • To: TDS Development Group <freetds AT franklin.oit.unc.edu>
  • Subject: Re: How to insert a '*' via FreeTDS / Microsoft SQL V7 etc?
  • Date: Wed, 16 Feb 2000 15:50:51 -0500 (EST)


On Wed, 16 Feb 2000, Karl Pielorz wrote:

> Hi All,
>
> I know this is off topic (probably) - and after having seen the
> difference between MySQL and MS-SQL V7 on inserting ' (quotes), I
> can probably guess where the problem lies (me)...
>
> Anyone know why I can't seem to insert a "*" (asterisk) into our
> MS-SQL V7 server via FreeTDS?
>
> I can do the same in Delphi (not a real good comparison) by just
> setting the column value to "*", alas not from PHP/FreeTDS though...
>
> Any suggestions, or pointers would be gratefuly received...

I can't tell why it's failing for you, because you haven't given us
nearly enough information. It works fine for me (on version 0.50,
tdsver 7.0):

#!/usr/bin/perl -w
use DBI;
my $dsn = $#ARGV >= 0 ? $ARGV[0] : "Sybase:database=XXX;server=XXX";
my $uid = $#ARGV >= 1 ? $ARGV[1] : "XXX";
my $pwd = $#ARGV >= 2 ? $ARGV[2] : "XXX";
my $dbh = DBI->connect("DBI:$dsn", "$uid", "$pwd") or die $DBI::errstr;
$dbh->do("INSERT INTO t VALUES('*')") or die $DBI::errstr;
$dbh->disconnect();

--
Bob Kline
mailto:bkline AT rksystems.com
http://www.rksystems.com





Archive powered by MHonArc 2.6.24.

Top of Page