Re: pgsqODBC binding parameters II (fwd)

From: Ludek Finstrle <xfinstrl(at)informatics(dot)muni(dot)cz>
To: Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp>
Cc: pgsql-odbc(at)postgresql(dot)org
Subject: Re: pgsqODBC binding parameters II (fwd)
Date: 2001-03-26 07:27:18
Message-ID: 20010326092718.F6613@anxur.fi.muni.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

> > diff -iwaru postsrc-orig/execute.c postsrc-patched/execute.c
> > --- postsrc-orig/execute.c Fri Mar 23 10:37:47 2001
> > +++ postsrc-patched/execute.c Fri Mar 23 10:55:56 2001
> > @@ -778,33 +778,46 @@
>
> [snip]
>
> > + else
> > + {
> > + mylog("DataPut other cbValue = %d,
> > rgbValue = %l d\n",current_param->buflen,*((SDWORD *) rgbValue));
> > + current_param->EXEC_buffer =
> > malloc(current_param->buflen);
>
> Does SQLPutData() come to this place in your test case ?

Yes, it does.

> What is a real cbValue(the 3rd parameter of SQLPutData) ?

I don't test it. I try it and note a message.

> And how does the above mylog() display in reality ?

I think (not sure):
DataPut other cbValue = 4, rgbValue = 4

> Are your paramters integers only ?

Unfortunately yes.

> Reading SQLPutData's spec together with SQLBindParameter's

Where can I find these spec?

> one, I couldn't find any description that the 9-th parameter of
> SQLBindParameter could specifiy the SQLPutData's data length.
> According to SQLPutData's spec, the length seems to be
> determined by the type of the parameter though I'm not sure.

I copy it from string version and delete +1 (length). I think this
is good way. Length can't be determined by the type. CHAR or VARCHAR
could have different lengths.

Luf

In response to

Responses

Browse pgsql-odbc by date

  From Date Subject
Next Message Hiroshi Inoue 2001-03-26 08:20:05 Re: pgsqODBC binding parameters II (fwd)
Previous Message Peter Eisentraut 2001-03-24 23:45:22 Re: odbc/UnixWare 7.1.1: No Go.