How can ChatGPT help with my VB6 API connection?

Shaun.t
3 min readMar 2, 2023

--

Background story

My client contacted me seeking assistance with a VB6 (a desktop legacy ERP) application’s API connection. In the past, we Googled the answer and used the Chilkat SDK, a premium paid product, to use the API. After integration, my client encounters a problem for which there is no workable fix.

All of a sudden, I had an idea.

Why don’t we use ChatGPT to get the answer to that?

The VScode & Postman Mock Setup

simply follow the instructions listed above.

The Process

Writing prompt to complete the code

// how to call Rest API in VB6

The provided response employs a native, free-of-charge solution called MSXML2.XMLHTTP, which is a sound solution.

But since I have a background in JS and MSXML2.XMLHTTP is undefined and needs a reference, I ask ChatGPT:

// how to import MSXML2.XMLHTTP in vb6

what I get:

not bad…

the final step needed to turn the JSON string into an array

In order to get JSON parser work, these are what we’re using and importing into the VB6 project as .bas and class module:

The ref links above come from Google.

The Pain Point

The constant login of the ChatGPT Vscode extension is now a huge pain point. Uncertain whether API overload or session expiration.

Verdict

The publisher of the item is given preference in the current Google search result, which is biased. And this is the main purpose of Google SEO; it encourages content publishers to earn from their work and creates a cycle whereby publishers write more content, but it also causes the outcome to lean towards the publishers.

On the other side, the ChatGPT is now independent of the publisher and offers replies that are more impartial towards the end user, although it lacks correct information and up-to-date data. As a generative model AI, ChatGPT has a lot of potential, even in its current condition.

Currently, there is no clear winner, so we choose the options that will make our task the easiest.

--

--

Shaun.t
Shaun.t

Written by Shaun.t

Tech, people, story. Evangelist of Team Forest. https://teamforest.co

No responses yet