• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

UXP and SQL

Explorer ,
Apr 04, 2024 Apr 04, 2024

Copy link to clipboard

Copied

Is this possible to comunicate with sql database using UXP?

Right now I can achieve this in Extend Script with Porky.

But maybe it's time to use more modern technology?

TOPICS
Scripting

Views

263

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 04, 2024 Apr 04, 2024

Copy link to clipboard

Copied

I think it should be.

 

Have a look at Axios or Fetch API for server side http requests with databases.

 

Or you could maybe with Node.js too. Node.js can directly access database, if you're using Node.js environment.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 04, 2024 Apr 04, 2024

Copy link to clipboard

Copied

Hi @Mnietek1, I'm a raw beginner on this topic, but I'm fairly sure that Eugene is right. With UXP, in fact, I think you basically don't need Porky because you can use node.js packages straight out of the box, so to speak. As a starting point you could look at Porky code to see what node packages it uses. The docs say dependencies are "request, sqlite3, mysql, pg, xml2js, htmlparser, markdown, brucedown and html-entities", but also that a standard npm install includes these. But as Eugene alludes, there may be more-modern packages to do the same thing now.

- Mark

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Apr 05, 2024 Apr 05, 2024

Copy link to clipboard

Copied

LATEST

I pull information from the SQL databases at work with XMLHttpRequest. It not pulling directly but calling on php scripts set up to get the correct information. Just know with UXP you have to have the right permissions setup in you manifest, at least if it is a UXP plugin.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines