Solved

Using the Sage ODBC Connection with C#.NET

Posted on 2004-10-07
3
1,348 Views
Last Modified: 2008-02-01
Hi,

I've got an ODBC connection through to a Sage database which connects without a problem, however when I try to perform any kind of commands on it I get the following exception:

System.Data.Odbc.OdbcException: ERROR [IM001] [Microsoft][ODBC Driver Manager] Driver does not support this function
   at System.Data.Odbc.OdbcConnection.HandleError(HandleRef hrHandle, SQL_HANDLE hType, RETCODE retcode)
   at System.Data.Odbc.OdbcDataReader.NextResult()
   at ODBCTest.Form1.button1_Click(Object sender, EventArgs e) in c:\mydocuments\visual studios projects\odbctest\form1.cs:line 116

I've tried to query it using DataAdapter and also using a DataReader, and neither have worked. And I've had massive difficulty finding any help either on with Internet or with the Sage resellers!

So... Can anyone give me an idea of how to query a table in a Sage database using C#.NET with the ODBC connector?

Cheers,

Ged
0
Comment
Question by:gedmatt
[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
3 Comments
 

Author Comment

by:gedmatt
ID: 12256753
Crikey! Answered my own question again!

The version of Sage I am accessing only allows reading and not writing, do using a DataAdapter is out. So I used a DataReader to source the data but still ended up getting the above error message.

Well on closer examination I found that with the DataReader I could get any data I needed, but for some reason I still get an exception thrown when I try to close it. Peculiar, maybe, but it "works" so I don't care...

Ged
0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 12481312
PAQed, with points refunded (250)

modulo
Community Support Moderator
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

Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

729 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