Solved

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

Posted on 1998-12-29
1
348 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

757 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now