I am not able to find "Data Source" when i give the connection for a MS Access plz tell me where I went wrong in thee below shown code snippet
OleDbConnection connection = new OleDbConnection();
connection = new OleDbConnection("provider=Microsoft.Jet.OLEDB.4.0" ,Data Source ="C:\\Documents and Settings\\Administrator\\My Documents\\Database1.accdb;");
As I have used MS Access 2007 the extension is .accdb then here what has to be done?
You can't use Jet for Access 2007, AFAIK. You need to use ACE. Unless you want to save your DB in 2003 format (mdb).
Look here for the correct connection strings.
ConnectionStrings.Com has always been a great resource for me.
Edit:
Also, if this is an ASP.NET web app, you might want to look into using the DataDirectory functionality. If you put your DB in the App_Data directory, you don't need the full physical path, just one relative to the application. It's at the bottom of the first link I gave you.