Solved

Using the Sage ODBC Connection with C#.NET

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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
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…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

743 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

15 Experts available now in Live!

Get 1:1 Help Now