0

Let me first say that I'm sorry if this post seems rather vague. I've been trying for weeks now to connect to SQL Server from a custom Web Part i'm creating using Visual Studio Code, TypeScript, Node.Js and Yeoman @microsoft/generator-sharepoint "No JavaScript framework". I have tried using the mssql module directly but that didn't work so then I tried using tedious and that didn't work. Found out that you can't use those directly from the browser so I tried Knex and TypeORM which both state in the documentation that you can use them from the browser but again, I couldn't get anything to work. Here is my post on github about the issue I ran into with Knex github 2069 this.driver.connection is not a constructor. I was unable to resolve this so I tried TypeORM and ran into the following error: Cannot find module 'tls'.

So, my question is: Can anyone point me to some examples or documentation or anything that I could use to learn how to connect to SQL Server from my Web Part and perform a simple query? Again I'm sorry if I'm asking something stupid here but I'm trying to learn some new languages in a new environment and the last time I did any web coding classic ASP was all the rage. I got beat up pretty bad on another site for asking something similar so, i'm not sure what to do or who to ask.

Thank you for your time

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.