Received: from magus.postgresql.org ([87.238.57.229]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TB5kI-0000kn-02 for pgsql-odbc@postgresql.org; Mon, 10 Sep 2012 15:17:54 +0000 Received: from nm40-vm6.bullet.mail.sg3.yahoo.com ([106.10.151.221]) by magus.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1TB5kC-0004Va-Pu for pgsql-odbc@postgresql.org; Mon, 10 Sep 2012 15:17:53 +0000 Received: from [106.10.166.125] by nm40.bullet.mail.sg3.yahoo.com with NNFMP; 10 Sep 2012 15:17:45 -0000 Received: from [106.10.151.254] by tm14.bullet.mail.sg3.yahoo.com with NNFMP; 10 Sep 2012 15:17:45 -0000 Received: from [127.0.0.1] by omp1003.mail.sg3.yahoo.com with NNFMP; 10 Sep 2012 15:17:45 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 454812.46817.bm@omp1003.mail.sg3.yahoo.com Received: (qmail 23464 invoked by uid 60001); 10 Sep 2012 15:17:45 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.in; s=s1024; t=1347290265; bh=cw5rrnhTozyLo6gKgzbRf2rYyJjDQ6ZJ9CIgEHETWNQ=; h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=eLVeHfanXoEDbjiwuRomJGT/py5Ff2GQnfTl+cbpetjPad+T4UJPrPRZQmfBaQlg3qpSYXHHiH8zJ+CWj78oB6P4ZeTkrS3LMP7p60CMNImpqNg+kingiLx57wXKeCiC4WkaVL9yMC6MXhBeYNJx6R4CJL1DNv/NHTlufJ6gRRQ= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.co.in; h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=a8QOJXnn9qpotqpj3UG7HpZg38mXBueJmDGmujLUv0z7d7D5ubiQfujU93DOXNlJLEdHeNV60PgFfA86YxusKsdaU2E3hE8I2HcDMMVyQAM/5yvqZsaklW/9nB0MX0nQX+tAzcORMqSUV0VtKv3wEpXAOm/j1QPV7oTgyxor5ek=; X-YMail-OSG: 9LIcnToVM1mhHS.DPhnfW1ppikVLAVagbIJeNifX.kgf3s7 uYgnVC3TXJv4N28FCBgnJVgrGroqyMvGS23Tw7IF.W3PKvDSmJ0mRpcnCyEM QfBWm91WH.Gx.uY08Xo9GlFZw1z0NRh_oDrL5rlrqEfUrO0ZkMJVuWU8h7XE dHU3JI.LATpO0RghJtnIXGzdFU8yEuOIOiPHMaYKvmZ2M3grDg162Sc.D6Fg cWIt.oE3uCl5goVcQxnVQfuSGCDuGORgEQqi7rYe5geofYWsWrP_z8AIqPGR q4Xwe6RFRdruJOuuqe_yaxTH3WAkvJKCdtbiYKkMMpKJP.TfhQkO05oSfK_C FmqLJEN8JBLRcCHjBythPr4fJ_lNE.2RuKDl6WFh3JXcu1P8r.ImIbJhmaYQ x9vWkf7OnAJnqgJyUe96RgrssXXrH1dKoysalyLNb9ZOtt6z.BWtzbXfssSl psYqhCrY6BkuSqpBO72XZm1YY Received: from [124.123.213.178] by web190001.mail.sg3.yahoo.com via HTTP; Mon, 10 Sep 2012 23:17:45 SGT X-Mailer: YahooMailWebService/0.8.121.416 References: <1343892323.97562.YahooMailNeo@web190004.mail.sg3.yahoo.com> <1347251524.26745.YahooMailNeo@web190003.mail.sg3.yahoo.com> <504DF9BF.3030602@winpg.jp> Message-ID: <1347290265.7494.YahooMailNeo@web190001.mail.sg3.yahoo.com> Date: Mon, 10 Sep 2012 23:17:45 +0800 (SGT) From: ranjeeth kumar Reply-To: ranjeeth kumar Subject: Re: Regarding PostgreSQL BIT datatype binding in ODBC....... To: Hiroshi Saito Cc: "pgsql-odbc@postgresql.org" In-Reply-To: <504DF9BF.3030602@winpg.jp> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="-476051886-541512480-1347290265=:7494" X-Pg-Spam-Score: -0.6 (/) X-Archive-Number: 201209/13 X-Sequence-Number: 10952 ---476051886-541512480-1347290265=:7494 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Hello Saito,=0A=0AThanks a lot for your response.=0AI tried using SQL_C_TCH= AR and SQL_CHAR as you suggested but I still get the same "Incorrect binary= data format in bind parameter" error.=0A=0AI am not sure if I am missing s= omething here...=0A=0A=0AThanks and Regards,=0ARanjeeth.=0A=0A=0A=0A_______= _________________________=0A From: Hiroshi Saito =0ATo: r= anjeeth kumar =0ACc: "pgsql-odbc@postgresql.org= " =0ASent: Monday, 10 September 2012 8:01 PM=0A= Subject: Re: [ODBC] Regarding PostgreSQL BIT datatype binding in ODBC......= .=0A =0AHi.=0A=0AIs this helpful to you?=0Aone example)=0A=3D=3D odbc=0ASQL= TCHAR kd[100];=0Astrcpy(kd, "1101010101");=0A...=0ASQLPrepare(hstmt, "INSER= T INTO bbb VALUES (?)", SQL_NTS);=0ASQLBindParameter(hstmt, (SQLUSMALLINT)1= , SQL_PARAM_INPUT,=0A=A0=A0=A0 SQL_C_TCHAR, SQL_CHAR, 0, 0, &kd[0], 100, &l= en);=0A=3D=3D psql=0Apostgres=3D# select * from bbb;=0A=A0 =A0 key=0A-----= -------=0A=A0 1101010101=0A=0ARegards,=0AHiroshi Saito=0A=0A(2012/09/10 13:= 32), ranjeeth kumar wrote:=0A> Hello All,=0A>=0A> I have a table with a bit= (10) type colmn. I can insert "1010110110" into=0A> that column from PSQL.= =0A> i.e.,=0A> postgres=3D# insert into public.ranc2b values(1,'1101010101'= );=0A> INSERT 0 1=0A>=0A> I want to insert the same character data "1010110= 110" into the same=0A> bit(10) typed column from an ODBC application progra= m,=0A> Can somebody please suggest me how should I bind the data in the=0A>= SQLBindParameter call.=0A>=0A> I tried to bind the data as SQL_BINARY and = SQL_CHAR but I got Incorrect=0A> binary data format error.=0A>=0A> Quick he= lp is appreciated.=0A>=0A> Thanks in Advance.=0A>=0A> Regards,=0A> Ranjeeth= . ---476051886-541512480-1347290265=:7494 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable
Hello Sait= o,

Thank= s a lot for your response.
I tried using SQL_C_TCHAR and SQL_CHAR as you sugg= ested but I still get the same "Incorrect binary data format in bind parame= ter" error.
I am not sure if I am missing something here...


Thanks and Regards,
Ranjeeth.


Fr= om: Hiroshi Saito <hiroshi@winpg.jp>
To: ranjeeth kumar <ranjeeth_cool@yahoo.= co.in>
Cc: "pgsql-o= dbc@postgresql.org" <pgsql-odbc@postgresql.org>
Sent: Monday, 10 September 2012 8:01 PM<= br> Subject: Re: [ODBC] Re= garding PostgreSQL BIT datatype binding in ODBC.......

Hi.

Is t= his helpful to you?
one example)
=3D=3D odbc
SQLTCHAR kd[100];
= strcpy(kd, "1101010101");
...
SQLPrepare(hstmt, "INSERT INTO bbb VALU= ES (?)", SQL_NTS);
SQLBindParameter(hstmt, (SQLUSMALLINT)1, SQL_PARAM_IN= PUT,
    SQL_C_TCHAR, SQL_CHAR, 0, 0, &kd[0], 100, &a= mp;len);
=3D=3D psql
postgres=3D# select * from bbb;
   = key
------------
  1101010101

Regards,
Hiroshi Saito=

(2012/09/10 13:32), ranjeeth kumar wrote:
> Hello All,
>= ;
> I have a table with a bit(10) type colmn. I can insert "101011011= 0" into
> that column from PSQL.
> i.e.,
> postgres=3D# i= nsert into public.ranc2b values(1,'1101010101');
> INSERT 0 1
>=
> I want to insert the same character data "1010110110" into the sam= e
> bit(10) typed column from an ODBC application program,
> Ca= n somebody please suggest me how should I bind the data in the
> SQLBi= ndParameter call.
>
> I tried to bind the data as SQL_BINARY an= d SQL_CHAR but I got Incorrect
> binary data format error.
>> Quick help is appreciated.
>
> Thanks in Advance.
>=
> Regards,
> Ranjeeth.


---476051886-541512480-1347290265=:7494--