freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
RE: [freetds] Inserting data with stored procedure problem
- From: "ZIGLIO, Frediano, VF-IT" <Frediano.Ziglio AT vodafone.com>
- To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
- Subject: RE: [freetds] Inserting data with stored procedure problem
- Date: Fri, 15 Oct 2004 17:36:58 +0200
> Well, we are pretty in a hurry. So, I have had some time
> today and I have
> written some tests. Sorry, I was unable to do it several days ago.
> The code below is a little bit modified MSDN
> howto\odbc\ProcessReturnCodes\ProcessReturnCodes.cpp examle.
> But please,
> note that I need to be able to run "{? = call insertT2(1,?)}" call as
> prepared statement too. Though I might be able to change my
> framework to
> calls SPs the way you recommend for FreeTDS.
>
> Thank you for your help.
> -
> Michael Kochetkov.
>
> P.S. The test case code:
> ///////// (Portions copyright by MS MSDN)
> // if exists (select * from dbo.sysobjects where id =
> object_id(N'[dbo].[T2]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
> // drop table [dbo].[T2]
...
>
Thanks for example however I coded another based on your store procedure
and log (also I cannot use "Portions copyright by MS MSDN").
I did some test and I can provide quickly "{call insertT2(1,?)}" but not
"{?=call insertT2(1,?)}" (note "?=" prefix). The reason it's that mssql
do not prepare code that have return inside (you can put return only in
store procedure). Changing code to support correctly store procedure
with constants parameters it's too time expensive now...
About the support of wide character I have a possible work-around (not
tested):
- use unixODBC
- compile unixODBC to use iconv and ucs2 and utf8 as charsets (see
configure and documentation)
- configure FreeTDS to use utf8 encoding
- use *W functions (like SQLDescribeColW)
The only problem it's sending data to server... bind using larger
columns should work.
freddy77
-
RE: [freetds] Inserting data with stored procedure problem,
ZIGLIO, Frediano, VF-IT, 10/15/2004
- RE: [freetds] Inserting data with stored procedure problem, Michael Kochetkov, 10/15/2004
- <Possible follow-up(s)>
-
RE: [freetds] Inserting data with stored procedure problem,
ZIGLIO, Frediano, VF-IT, 10/15/2004
-
RE: [freetds] Inserting data with stored procedure problem,
Michael Kochetkov, 10/15/2004
- RE: [freetds] Inserting data with stored procedure problem, Michael Kochetkov, 10/23/2004
-
RE: [freetds] Inserting data with stored procedure problem,
Michael Kochetkov, 10/15/2004
Archive powered by MHonArc 2.6.24.