tediousjs / tedious

Node TDS module for connecting to SQL Server databases.

Home Page:http://tediousjs.github.io/tedious/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

support with tauri application

himadrinath opened this issue · comments

i configure connection in my tauri application but not able to connect to database

getting error

Error: Failed to connect to DESKTOP:1433 - _net.default.isIPv6 is not a function

configration

config = {
            server: 'DESKTOP',
            authentication: {
                type: 'default',
                options: {
                    userName: 'dbuser',
                    password: 'password'
                }
            },
            options: {
                database: 'DB',
                encrypt: false,
                trustServerCertificate: true,
                rowCollectionOnDone: true
            }
          }

webpack config

webpack: (config, options) => {
        config.resolve.fallback = { fs: false, crypto: false, stream: false, querystring: false, tls: false, net: false, dns: false, dgram: false };
    
        return config
      }

Tedious is not a javascript module for client-side use, it's intended to be used from Node.JS.

but can i config it some how to use with tauri

i saw in this article that developer already used this library with electron to connect sql server

I've had to look up what tauri even is about, as I've never heard of it before.

From what I could gather, there is no support for low level tcp sockets exposed by it, which is the reason why tedious does not work correctly. Without that support, there is now way to get tedious to work.