Solved

Using the Sage ODBC Connection with C#.NET

Posted on 2004-10-07
3
1,306 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

895 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

11 Experts available now in Live!

Get 1:1 Help Now