file upload and download

Discussion in 'ASP .Net Web Controls' started by mann, Dec 6, 2006.

  1. mann

    mann Guest

    Hi,

    I'm an new user of this group.
    my problemm is...
    I have to develop a utiliy to synchronize database .....sql server to
    Access.......
    user will dwonload file from net which data is in sqlserver....and
    he/she will update his database which is in Access....at his desktop...

    Please help me.....the right approach to do it

    Thanks
    mann, Dec 6, 2006
    #1
    1. Advertising

  2. mann

    Phil H Guest

    Hi

    One solution I can think of is as follows:

    When the user visits the web site they type a unique file name in a
    text box and click on a button.

    The postback event will extract the relevent data using a Sql command
    object in conjunction with a sqlDataReader. Your code will create a
    text file and write the data into it.

    The page returned to the user will then include a hyperlink to the
    saved file. The user does a "save target as" command to save the file
    locally.

    User opens Access database and uses the "File | get external date" menu
    command and selects the link option (or if has been done previously
    then the link and the updated data will be in place) to the
    corrsesponding type of file.

    e.g. it could be a CSV formatted file which Access can handle.
    Update/Append queries could be set up in the Access file to import the
    CSV table data into the rest of the structure.

    If the version of Access being used is 2003 or late then XML format
    could be used instead of CSV if preferrred.

    If the above is too advanced for the users in question then it could be
    automated with a Windows application but does require some experience
    from you as a programmer. The application would have to set up comms
    sessions with the web server and then download the file automactically,
    whereupon it could write the data directly into the Access database.

    Hope that's of some use
    Phil H, Dec 7, 2006
    #2
    1. Advertising

  3. mann

    MikeS Guest

    You might be able to grab the data straight off of the web and put it
    in Access using an ADO recordset from an Access code module routine
    since the ADO recordset can fill itself from http.

    Something like:

    <%
    'data.asp
    Response.ContentType = "text/xml"
    rs.Save(Response, adPersistXML)
    %>

    ' Access module
    rs.open("http://mysite/data.asp")
    do while not rs.eof
    ' Put the data away
    rs.movenext ' cpu saver
    loop

    Maybe even develop an aspnet.webcontrol that figures in, in some way.
    MikeS, Dec 9, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ryan Taylor
    Replies:
    2
    Views:
    925
    Ryan Taylor
    Nov 10, 2004
  2. Sam --
    Replies:
    2
    Views:
    597
    Sam --
    Mar 17, 2005
  3. =?Utf-8?B?U2FyYXY=?=

    Upload a file without file Upload control - ASP.Net

    =?Utf-8?B?U2FyYXY=?=, Aug 2, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    2,424
    Bruce Barker
    Aug 3, 2005
  4. =?Utf-8?B?RGFuaWVs?=

    How to upload and download excel file into server

    =?Utf-8?B?RGFuaWVs?=, Aug 18, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    2,609
    Paul Clement
    Aug 22, 2005
  5. Brett  Kelly
    Replies:
    1
    Views:
    667
    Steve C. Orr [MVP, MCSD]
    Jun 16, 2006
Loading...

Share This Page