MS Access database & ASP.NET 3.5 scripts

Discussion in 'Databases' started by genojoan, Mar 19, 2009.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. My husband and I developed forms to enter data into Access tables with MS Visual Web 2008 Developer Express Edition (including its test server). But my hosting site says I have to use ASP/ADO which dummies down our code considerably. Can DiscountASP.NET handle this as the Access database will have 1000 observations (max) and will be used by 3 people to start? I wasted many days with current hosting site's support people as got conflicting advice or "we aren't database administrators" lamentations. Ready to commit to a great site - - Is this it?, genojoan
     
  2. Bruce

    Bruce DiscountASP.NET Staff

    do you mean you created a winform application that connect to a remote Access database hosted with a provider?

    OR you mean you have an asp.net application that connect to an access DB and 3 people will use it?
     
  3. Hi,
    I'm guessing since you are in Knoxville you're the one that send me a personal message about Access DBs to my Hotmail account.
    I've been on a military mission, for a WW2 vet, and have not had a chance to get back with you.
    If you don't mind I'd rather chat with you about it in this thread, that way people reading it later will possibly find some help.
    All the best,
    Mark "wisemx" Wisecarver
    (Johnson City, TN)
     
  4. Reply to Bruce

    We are creating a web application in ASP.NET 3.5 via MS Web Developer. The purpose is to have staff enter contact info for possible sales, by traveling scientists, who speak to customers on-the-road. Since, at this point, there are only a handful of people that need to use this system to keep track of contacts, we have chosen to use the MS Access database as a repository of such contacts. MS Access is also the database that we are most familiar with, among all databases. ASP.NET was chosen because, 1) we were able to obtain development software ("express" version) for free, 2) we have some experience with the VB language, which is ASP.NET (v3.5) scripting language, and 3) we wanted to take advantage of the latest software, and 4) we desire to keep most of the processing server-side to avoid problems/conflicts on the various platforms of client-side browsers. The learning process has been difficult for us, compounded by our last server provider's seeming ignorance of the newer ASP software, and thus the communication of obviously conflicting and inaccurate advise. --- more than you really wanted to know, right?
     
  5. :)
    I've been down that trail before while I was a developer at Simens AG.
    Although we were using SQL Server for data worldwide, including PeopleSoft...
    We had to use Access for the Sales people since they were traveling.

    What I would recommend for you is to add a SQL Server 2008 addon for your acount here.
    Then someone locally would take the responsiblity of having your access DBs sent to them and then they pump that data into the SQL Server.
    You can even have a local SQL Server for redundancy to protect your initial data.

    All of this would have a low cost except for the time of the person who takes on this responsibility, there are ASP.NET user groups in your area if you want someone local.
    Wallace is one of them: http://weblogs.asp.net/wallym/default.aspx
    All the best,
    Mark
     
  6. So basically my main goal of having 3 people being able to enter (edit and delete) new records in the Access database hosted by DiscountASP.NET is flawed, i.e., not even I should be doing this via a form built in aspx? I thank anyone who can give me insight into why this idea cannot work as I have to explain this some people in my company. Sorry for my ignorance but I certainly appreciate this forum and the input of Mark and Bruce thus far in helping to set me straight. Fire away, genojoan (BTW Mark, I can do what you suggested yesterday as I probably should be moderating, error-checking and be knowledgeable about all updates to the database.)

    Bruce, What I was hoping to do was have a company sales and research clients Contacts database that would function as follows:
    1) Put an Access database on your hosting site,
    2) Have a *.aspx entry form document be able to post a new entry into this remote Access database,
    3) Have other *.aspx forms to bring an observation out of the database to edit it and put it back in the database,
    4) Possibly write *.aspx pages to output reports with various combinations of data from multiple tables from the Access database linked by a primary key. We will have 1000 records, tops.

    All of the above proved impossible to do as we couldn't get data to post into the remote Access database from our aspx form at our other hosting site and this is the first step in the above. Three people in my company at different remote locations were to be able to do this, so that is why we wanted the database in a remote location and all be able to enter data into it. We would hardly ever, if ever, be doing this at the same time.

    Could we at least be able to do #1 above and then I could make an Access application for each of us to run reports locally? I alone as the moderator of the database could make the edits and deletions to records as there wouldn't be too many of these and the other 2 users could send requests to me?

    Sorry for my overall ignorance in how databases should work/be treated/be respected on remote sites or my interpretation of what has been said above:eek:, i.e., should one only be able to replace databases via FTP or another method as this is what I am starting to think from response to my first query. But my husband has done similar things with just plain ASP he says and "what's a server-side database for, he asks?" Thank you for straightening out some of the misconceptions above since there are conflicting statements as you can see, genojoan
     
  7. Hi,
    Bruce and I have been teaming up for years now helping people with things like this.
    Please do not consider yourself a "dummy", this is what the forums are for, primarily.
    If you have been creating forms with Access it can be a challenge at first to interact with your data on-line.
    SQL Server does not have forms like Access but for on-line interaction SQL Server is the whip, Access is not intended for on-line interaction, these two sisters do however work well together on-line and off.
    For example one of the community sites I had here always got a lot of spam traffic each day and I had a very popular Shoutbox that always got attacked, so for that I used an Access DB on the site while the rest of the site used SQL Server, Access offers a level of protection even though it is not secure on-line it can be used with SQL Server.

    Feel free to ask away, I will indeed help to every extent that I can, and I'm sure Bruce will also. ;-)
    All the best,
    Mark
     
  8. Can use ONLY Access database remotely? HELP!!!

    BIG QUESTION:confused:: Can we select an observation from a remote Access database, edit it and update it to the remote database (without using GridView control or other control)? Again, unfortunately (my husband thinks we should be able to do all with an Access database) can we get away with having ONLY an Access database on-line? I am able to insert new records into this. But editing and then updating, and making reports may be more formidable or impossible? I can see example of how the UpdateCommand property of the SqlDataSource control and then I see under the AccessDataSource control the capability of "Updating" with the "Requirements" of "Set the UpdateCommand property to a SQL statement used to update data. This statement is typically parameterized."

    I can provide the *.aspx file where my husband has attempted the Update into an Access database.

    Sorry to persist in using ONLY an Access database on-line. Got to know soon if this is at all possible as this project is way beyond late for my new employer in Norway. Thank you, genojoan
     
  9. Hi,
    You can use an Access DB on-line for updating records.
    You can not however use the Access Forms on-line if you are using those locally.
    For that you can use classic ASP or ASP.NET forms, or even silent code in pages when needed. i.e. Hit a page and it silently looks for and/or posts records.

    Refresh my memory, is your site on IIS6 or IIS7?
    These Access DB things are much easier on the IIS6 servers here. ;-)
    All the best,
    Mark
     
  10. Using Win 2008 - IIS 7.0

    Mark, I don't see where to go back to IIS6. Advise, please. And, why would IIS6 servers make it easier to use Access databases?

    My FarmEntry.aspx is "sort-of a form" (attached as FarmEntry.txt) for entering data into the remote Access database (but after entering a record I never get to the line in the code where Response.Redirect takes the user to another page, as says "The page cannot be displayed" as shows the FarmEntry.aspx in the Address bar).

    And, my problems are more vast with the FarmUpdate.aspx to select a farm record and bring it back into a "form" for edit and then post-back.

    Any chance of someone looking at my code to help me get these 2 *.aspx files working with my Access database? I am desparate to get this working. Thank you so much, genojoan
     

    Attached Files:

  11. Am getting migrated to IIS 7 now!!!
     
  12. Migrated to IIS 6, now default.aspx won't work

    Please note: I was using ASP.NET 3.5 to build aspx files and I was using OLEDB not ODBC so should have I switched from IIS 7 to IIS6?

    I changed my server number from 704 (IIS 7) to 127 (IIS 6) where needed, etc. Now I can't even get the first page of my app (default.aspx) to run as below:
    Parser Error

    [FONT=Arial, Helvetica, Geneva, SunSans-Regular, sans-serif]Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

    Parser Error Message: The 'CodeFile' attribute is not supported by the 'page' directive.

    Source Error:

    Line 1: <%@ Page Language="VB" AutoEventWireup="false" CodeFile="default.aspx.vb" %>Line 2: Line 3: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">[/FONT]

    Also, another file FarmEntry.aspx will not open the database as follows:
    'e:\web\genoglobalc\htdocs\_database\GenoContacts.mdb' is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides.

    [FONT=Arial, Helvetica, Geneva, SunSans-Regular, sans-serif]Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Data.OleDb.OleDbException: 'e:\web\genoglobalc\htdocs\_database\GenoContacts.mdb' is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides.

    Source Error:

    Line 23: 'Connect to databaseLine 24: Dim cnAccess As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=e:\web\genoglobalc\htdocs\_database\GenoContacts.mdb")Line 25: cnAccess.Open()Line 26: Line 27: Dim strContact_type, strFarm_name, strFarm_contact1, strFarm_phone, strFarm_contact2, strCell_phone As String
    Source File: C:\Inetpub\wwwroot\Geno\FarmEntry.aspx Line: 25

    Stack Trace:

    [OleDbException (0x80004005): 'e:\web\genoglobalc\htdocs\_database\GenoContacts.mdb' is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides.] System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection) +969373 System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject) +86 System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup) +29 System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +4863644 System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +117 System.Data.OleDb.OleDbConnection.Open() +40 ASP.farmentry_aspx.SubmitExitButton_Click(Object Src, EventArgs E) in C:\Inetpub\wwwroot\Geno\FarmEntry.aspx:25 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565[/FONT]
     
  13. Bruce

    Bruce DiscountASP.NET Staff

  14. Hi,
    Hope this didn't cause you any headaches.
    Keep me posted as to how the change goes.
    I looked at the text file just now...What are you using for the code?
    In ASP.NET your entire page is a 'form', in that you have table code above the form.
    You should also look at the ASP.NET Learning section for things like the List control for data. The controls shown there for data will work with Access, I can post some examples, not that hard once you get used to it.
    All the best,
    Mark
     
  15. For better or for worse my Remote Web site is back on a IIS 7 server. My FarmEntry.aspx page is working, but my default.aspx page is AWOL. I just uploaded it to the remote site without firewall and virus protection with FileZilla and this file is not being accessed properly by

    http://www.genoglobalc.web704.discountasp.net/default.aspx
    Server Error in '/' Application.

    The resource cannot be found.

    [FONT=Arial, Helvetica, Geneva, SunSans-Regular, sans-serif]Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.

    Requested URL: /default.aspx


    Version Information: Microsoft .NET Framework Version:2.0.50727.3074; ASP.NET Version:2.0.50727.3074

    :eek:I am not sure if my web.config has anything to do with this problem. Should web.config be on my local and remote site. Getting tired of no progress, genojoan [/FONT]

    When go to put my Access database in App_Data folder with Visual Web Developer 2008 Express Edition, I get the below error:
    (Should database be in App_Data or _database folder????

    Copy from 'C:\Inetpub\wwwroot\Geno\App_Data' to 'ftp://genoglobalc.web704.discountasp.net/App_Data' started at 3/25/2009 6:55:33 PM.
    App_Data
    Copy file GenoContacts.mdb from source to remote Web site.
    Has error -- Unable to add 'App_Data/GenoContacts.mdb' to the Web site. Could not find a Web server at 'genoglobalc.web704.discountasp.net' on port 21. Please check to make sure that the Web server name is valid and your proxy settings are set correctly. If you are sure that everything is correct, the Web server may be temporarily out of service.
    Copy from 'C:\Inetpub\wwwroot\Geno\App_Data' to 'ftp://genoglobalc.web704.discountasp.net/App_Data' is finished. Completed at 3/25/2009 6:57:50 PM.

    3 things got my aspx pages and database working together: 1)I took the web.config off the remote site, 2) put the database in App_Data folder instead of in _database folder, and 3) made sure this line was OK:
    Dim cnAccess As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=e:\web\genoglobalc\htdocs\App_Data\GenoContacts.mdb")
    So my aspx pages accessing an Access database remotely on a IIS 7 server is FINALLY WORKING!!! Thanks to all forum and support, genojoan:)
     
  16. Bruce

    Bruce DiscountASP.NET Staff

    the alt URL does not have www.
     
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