Wednesday, November 21, 2007

AccessDataSource & SqlDataSource

I used AccessDataSource tag in ASP.NET to connect a Microsoft Access Database, accidentally found this weird problem. The code is like this:

This code having no problem on localhost IIS server, but when I move it to my web hosting, it return "Access Deny to Database" kind of message.

So, I was thinking what wrong with this code? Then I find Mr. Google and saw this:
"The AccessDataSource will not connect to an Access database that is password-protected; to retrieve data from a password-protected Access database, use the SqlDataSource control."

Ei, but how come localhost manage to run it? Not understand. But, I guess I just need to use SqlDataSource in stead, problem solved, question remain unknown.

No comments:

Post a Comment