Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ODBC against Sage database ?

Status
Not open for further replies.

StevenK

Programmer
Jan 5, 2001
1,294
GB
Am I able to use DataTables and the like against a Sage database ?
I've succeeded in retrieving data from Paradox tables and an Interbase database but when I try and access data from something like a Sage database (using an OdbcConnection, etc.) I get an error indicating :
Microsoft.Data.Odbc.OdbcException : ERROR[IM001] [Microsoft][ODBC Driver Manager] Driver does not support this function at Microsoft.Data.Odbc.OdbcException.HandleError(IntPtr hHandle,..) ..... etc.

Has anyone got suggestions as to how I might be able to view data in this kind of database ?

I have an appropriate ODBC connection set up to the SAGE database and can view the data in the various tables using a tool like 'SQL Explorer' (Borland).

Any help would be appreciated.

Thanks in advance
Steve
 
Steven,

I have no idea for am absolute fix that would work perfect. But if all else fails, you could try linking via ODBC to Access and then trying to get the Access table in your code. That is if your file isn't extremely huge and doesn't need the ultimate as far as speed.
 
I'm dealing with a Sage Line 50 database - does your thought still stand ?
Steve
 
I haven't ever used Sage. Can you see the actual driver in .Net if you were to make a new data source without ODBC? That might be worth a shot as well. For example, since .Net by default doesn't support the old ODBC, I have been able to create a connection to AS400 with the IBM drivers as part of the connection string. Now the problem I had is that I could not build a query with the wizard, I had to make it in code, or it would freeze up.

Try using the actual driver with an OleDbConnection if you can, or try using the Access thing if you want. Are you using the new ODBC (ODBC.Net I belive?) or trying to use the old ODBC?
 
The connection does open OK to the data I point it to - or at least that's the indication I get when I check the Connection's State and it indicates that its ConnectionState.Open
The problem is when I try to make use of a DataTable and DataAdapter and populate it - that is when I get the error message as detailed in my first post.

Any further thoughts would be appreciated.
Steve
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top