Solved

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

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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

856 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