pg.ddx.io pgsql-odbc@postgresql.org mailing list archive
help / color / mirror / Atom feedRegarding PostgreSQL BIT datatype binding in ODBC.......
6+ messages / 2 participants
[nested] [flat]
* Regarding PostgreSQL BIT datatype binding in ODBC.......
@ 2012-08-02 07:25 ranjeeth kumar <ranjeeth_cool@yahoo.co.in>
2012-09-10 04:32 ` Re: Regarding PostgreSQL BIT datatype binding in ODBC....... ranjeeth kumar <ranjeeth_cool@yahoo.co.in>
0 siblings, 1 reply; 6+ messages in thread
From: ranjeeth kumar @ 2012-08-02 07:25 UTC (permalink / raw)
To: pgsql-odbc
Hello All,
I am new to this mailing list and this is my first post :)
I want to pass numeric data (2345) into a PostgreSQL BIT datatype column bit(1) using dynamic sql thru ODBC. I very much understand the risk of data getting truncated...
On PSQL, I simply can do -- insert into tab values(CAST(2345 AS BIT(1))) to acheive what i want (and I understand only 1 would get inserted). But I want to do this through ODBC and dynamic sql.
I will have to prepare my query as
insert into tab values(CAST(? AS bit(1));
then bind 2345 and then execute the statement.
Can someone help me on how the binding should happen...
I mean wat should be the "ValueType" and the "ParameterType" etc. in the call to the SQLBindParameter function....
SQLRETURN SQLBindParameter(
SQLHSTMT StatementHandle,
SQLUSMALLINT ParameterNumber,
SQLSMALLINT InputOutputType,
SQLSMALLINT ValueType,
SQLSMALLINT ParameterType,
SQLULEN ColumnSize,
SQLSMALLINT DecimalDigits,
SQLPOINTER ParameterValuePtr,
SQLLEN BufferLength,
SQLLEN * StrLen_or_IndPtr);
Quick help is appreciated and additional inputs/coments are also most welcome...
Thanks and Regards,
Ranjeeth. =
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Regarding PostgreSQL BIT datatype binding in ODBC.......
2012-08-02 07:25 Regarding PostgreSQL BIT datatype binding in ODBC....... ranjeeth kumar <ranjeeth_cool@yahoo.co.in>
@ 2012-09-10 04:32 ` ranjeeth kumar <ranjeeth_cool@yahoo.co.in>
2012-09-10 14:31 ` Re: Regarding PostgreSQL BIT datatype binding in ODBC....... Hiroshi Saito <hiroshi@winpg.jp>
0 siblings, 1 reply; 6+ messages in thread
From: ranjeeth kumar @ 2012-09-10 04:32 UTC (permalink / raw)
To: pgsql-odbc
Hello All,
I have a table with a bit(10) type colmn. I can insert "1010110110" into that column from PSQL.
i.e.,
postgres=# insert into public.ranc2b values(1,'1101010101');
INSERT 0 1
I want to insert the same character data "1010110110" into the same bit(10) typed column from an ODBC application program,
Can somebody please suggest me how should I bind the data in the SQLBindParameter call.
I tried to bind the data as SQL_BINARY and SQL_CHAR but I got Incorrect binary data format error.
Quick help is appreciated.
Thanks in Advance.
Regards,
Ranjeeth.
________________________________
From: ranjeeth kumar <ranjeeth_cool@yahoo.co.in>
To: "pgsql-odbc@postgresql.org" <pgsql-odbc@postgresql.org>
Sent: Thursday, 2 August 2012 12:55 PM
Subject: Regarding PostgreSQL BIT datatype binding in ODBC.......
Hello All,
I am new to this mailing list and this is my first post :)
I want to pass numeric data (2345) into a PostgreSQL BIT datatype column bit(1) using dynamic sql thru ODBC. I very much understand the risk of data getting truncated...
On PSQL, I simply can do -- insert into tab values(CAST(2345 AS BIT(1))) to acheive what i want (and I understand only 1 would get inserted). But I want to do this through ODBC and dynamic sql.
I will have to prepare my query as
insert into tab values(CAST(? AS bit(1));
then bind 2345 and then execute the statement.
Can someone help me on how the binding should happen...
I mean wat should be the "ValueType" and the "ParameterType" etc. in the call to the SQLBindParameter function....
SQLRETURN SQLBindParameter(
SQLHSTMT StatementHandle,
SQLUSMALLINT ParameterNumber,
SQLSMALLINT InputOutputType,
SQLSMALLINT ValueType,
SQLSMALLINT ParameterType,
SQLULEN ColumnSize,
SQLSMALLINT DecimalDigits,
SQLPOINTER ParameterValuePtr,
SQLLEN BufferLength,
SQLLEN * StrLen_or_IndPtr);
Quick help is appreciated and additional inputs/coments are also most welcome...
Thanks and Regards,
Ranjeeth.
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Regarding PostgreSQL BIT datatype binding in ODBC.......
2012-08-02 07:25 Regarding PostgreSQL BIT datatype binding in ODBC....... ranjeeth kumar <ranjeeth_cool@yahoo.co.in>
2012-09-10 04:32 ` Re: Regarding PostgreSQL BIT datatype binding in ODBC....... ranjeeth kumar <ranjeeth_cool@yahoo.co.in>
@ 2012-09-10 14:31 ` Hiroshi Saito <hiroshi@winpg.jp>
2012-09-10 15:17 ` Re: Regarding PostgreSQL BIT datatype binding in ODBC....... ranjeeth kumar <ranjeeth_cool@yahoo.co.in>
0 siblings, 1 reply; 6+ messages in thread
From: Hiroshi Saito @ 2012-09-10 14:31 UTC (permalink / raw)
To: ranjeeth kumar <ranjeeth_cool@yahoo.co.in>; +Cc: pgsql-odbc
Hi.
Is this helpful to you?
one example)
== odbc
SQLTCHAR kd[100];
strcpy(kd, "1101010101");
...
SQLPrepare(hstmt, "INSERT INTO bbb VALUES (?)", SQL_NTS);
SQLBindParameter(hstmt, (SQLUSMALLINT)1, SQL_PARAM_INPUT,
SQL_C_TCHAR, SQL_CHAR, 0, 0, &kd[0], 100, &len);
== psql
postgres=# 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 "1010110110" into
> that column from PSQL.
> i.e.,
> postgres=# insert into public.ranc2b values(1,'1101010101');
> INSERT 0 1
>
> I want to insert the same character data "1010110110" into the same
> bit(10) typed column from an ODBC application program,
> Can somebody please suggest me how should I bind the data in the
> SQLBindParameter call.
>
> I tried to bind the data as SQL_BINARY and SQL_CHAR but I got Incorrect
> binary data format error.
>
> Quick help is appreciated.
>
> Thanks in Advance.
>
> Regards,
> Ranjeeth.
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Regarding PostgreSQL BIT datatype binding in ODBC.......
2012-08-02 07:25 Regarding PostgreSQL BIT datatype binding in ODBC....... ranjeeth kumar <ranjeeth_cool@yahoo.co.in>
2012-09-10 04:32 ` Re: Regarding PostgreSQL BIT datatype binding in ODBC....... ranjeeth kumar <ranjeeth_cool@yahoo.co.in>
2012-09-10 14:31 ` Re: Regarding PostgreSQL BIT datatype binding in ODBC....... Hiroshi Saito <hiroshi@winpg.jp>
@ 2012-09-10 15:17 ` ranjeeth kumar <ranjeeth_cool@yahoo.co.in>
2012-09-11 13:23 ` Re: Regarding PostgreSQL BIT datatype binding in ODBC....... Hiroshi Saito <hiroshi@winpg.jp>
0 siblings, 1 reply; 6+ messages in thread
From: ranjeeth kumar @ 2012-09-10 15:17 UTC (permalink / raw)
To: Hiroshi Saito <hiroshi@winpg.jp>; +Cc: pgsql-odbc
Hello Saito,
Thanks a lot for your response.
I tried using SQL_C_TCHAR and SQL_CHAR as you suggested but I still get the same "Incorrect binary data format in bind parameter" error.
I am not sure if I am missing something here...
Thanks and Regards,
Ranjeeth.
________________________________
From: Hiroshi Saito <hiroshi@winpg.jp>
To: ranjeeth kumar <ranjeeth_cool@yahoo.co.in>
Cc: "pgsql-odbc@postgresql.org" <pgsql-odbc@postgresql.org>
Sent: Monday, 10 September 2012 8:01 PM
Subject: Re: [ODBC] Regarding PostgreSQL BIT datatype binding in ODBC.......
Hi.
Is this helpful to you?
one example)
== odbc
SQLTCHAR kd[100];
strcpy(kd, "1101010101");
...
SQLPrepare(hstmt, "INSERT INTO bbb VALUES (?)", SQL_NTS);
SQLBindParameter(hstmt, (SQLUSMALLINT)1, SQL_PARAM_INPUT,
SQL_C_TCHAR, SQL_CHAR, 0, 0, &kd[0], 100, &len);
== psql
postgres=# 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 "1010110110" into
> that column from PSQL.
> i.e.,
> postgres=# insert into public.ranc2b values(1,'1101010101');
> INSERT 0 1
>
> I want to insert the same character data "1010110110" into the same
> bit(10) typed column from an ODBC application program,
> Can somebody please suggest me how should I bind the data in the
> SQLBindParameter call.
>
> I tried to bind the data as SQL_BINARY and SQL_CHAR but I got Incorrect
> binary data format error.
>
> Quick help is appreciated.
>
> Thanks in Advance.
>
> Regards,
> Ranjeeth.
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Regarding PostgreSQL BIT datatype binding in ODBC.......
2012-08-02 07:25 Regarding PostgreSQL BIT datatype binding in ODBC....... ranjeeth kumar <ranjeeth_cool@yahoo.co.in>
2012-09-10 04:32 ` Re: Regarding PostgreSQL BIT datatype binding in ODBC....... ranjeeth kumar <ranjeeth_cool@yahoo.co.in>
2012-09-10 14:31 ` Re: Regarding PostgreSQL BIT datatype binding in ODBC....... Hiroshi Saito <hiroshi@winpg.jp>
2012-09-10 15:17 ` Re: Regarding PostgreSQL BIT datatype binding in ODBC....... ranjeeth kumar <ranjeeth_cool@yahoo.co.in>
@ 2012-09-11 13:23 ` Hiroshi Saito <hiroshi@winpg.jp>
2012-09-12 14:11 ` Re: Regarding PostgreSQL BIT datatype binding in ODBC....... Hiroshi Saito <hiroshi@winpg.jp>
0 siblings, 1 reply; 6+ messages in thread
From: Hiroshi Saito @ 2012-09-11 13:23 UTC (permalink / raw)
To: ranjeeth kumar <ranjeeth_cool@yahoo.co.in>; +Cc: pgsql-odbc
Hi.
Umm,
It can check in this simple test code.
Regards,
Hiroshi Saito
(2012/09/11 0:17), ranjeeth kumar wrote:
> Hello Saito,
>
> Thanks a lot for your response.
> I tried using SQL_C_TCHAR and SQL_CHAR as you suggested but I still get
> the same "Incorrect binary data format in bind parameter" error.
> I am not sure if I am missing something here...
>
>
> Thanks and Regards,
> Ranjeeth.
>
>
> ------------------------------------------------------------------------
> *From:* Hiroshi Saito <hiroshi@winpg.jp>
> *To:* ranjeeth kumar <ranjeeth_cool@yahoo.co.in>
> *Cc:* "pgsql-odbc@postgresql.org" <pgsql-odbc@postgresql.org>
> *Sent:* Monday, 10 September 2012 8:01 PM
> *Subject:* Re: [ODBC] Regarding PostgreSQL BIT datatype binding in
> ODBC.......
>
> Hi.
>
> Is this helpful to you?
> one example)
> == odbc
> SQLTCHAR kd[100];
> strcpy(kd, "1101010101");
> ...
> SQLPrepare(hstmt, "INSERT INTO bbb VALUES (?)", SQL_NTS);
> SQLBindParameter(hstmt, (SQLUSMALLINT)1, SQL_PARAM_INPUT,
> SQL_C_TCHAR, SQL_CHAR, 0, 0, &kd[0], 100, &len);
> == psql
> postgres=# 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 "1010110110" into
> > that column from PSQL.
> > i.e.,
> > postgres=# insert into public.ranc2b values(1,'1101010101');
> > INSERT 0 1
> >
> > I want to insert the same character data "1010110110" into the same
> > bit(10) typed column from an ODBC application program,
> > Can somebody please suggest me how should I bind the data in the
> > SQLBindParameter call.
> >
> > I tried to bind the data as SQL_BINARY and SQL_CHAR but I got Incorrect
> > binary data format error.
> >
> > Quick help is appreciated.
> >
> > Thanks in Advance.
> >
> > Regards,
> > Ranjeeth.
>
>
Attachments:
SQLBindParameter.c (text/plain, 2.5K) download
#ifdef WIN32
#include <windows.h>
#endif
#include <sqlext.h>
#include <stdio.h>
SQLTCHAR *DSNPrm= (SQLTCHAR*) "utfdb";
SQLTCHAR *DSNUid= (SQLTCHAR*) "";
SQLTCHAR *DSNPwd= (SQLTCHAR*) "";
char *droptbl = "DROP TABLE IF EXISTS utftest CASCADE";
char *createtbl = "CREATE TABLE utftest(name decimal(20,4))";
#define CHECK_STMT(x) \
if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) \
sqlerrexit(rc,SQL_HANDLE_STMT, x)
void sqlerrexit(RETCODE rc, SQLINTEGER type, SQLHANDLE handle)
{
SQLCHAR SqlState[6], *sq = &SqlState[0];
SQLCHAR Msg[SQL_MAX_MESSAGE_LENGTH], *ms = &Msg[0];
SQLWCHAR SqlStateW[6], *sqw = &SqlStateW[0];
SQLWCHAR MsgW[SQL_MAX_MESSAGE_LENGTH], *msw = &MsgW[0];
SQLINTEGER NativeError;
SQLSMALLINT i=1, MsgLen;
RETCODE ret;
int j;
printf("Error number : %d\n", rc);
while (SQL_SUCCEEDED(SQLGetDiagRec(type, handle, i++,
SqlState, &NativeError, Msg, sizeof(Msg), &MsgLen)) )
{
printf("State: %s Native Error Code: %d\n %s (%d)\n",
SqlState,NativeError,Msg, MsgLen);
}
return;
}
int main(int argc, char **argv)
{
SQLHENV henv;
SQLHDBC hdbc;
SQLHSTMT hstmt;
SQLCHAR utfstr[80];
SQLLEN lena, lenw;
RETCODE rc;
if (argc == 2)
DSNPrm = argv[1];
else
if (argc == 4)
{
DSNPrm = argv[1];
DSNUid = argv[2];
DSNPwd = argv[3];
}
else
if ((argc == 3)||(argc > 4))
{
printf("usage: ucode [DSN [UserID Password]]\n");
return 1;
}
SQLAllocHandle(SQL_HANDLE_ENV, NULL, &henv);
SQLSetEnvAttr(henv, SQL_ATTR_ODBC_VERSION,
(SQLPOINTER)SQL_OV_ODBC3, SQL_IS_INTEGER);
SQLAllocHandle(SQL_HANDLE_DBC, henv, &hdbc);
SQLConnect(hdbc, DSNPrm, SQL_NTS, DSNUid, SQL_NTS,
DSNPwd, SQL_NTS);
SQLAllocHandle(SQL_HANDLE_STMT, hdbc, &hstmt);
rc = SQLExecDirect(hstmt, (SQLCHAR*)droptbl, SQL_NTS);
CHECK_STMT(hstmt);
rc = SQLExecDirect(hstmt, (SQLCHAR*)createtbl, SQL_NTS);
CHECK_STMT(hstmt);
SQLPrepare(hstmt,
"insert into utftest(name) values (?)", SQL_NTS);
strcpy(utfstr, "44.47");
lenw = strlen(utfstr) * sizeof(SQLCHAR);
rc = SQLBindParameter(hstmt, 1, SQL_PARAM_INPUT, SQL_C_WCHAR,
SQL_WLONGVARCHAR, 0, 0, utfstr, 0, &lenw);
CHECK_STMT(hstmt);
rc = SQLExecute(hstmt);
CHECK_STMT(hstmt);
/* commit the transaction */
rc= SQLEndTran(SQL_HANDLE_DBC, hdbc, SQL_COMMIT);
CHECK_STMT(hstmt);
SQLFreeHandle(SQL_HANDLE_STMT, hstmt);
SQLDisconnect(hdbc);
SQLFreeHandle(SQL_HANDLE_DBC, hdbc);
SQLFreeHandle(SQL_HANDLE_ENV, henv);
}
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Regarding PostgreSQL BIT datatype binding in ODBC.......
2012-08-02 07:25 Regarding PostgreSQL BIT datatype binding in ODBC....... ranjeeth kumar <ranjeeth_cool@yahoo.co.in>
2012-09-10 04:32 ` Re: Regarding PostgreSQL BIT datatype binding in ODBC....... ranjeeth kumar <ranjeeth_cool@yahoo.co.in>
2012-09-10 14:31 ` Re: Regarding PostgreSQL BIT datatype binding in ODBC....... Hiroshi Saito <hiroshi@winpg.jp>
2012-09-10 15:17 ` Re: Regarding PostgreSQL BIT datatype binding in ODBC....... ranjeeth kumar <ranjeeth_cool@yahoo.co.in>
2012-09-11 13:23 ` Re: Regarding PostgreSQL BIT datatype binding in ODBC....... Hiroshi Saito <hiroshi@winpg.jp>
@ 2012-09-12 14:11 ` Hiroshi Saito <hiroshi@winpg.jp>
0 siblings, 0 replies; 6+ messages in thread
From: Hiroshi Saito @ 2012-09-12 14:11 UTC (permalink / raw)
To: ranjeeth kumar <ranjeeth_cool@yahoo.co.in>; +Cc: pgsql-odbc
Ooops sorry, different was sended....
Please this.
(2012/09/11 22:23), Hiroshi Saito wrote:
> Hi.
>
> Umm,
> It can check in this simple test code.
>
> Regards,
> Hiroshi Saito
>
> (2012/09/11 0:17), ranjeeth kumar wrote:
>> Hello Saito,
>>
>> Thanks a lot for your response.
>> I tried using SQL_C_TCHAR and SQL_CHAR as you suggested but I still get
>> the same "Incorrect binary data format in bind parameter" error.
>> I am not sure if I am missing something here...
>>
>>
>> Thanks and Regards,
>> Ranjeeth.
>>
>>
>> ------------------------------------------------------------------------
>> *From:* Hiroshi Saito <hiroshi@winpg.jp>
>> *To:* ranjeeth kumar <ranjeeth_cool@yahoo.co.in>
>> *Cc:* "pgsql-odbc@postgresql.org" <pgsql-odbc@postgresql.org>
>> *Sent:* Monday, 10 September 2012 8:01 PM
>> *Subject:* Re: [ODBC] Regarding PostgreSQL BIT datatype binding in
>> ODBC.......
>>
>> Hi.
>>
>> Is this helpful to you?
>> one example)
>> == odbc
>> SQLTCHAR kd[100];
>> strcpy(kd, "1101010101");
>> ...
>> SQLPrepare(hstmt, "INSERT INTO bbb VALUES (?)", SQL_NTS);
>> SQLBindParameter(hstmt, (SQLUSMALLINT)1, SQL_PARAM_INPUT,
>> SQL_C_TCHAR, SQL_CHAR, 0, 0, &kd[0], 100, &len);
>> == psql
>> postgres=# 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 "1010110110"
>> into
>> > that column from PSQL.
>> > i.e.,
>> > postgres=# insert into public.ranc2b values(1,'1101010101');
>> > INSERT 0 1
>> >
>> > I want to insert the same character data "1010110110" into the same
>> > bit(10) typed column from an ODBC application program,
>> > Can somebody please suggest me how should I bind the data in the
>> > SQLBindParameter call.
>> >
>> > I tried to bind the data as SQL_BINARY and SQL_CHAR but I got Incorrect
>> > binary data format error.
>> >
>> > Quick help is appreciated.
>> >
>> > Thanks in Advance.
>> >
>> > Regards,
>> > Ranjeeth.
>>
>>
>
>
>
>
Attachments:
SQLBindParameter_bittest.c (text/plain, 2.6K) download
/*
* cl SQLBindParameter_bittest.c /DWIN32 odbc32.lib
*/
#ifdef WIN32
#include <windows.h>
#endif
#include <sqlext.h>
#include <stdio.h>
SQLTCHAR *DSNPrm= (SQLTCHAR*) "PostgreSQL35W";
SQLTCHAR *DSNUid= (SQLTCHAR*) "";
SQLTCHAR *DSNPwd= (SQLTCHAR*) "";
char *droptbl = "DROP TABLE IF EXISTS bbb CASCADE";
char *createtbl = "CREATE TABLE bbb(key BIT(10) Primary Key)";
#define CHECK_STMT(x) \
if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) \
sqlerrexit(rc,SQL_HANDLE_STMT, x)
void sqlerrexit(RETCODE rc, SQLINTEGER type, SQLHANDLE handle)
{
SQLCHAR SqlState[6], *sq = &SqlState[0];
SQLCHAR Msg[SQL_MAX_MESSAGE_LENGTH], *ms = &Msg[0];
SQLWCHAR SqlStateW[6], *sqw = &SqlStateW[0];
SQLWCHAR MsgW[SQL_MAX_MESSAGE_LENGTH], *msw = &MsgW[0];
SQLINTEGER NativeError;
SQLSMALLINT i=1, MsgLen;
RETCODE ret;
int j;
printf("error number : %d\n", rc);
while (SQL_SUCCEEDED(SQLGetDiagRec(type, handle, i++,
SqlState, &NativeError, Msg, sizeof(Msg), &MsgLen)) )
{
printf("state: %s error code: %d\n %s (%d)\n",
SqlState, NativeError,Msg, MsgLen);
}
return;
}
int main(int argc, char **argv)
{
SQLHENV henv;
SQLHDBC hdbc;
SQLHSTMT hstmt;
SQLRETURN rc;
long len = SQL_NTS;
SQLTCHAR kd[100];
if (argc == 2)
DSNPrm = argv[1];
else
if (argc == 4)
{
DSNPrm = argv[1];
DSNUid = argv[2];
DSNPwd = argv[3];
}
else
if ((argc == 3)||(argc > 4))
{
printf("usage: [DSN [UserID Password]]\n");
return 1;
}
strcpy(kd, "1101010101");
SQLAllocHandle(SQL_HANDLE_ENV, NULL, &henv);
SQLSetEnvAttr(henv, SQL_ATTR_ODBC_VERSION,
(SQLPOINTER)SQL_OV_ODBC3, SQL_IS_INTEGER);
SQLAllocHandle(SQL_HANDLE_DBC, henv, &hdbc);
SQLConnect(hdbc, DSNPrm, SQL_NTS, DSNUid, SQL_NTS,
DSNPwd, SQL_NTS);
SQLAllocStmt(hdbc, &hstmt);
rc = SQLExecDirect(hstmt, (SQLCHAR*)droptbl, SQL_NTS);
CHECK_STMT(hstmt);
rc = SQLExecDirect(hstmt, (SQLCHAR*)createtbl, SQL_NTS);
CHECK_STMT(hstmt);
SQLPrepare(hstmt, "INSERT INTO bbb VALUES (?)",
SQL_NTS);
SQLBindParameter(hstmt, (SQLUSMALLINT)1, SQL_PARAM_INPUT, SQL_C_TCHAR,
SQL_CHAR, 0, 0, &kd[0], 100, &len);
rc = SQLExecute(hstmt);
CHECK_STMT(hstmt);
SQLFreeStmt(hstmt, SQL_DROP);
SQLDisconnect(hdbc);
SQLFreeConnect(hdbc);
SQLFreeEnv(henv);
return 0;
}
^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2012-09-12 14:11 UTC | newest]
Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2012-08-02 07:25 Regarding PostgreSQL BIT datatype binding in ODBC....... ranjeeth kumar <ranjeeth_cool@yahoo.co.in>
2012-09-10 04:32 ` ranjeeth kumar <ranjeeth_cool@yahoo.co.in>
2012-09-10 14:31 ` Hiroshi Saito <hiroshi@winpg.jp>
2012-09-10 15:17 ` ranjeeth kumar <ranjeeth_cool@yahoo.co.in>
2012-09-11 13:23 ` Hiroshi Saito <hiroshi@winpg.jp>
2012-09-12 14:11 ` Hiroshi Saito <hiroshi@winpg.jp>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox