file upload and download

M

mann

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
 
P

Phil H

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
 
M

MikeS

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,190
Latest member
ClayE7480

Latest Threads

Top