FOR XML

  • Is there any way to save the output from a FOR XML statement as an xml file on a local drive? I would like to have an xml file that I can then use to import updated data into local Access tables.

    Thanks!

  • Can anybody suggest less suitable way to pass data from SQL Server to Access than XML file?

    _____________
    Code for TallyGenerator

  • You can aswell use a DTS Script or Import/Export wizard from your SQL Server to accomplish your data transfer from SQL Sever DB to Access DB unless you are looking any specific complications.

     

    Prasad Bhogadi
    www.inforaise.com

  • I am looking for something in code rather than import/export. I want the user to click a button in Access which will refresh all the tables by getting the newest records from SQL.

  • What is the Front end tool that you are using for this application for invoking the process.

     

    Prasad Bhogadi
    www.inforaise.com

  • Then all you need is just "linked table" from Access to SQL Server.

    Right click on "tables", chose "Link to tables", there select "ODBC Databases", click "NEW", find "SQL Server" in the list, click on it and follow the wizard to create dsn connection to your SQL Server.

    After data source is created just select it and chose which tables you want to have in your Access database.

    Because it's linked tables you don't need to refresh anything. Access will go to SQL Server database everytime client is querying for some data from there.

    _____________
    Code for TallyGenerator

  • Its an Access front end for remote offices. The remote office has local tables that occasionally get refreshed from head office SQL tables, and they send their data into the SQL Server over a VPN. I have used XML to get the data from the local tables in Access to the SQL Server and basically want to try "reverse" that process so updates from HQ can be sent as fast. I have tried using a DTS script as a module in Access, but there doesn't seem to be any change in the time it takes to run, and as using XML in the remote office sending their data increasing speed I was hoping I could do the same for this update.

  • You have two very simple solutions send the data to Excel save as XML or put it in an ADO.NET DataSet and call the ReadXML method.  Hope this helps.

     

    Kind regards,
    Gift Peddie

Viewing 8 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic. Login to reply