Skip to Content.
Sympa Menu

freetds - RE: [freetds] Inserting data with stored procedure problem

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Michael Kochetkov" <Michael.Kochetkov AT synartra.com>
  • To: "'FreeTDS Development Group'" <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] Inserting data with stored procedure problem
  • Date: Fri, 15 Oct 2004 20:30:22 +0400

> > 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").
Please, take it easy. I am not a native English speaker and I cannot express
the humor or irony properly sometimes. The examples are public available and
may apear to be useful for your test perposes.

> 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...
Well, let us see if I will be able to think out a workaround. I have already
managed to scare our management guys with the necessity to spend a million
dollars for an ODBC-ODBC bridge.

> 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.
Thank you a lot for your help and suggestions. But the real situation is
that we are going to plunge into (or already plunged) a project we still do
not have all material for (our customer fault, I believe). So, FreeTDS, MS
SQL Server and the back-end ODBC libs we have already bought to make the
FreeTDS happy (functions sequence calls problem, if you remember) may appear
to be an intermediate solution - we just do not want to waste time and
started some works in advance. We believe we will have a lot of problems
with wide chars on our target system so we gave up the wide chars support
with a light heart. At least for now.

Thank you again for your help,
-
Michael Kochetkov.





Archive powered by MHonArc 2.6.24.

Top of Page