.NET Development
SqlDataAccess with ODBC
Gravatar is a globally recognized avatar based on your email address. SqlDataAccess with ODBC
  Negin
  All
  May 20, 2022 @ 12:00pm

Hi,

I hope this message finds you well.

I am new to WestWind and I am trying to make a connection to my database using Sybase Advantage ODBC Data Provider in .net framework.

I'd like to load data using WestWind SqlDataAccess, but it needs a "providerName" for the connection string. I tried "System.Data.ODBC", but it didn't work. So, I was wondering if you could let me know what providerName I should use.

Please let me know if I should provide more information.

Thanks!

Gravatar is a globally recognized avatar based on your email address. re: SqlDataAccess with ODBC
  Rick Strahl
  Negin
  May 20, 2022 @ 12:41pm

This perhaps?

Poke around on that site to see if you can try the various providers.

Note SqlDataAccess() will only work if the SQL Syntax is similar to SQL Server. Otherwise a custom implementation for the specific driver is required. There are a few different ones (but not one for Sybase.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: SqlDataAccess with ODBC
  Negin
  Rick Strahl
  May 20, 2022 @ 04:23pm

Hi Rick,

Thank you for your response.

The sybase provider for ODBC needs a data reader namespace, anyways. So, please forget about Sybase provider for now.

WestWind's DataAccessBase class needs "providerName" in the connection string/constructor to work, and by default it's "System.Data.SqlClient". So, if I want to use OleDB, I can pass "System.Data.Oledb", and it works properly. However, it doesn't work with "System.Data.Odbc". Could you please let me know how I can use it for ODBC?

Thanks!

Gravatar is a globally recognized avatar based on your email address. re: SqlDataAccess with ODBC
  Negin
  Rick Strahl
  May 24, 2022 @ 05:48am

Will try that. Thanks a lot!

© 1996-2024