Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

A  VC++ using ODBC / MS-SQL Server implementaion question...

Posted on 1998-12-29
1
Medium Priority
?
402 Views
Last Modified: 2008-02-20
SQLGetDiagRec returns the following error message from SQLBindParameter call:

HYC00       0       [Microsoft][ODBC SQL Server Driver]Optional feature not implemented

This is while attempting to bind variables using the following conversion:

struct bind_list
{
 SQLSMALLINT iotype;
 SQLPOINTER  valueptr;
 int         updateable;
 SQLSMALLINT paramtype;
 SQLINTEGER  bufferlen;
};

struct bind_list PMT_Bndlst[] =
{
 {SQL_C_CHAR  , pmtfl_currpay_dt  , FALSE, SQL_TYPE_DATE, (SDWORD)(sizeof(pmtfl_currpay_dt))},
 {SQL_C_CHAR  , pmtfl_lastpay_dt  , TRUE , SQL_TYPE_DATE, (SDWORD)(sizeof(pmtfl_lastpay_dt))},
 {SQL_C_CHAR  , pmtfl_nextpay_dt  , TRUE , SQL_TYPE_DATE, (SDWORD)(sizeof(pmtfl_nextpay_dt))},...

sample delcaration of variable is as folows:

char      pmtfl_lastpay_dt[24];

The data being queried is from MS-SQL Server, in a datetime field, appearing as follows:

1996-01-25 00:00:00.000

I have read the ODBC help docs and am unable to solve. Is this driver related? I need a solution to this problem.
0
Comment
Question by:c1fuller
1 Comment
 
LVL 2

Accepted Solution

by:
ginde earned 50 total points
ID: 1092400
You can use this workaround, use CONVERT function of SQLServer to convert Date in to a String and bind as SQL_C_CHAR.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have a large data set and a SSIS package. How can I load this file in multi threading?
What if you have to shut down the entire Citrix infrastructure for hardware maintenance, software upgrades or "the unknown"? I developed this plan for "the unknown" and hope that it helps you as well. This article explains how to properly shut down …
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question