Forum Stats

  • 3,874,179 Users
  • 2,266,677 Discussions


ORDS - Newbie question - How can I Post a Batch of transactions to my database?

The following Postman batch Transaction works and posts to my Oracle test database - How do I send this from VBA? I can send individual transactions but cant work out









  • Justin Warwick
    Justin Warwick Member Posts: 123 Bronze Badge

    I'm assuming that "VBA" = Microsoft VisualBasic for Applications/Access. I don't think there is enough information here to give a specific and clear answer, but here is some general guidance: "batches" when you are dealing with webservices almost always what happens is the HTTP "Payload" often like what you have pasted there as the content of a CSV file. But this batch/payload, when you are in a programming context is kind of "just one big string of bytes". So in the VBA code, you will need to populate one big variable with all of your data, taking care to keep all the delimiters and quotes (or braces and colons and quotes, when the input format is JSON, or tags and quotes when it is XML) where they belong. Then you use built-in libraries to perform the HTTP connection and transmission of the payload as the "content" or "body". In VBA world, the last time I touched it, the available library object for this was XMLhttp, which can be repurposed to send data in formats other than actual XML. Mind the HTTP method and take care of response codes, required HTTP headers, etc. It could be quite a task; I would probably be inclined to instead spend my development efforts to _replace_ any Excel/AccessDB element rather than accommodate it, as it would probably be about the same (or even much less!) effort and would also be more robust in the end. But if you go that route, you will need to do lots of reading on Microsoft's technical documentation sites (which are getting a total re-design and re-brand right now). Good luck.