Solved

Using the Sage ODBC Connection with C#.NET

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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

733 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