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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connecting to MAS 90 via ODBC in .NET

Status
Not open for further replies.

DotNetHead

Programmer
Feb 3, 2003
6
US
Connecting to the SOTAMAS90 dsn in Access or Visual Basic 6 is rather simple. But in trying to do the same thing in VB.NET I am running in to some errors. The first noticeable problem is when making a new OleDbConnection the providex MAS 90 32-Bit ODBC Driver does not even show up. The Microsoft OLE DB Provider for ODBC Driver is the only ODBC driver that shows up. I went ahead and tried the Microsoft driver, when I select the SOTAMAS90 dsn... then do a “test connection” it is successful. But when I OK out of the Data Link Properties on the DbConnection I get this error message, "The .Net Data OLE DB Provider(System.Data.OleDb) does not support the MSDASQL Provider, Microsoft OLE DB Provider for ODBC Drivers." I hope this is just me overlooking something obvious but if there are any other .Net programers out there who are connection to MAS I'd love to know how.
Thanks!
 
Hasn't any body tried to get data from mas in .NET? :(
 
Here is my connection string: "Works in vb6"
Provider=MSDASQL.1;Persist Security Info=False;Extended Properties="DSN=SOTAMAS90;UID=xxx;Directory=\\xxx\apps\MAS90;Company=xxx;CacheSize=4;DirtyReads=1;BurstMode=1;SERVER=NotTheServer"

The problem seems pretty obious in the error message "The .Net Data OLE DB Provider(System.Data.OleDb) does not support the MSDASQL Provider". But why, and how can I get around this.

I have also tried using othere "activeX" data controls, and rather than giving an error they just hang the exe and cause it to never come up at all.
 
So no one who programs in .net has ever wanted to connect to mas?
 
Thank you very much! That did it. Now that I think of it that is the first ODBC connection I had ever needed to make in .net, everything else has been sql.
 
Hi,
I am trying to access MAS90 using ASP.NET and I had the same problem "The .Net Data OLE DB Provider(System.Data.OleDb) does not support the MSDASQL Provider, Microsoft OLE DB Provider for ODBC Drivers. "......
So, I down loaded the ODBC driver...still have some problem...
Can you past the exact code for connection string......

Regards
Pradeep
 
It looks like you downloaded ODBC .Net data provider but still trying to use OleDB provider.

use Microsoft.Data.Odbc namespace instead of System.Data.OleDb
 
Can I have the connection string using ODBC
or is it just New odbcConnection (DSN="SATOMAS90")...

Please do let me know
 
Actually I dont know. I`ve never tried to connect to MAS 90 via ODBC .Net.
I only had similar problems connecting to Interbase server.(Was trying to use OleDB provider instead of ODBC)
 
:)
I've never tried to connect to MAS 90 using any provider.
Sorry.
 
I am experiencing some strange behavior using the ODBC.Net Data Provider. When I try to access MAS from a .NET Windows Form everything works properly. However when I try the same exact code in a code behind Web Form using ASP.Net I get the following error:

ERROR [S000] [ProvideX][ODBC Driver][FILEIO]Table is not accessible

I have used several different connection strings with the same results.

connString = "Driver={MAS 90 32-Bit ODBC Driver};Directory=\\server\share\MAS90\;UID=user;PWD=password;Company=XXX"

AND

connString = "DSN=SOTAMAS90"

Has anyone come across this behavior or come up with a way to get MAS Data into a ASP.NET page?
 
I finally figured out how to prevent the Table is not accessible error, which is being caused by the asp.net process using the ASPNET account.

First I set my IIS Directory Permissions to use a domain user account and password that has access to the MAS 90 share.

Then I had to set up Impersonation in my ASP.NET Application by adding the following line to my Web.config file:

<identity impersonate=&quot;true&quot;/>

This causes the asp process to use the identity specified in the IIS directory permission settings.

A good article explaining ASP.Net and IIS Security can be found at:


FYI - I'm developing an ASP.NET application to query MAS 200 running on a seperate server. After turning on impersonation both of the connection strings in the previous post work.

Hopefully this helps
-Dave L
 
I would like to export all MAS200 data to a SQL 2000 database. I have attempted doing so using the DSN installed by the client software with no luck. Can anyone help me in exporting the ENTIRE database using DRS and ODBC of some sort??

thanks in advance!
 
Ok. Have written ASP.NET/VB.NET app that accesses MAS90. Utilizes identity impersonation & Odbc.

If anybody needs code, just ask.

BUT the problem.... when I deploy to our production server, the page hangs right at the point where I open the actual connection. "connMAS90.Open()". This works fine on the development server, but hangs in the production server.

Has anybody experienced this problem before?

Any help/tips/ideas would be greatly appreciated.
 
I'm pulling out my hair trying to connect to the MAS 200 database from an ASP.NET page (VisualBasic.NET). I've tried to follow most of the instructions contained in this thread, but still getting "table not accessible" error.

I'm ready to try dlarsen1's solution, but I have no idea how to do a couple of the things mentioned:

"First I set my IIS Directory Permissions to use a domain user account and password that has access to the MAS 90 share."

1. How do I create a user account that has access to the MAS 90 share? I have no clue about this procedure.

2. How do I set IIS Directory Permissions to use the domain account set up in the prior step? Again, no idea whatsoever.

If anyone can offer any assistance at all, I would greatly appreciate it. This is a very critical application for me, and I've never been so tight on time...
 
RyanSpeakman,

The 'table not accessible' error is truly frustrating. I had spent weeks trying to get around it by trying to address the permissions issue to no avail.

The best way, and only one that I know of, is to use Identity Impersonation in ASP.NET. (<identity impersonate="true" userName="<USERNAME>" password="<PASSWORD>"/>)

Try it first with your own username and password (the one you use to log into your computer) to test it out. After you that works, I suggest creating a new user with limited access rights for the actual deployment.

Hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top