how to link to my database in discountasp.net ?

Discussion in 'ASP.NET / ASP.NET Core' started by ashrafcsnet, Oct 16, 2005.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Hi all, how are you ?
    I want to access my database using a connection string via web.config, in my application the path is local host. so I need to link to my database in discountasp.net server ...

    <add key="connSrt_NewPerson" value="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Inetpub\wwwroot\AshrafCSnetUpdated\AshCSNET.mdb"></add>

    Thank you
     
  2. just change the location of the database to the path it is in your discountasp.net directory.
     
  3. WOOOOOW... THANX ALOT MR. Scott ...


    Finally I'm connected now... hehe
     
  4. Thank you ken for kindly reply, I tried to write thefollwing in web.config:

    <add key="connSrt_NewPerson" value="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=http://www.ashrafcs.net/AshCSNET.mdb"></add>

    but it does not work [​IMG]
    * This database just for testing, I used to create a connection on each page butr now I need to use the web.config, so can any one write a sample like above about how we can get the path of the database, Please ?

    Thank you
     
  5. First go to your control panel and under 'Account Management' select the 'Account Information' option.

    Under server Path you'll find something like 'e:\web\ash....\htdocs'. The preceeding, along with the rest of the path name to your database and the mdb name is the dta source for your web config file.
     
  6. I've got a similar problem.

    I can connect to my database and the connection string is not the problem
    the problem that I have is with adding a new record to my Access database.

     
  7. Dr. qaak said...
    I've got a similar problem.

    I can connect to my database and the connection string is not the problem
    the problem that I have is with adding a new record to my Access database.


     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page