C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




Password Protected Access Database in ASP.Net


Posted Date: 25 Apr 2007    Resource Type: Code Snippets    Category: MS Access

Posted By: Pritam Baldota       Member Level: Gold
Rating:     Points: 10



This sample code shows how to connect to a password protected MS Access database.
Jet OLEDB:Database Password=dbpass;

You can specify the MS Access database password in the connection string to connect to the password protected MS Access database.


private void FillData()
{
string conn="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\InetPub\\WWWRoot\\Practicals\\Database\\Rss.mdb;User Id=Admin;Jet OLEDB:Database Password=dbpass;";
OleDbConnection con=new OleDbConnection(conn);
OleDbDataAdapter da=new OleDbDataAdapter("select * from RSS",con);
DataSet ds=new DataSet();
da.Fill(ds,"dd");
DataGrid1.DataSource=ds;
DataGrid1.DataBind();
con.Close();
con.Dispose();
}




Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
(No tags found.)

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Return to Discussion Resource Index
Post New Resource
Category: MS Access


Post resources and earn money!
 



dotNet Slackers   BizTalk Adaptors    Web Design

teleconferencing service

Contact Us    Privacy Policy    Terms Of Use