connect to access database

Discussion in 'Visual Studio' started by wine4swine, May 29, 2010.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. How do I connect to the access database in my _database folder using Visual Studio 2010 server explorer?
    The add server dialogue requests the "server name". I'm not sure what to put here for my DASP site.
     
  2. I don't believe you're actually able to a remote Access database, at least not in the Visual Studio Express version I'm currently testing on. How are you trying to connect to us? Just outline some steps so we can try to recreate it.
     
  3. Note: Bob contacted me via Email about this and I already responded that I'll begin some tests.
    (The past three days were full of Memorial Day services.)

    One thing that stinks about this, as Bruce had mentioned in the past...
    Access is not going to allow password protection.
    Next thing that stinks, I only have Access 2010 installed now.
    Yeah, I've probably got some old Access DB's around here I can use to test with. ;-)
    All the best,
    Mark
     
  4. Thanks for responding

    I realize that Access has a number of problems as a web data resource. However, the site that I am building is really just for fun and I already have all of the data in an Access database that I use locally. It's really not worth the time or money to convert to SQL at this point.

    In Visual Studio there is a View named Server Explorer. This allow you to view and access data sources on different servers. It falls under Data Connections. When I attempt to add a new server as a data source the first dialog box asks "To connect to a new server enter the computer name of I.P. address below" I have tried a number of different entries, but nothing gives me access to http://www.wine4swine/_database.

    I am a faily seasoned .net developer but have NO EXPERIENCE with the completedly disconnected model used by DASP. I am used to having access to my servers using remote desktop and other tools that allow me connect the servers directly.

    I notice that if you purchase SQL server space, a server name is provided. That is the kind of information that I am looking for to connect to my Access database.

    I certainly appreciate any help that you can offer.

    BJ
     
  5. ...Just for fun is always fun and getting this to work for you will be great. ;-)
    I got your Email, go ahead and send that DB to me [email protected]
    I don't have to worry about all the spam bots, they already attack me anyway. lol
    All the best,
    The courts jester...um, I mean -> Mark
     
  6. UPDATE:

    Just worked with your Access DB in VS2010, no problems at all.
    Added it as a Data Source.
    Created a Web Form (AccessData.aspx)
    Switched to Design mode.
    Drag/Drop'd table Klupdate onto the page.
    Set options to allow Paging, Sorting, Updates, etc.
    Ran the page locally...Success
    FTP'd with VS2010 to DASP server...Success
    Ran the test page on the DASP server (IIS7 ASP.NET 4)...Success

    I think the only way you'd be able to do this with the Access DB as an external data source will be to open the entire site up in VS as a location, which isn't a good practice anyway.

    This does work and I can create a Webcast plus a sample site with code it you want.

    I'm going to stick with this method however;
    1) Your Access DB goes in your App_Data folder.
    2) Use VS to pump changes to and from the live site.
    3) Make code changes with your local copy. Don't use a remote DB.

    The connection will be in the page, like this:
    <asp:AccessDataSource ID="AccessDataSource1" runat="server"
    DataFile="App_Data\BJWines.mdb"

    Are we on the same page? Let me know how I can help further with this.
    Final note, it blew me away that it was so easy and that it worked with no errors. ;-)
    All the best,
    Mark
     
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