Solved

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

Posted on 1998-12-29
1
382 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
I have a large data set and a SSIS package. How can I load this file in multi threading?
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

756 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