Skip to Content.
Sympa Menu

freetds - Re: [freetds] FreeTDS Digest, Vol 32, Issue 24

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: V mar <vpolv AT yahoo.com>
  • To: freetds AT lists.ibiblio.org
  • Subject: Re: [freetds] FreeTDS Digest, Vol 32, Issue 24
  • Date: Fri, 30 Sep 2005 13:43:09 -0700 (PDT)

can i get a small perl script to connect to sql server
database.

I am sorry, I am trying since last two, three using
freetds, no success.

thanks



--- freetds-request AT lists.ibiblio.org wrote:

> Send FreeTDS mailing list submissions to
> freetds AT lists.ibiblio.org
>
> To subscribe or unsubscribe via the World Wide Web,
> visit
> http://lists.ibiblio.org/mailman/listinfo/freetds
> or, via email, send a message with subject or body
> 'help' to
> freetds-request AT lists.ibiblio.org
>
> You can reach the person managing the list at
> freetds-owner AT lists.ibiblio.org
>
> When replying, please edit your Subject line so it
> is more specific
> than "Re: Contents of FreeTDS digest..."
>
>
> Today's Topics:
>
> 1. Problem with smalldates in SP (Carlo Andreoli)
> 2. Re: Problem with smalldates in SP (Lowden,
> James K)
>
>
>
----------------------------------------------------------------------
>
> Message: 1
> Date: Fri, 30 Sep 2005 03:39:58 +0200
> From: "Carlo Andreoli" <vespito AT vespito.com>
> Subject: [freetds] Problem with smalldates in SP
> To: <freetds AT lists.ibiblio.org>
> Message-ID: <00a201c5c55f$e0681650$0200a8c0@carlo>
> Content-Type: text/plain; format=flowed;
> charset="iso-8859-1";
> reply-type=original
>
> Hello,
> I run Freetds from FreeBSD. I connect to SQL
> Server with
>
> carlo@qs414% /usr/local/bin/odbctest
> "DSN=bla;UID=bla;PWD=bla"
>
> and I type the following stored procedure, that used
> to rule:
>
> SQL>execute SpInsertDaCda 0, 11, 142, 'chas',
> 'chas',
> '1990-05-12','british', 'm', '2005-08-12',
> '2005-09-30', 0, 6,0,0,2,0,'',0,0
>
> I get:
>
> [FreeTDS][SQL Server]The conversion of char data
> type to smalldatetime data
> type resulted in an out-of-range smalldatetime
> value., SQLSTATE=22007
> [FreeTDS][SQL Server]The statement has been
> terminated., SQLSTATE=01000
> [FreeTDS][SQL Server]Cannot insert the value NULL
> into column 'idUtente',
> table 'SYSMA4.dbo.autorizzazioni'; column does not
> allow nulls. INSERT
> fails., SQLSTATE=23000
> [FreeTDS][SQL Server]The statement has been
> terminated., SQLSTATE=01000
>
> Unfortunately, I don't control the stored procedure,
> but I've been told that
> it has not been modified since when it worked for
> me. Moreover, I've been
> told that the same sp works fine from asp pages.
>
> So, it looks like there's some problem with the
> dates. I tried other formats
> (dd-mm-yyyy, dd/mm/yyyy, yyyymmdd...), but I get the
> same error.
>
> In the sp, all three dates are defined as
> varchar(20) and then casted to
> smalldatetime.
>
> I tried this:
>
> SQL>select cast('2005-09-12' as smalldatetime)
>
> and it works fine, since I get: result set 1
> returned 1 rows.
>
> So, could anybody tell me what the problem could be
> or what I could do to
> debug?
> Thank you in advance for any help.
> Regards;
>
> Carlo.
>
>
>
>
> ------------------------------
>
> Message: 2
> Date: Fri, 30 Sep 2005 11:25:05 -0400
> From: "Lowden, James K" <LowdenJK AT bernstein.com>
> Subject: Re: [freetds] Problem with smalldates in SP
> To: "FreeTDS Development Group"
> <freetds AT lists.ibiblio.org>
> Message-ID:
>
>
<3778FAB3D61A7A40833F1CB3B8C173AA054FCCA6 AT AC2KAMA0107.ac.lp.acml.com>
> Content-Type: text/plain; charset="us-ascii"
>
> > From: Carlo Andreoli
> > Sent: Thursday, September 29, 2005 9:40 PM
> >
> > I run Freetds from FreeBSD. I connect to SQL
> Server with
> >
> > carlo@qs414% /usr/local/bin/odbctest
> "DSN=bla;UID=bla;PWD=bla"
> >
> > and I type the following stored procedure, that
> used to rule:
> >
> > SQL>execute SpInsertDaCda 0, 11, 142, 'chas',
> 'chas',
> > '1990-05-12','british', 'm', '2005-08-12',
> '2005-09-30', 0,
> > 6,0,0,2,0,'',0,0
> >
> > I get:
> >
> > [FreeTDS][SQL Server]The conversion of char data
> type to smalldatetime
> data
> > type resulted in an out-of-range smalldatetime
> value., SQLSTATE=22007
> ...
> > SQL>select cast('2005-09-12' as smalldatetime)
> >
> > and it works fine, since I get: result set 1
> returned 1 rows.
>
>
http://www.microsoft.com/technet/prodtechnol/sql/70/proddocs/diag/part3/
> 75528c12.mspx
> http://www.aspfaq.com/show.asp?id=2023
>
> This is SQL Server error #296, nothing to do with
> FreeTDS. To
> demonstrate that, turn on TDSDUMP and you'll see the
> error being
> returned by the server.
>
> I suspect either the language setting or the default
> date format is
> wrong (where "wrong" means "different from what you
> expect"). Cf. "SET
> DATEFORMAT" and "DBCC USEROPTIONS".
>
> HTH.
>
> --jkl
>
> -----------------------------------------
> The information contained in this transmission may
> be privileged and
> confidential and is intended only for the use of the
> person(s) named
> above. If you are not the intended recipient, or an
> employee or agent responsible
> for delivering this message to the intended
> recipient, any review, dissemination,
> distribution or duplication of this communication is
> strictly prohibited. If you are
> not the intended recipient, please contact the
> sender immediately by reply e-mail
> and destroy all copies of the original message.
> Please note that we do not accept
> account orders and/or instructions by e-mail, and
> therefore will not be responsible
> for carrying out such orders and/or instructions.
> If you, as the intended recipient
> of this message, the purpose of which is to inform
> and update our clients, prospects
> and consultants of developments relating to our
> services and products, would not
> like to receive further e-mail correspondence from
> the sender, please "reply" to the
> sender indicating your wishes. In the U.S.: 1345
> Avenue of the Americas, New York,
> NY 10105.
>
>
> ------------------------------
>
> _______________________________________________
> FreeTDS mailing list
> FreeTDS AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
>
=== message truncated ===




__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com



  • Re: [freetds] FreeTDS Digest, Vol 32, Issue 24, V mar, 09/30/2005

Archive powered by MHonArc 2.6.24.

Top of Page