SOLVED

Developing custom web part on Sharepoint 2019

%3CLINGO-SUB%20id%3D%22lingo-sub-1295697%22%20slang%3D%22en-US%22%3EDeveloping%20custom%20web%20part%20on%20Sharepoint%202019%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1295697%22%20slang%3D%22en-US%22%3E%3CP%3EHello%20everyone%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20need%20to%20develop%20custom%20web%20parts%20that%20read%20data%20from%20SQL%20and%20Oracle%20databases.%3C%2FP%3E%3CP%3EKindly%20advise%20what%20is%20the%20best%20practice%20to%20execute%20the%20above%20on%20SharePoint%202019.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMany%20thanks%20in%20advance%2C%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1297309%22%20slang%3D%22en-US%22%3ERe%3A%20Developing%20custom%20web%20part%20on%20Sharepoint%202019%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1297309%22%20slang%3D%22en-US%22%3EHi%2C%3CBR%20%2F%3ESince%20it%20is%20SharePoint%20On-Prem%2C%20you%20will%20have%20full%20control%20over%20your%20server%2C%20so%20you%20can%20develop%20the%20feature%20as%20a%20web%20part%20or%20application%20page.%20You%20can%20use%20the%20default%20connection%20method%20as%20we%20use%20in%20.Net%20by%20having%20the%20connection%20string%20in%20web.config.%20Let%20me%20know%20whether%20you%20are%20looking%20for%20some%20other%20things.%3CBR%20%2F%3E%3CBR%20%2F%3EHope%20it%20helps%2C%20please%20like%20it%20or%20mark%20it%20as%20a%20solution%20if%20it%20resolves%20ur%20clarification%20or%20issue%3CBR%20%2F%3E-Sudharsan%20K...%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1298216%22%20slang%3D%22en-US%22%3ERe%3A%20Developing%20custom%20web%20part%20on%20Sharepoint%202019%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1298216%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F144422%22%20target%3D%22_blank%22%3E%40Sudharsan%20K%3C%2FA%3E%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMany%20thanks%20for%20your%20reply.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20advise%20on%20how%20to%20deploy%2Finstall%20it%20on%20my%20site%3F%3C%2FP%3E%3CP%3EI%20am%20used%20to%20create%20the%20web%20part%20as%20an%20ascx%20file%20using%20c%23%20that%20I%20copy%20in%20the%20Layouts%2F%20User%20Controls%20folder%20and%20also%20install%20the%20related%20dll%20file%20in%20the%20GAC.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBest%20regards%2C%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1298289%22%20slang%3D%22en-US%22%3ERe%3A%20Developing%20custom%20web%20part%20on%20Sharepoint%202019%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1298289%22%20slang%3D%22en-US%22%3EHi%2C%3CBR%20%2F%3EYou%20dont%20have%20to%20do%20all%20these%20manually%2C%20follow%20the%20below%20link%20for%20step%20by%20step%20process%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fwww.sharepointsky.com%2Fsharepoint-2016-visual-web-part-using-visual-studio%2F%23Create_visual_web_parts_using_visual_studio_20152013_in_SharePoint_20162013_step_by_step%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.sharepointsky.com%2Fsharepoint-2016-visual-web-part-using-visual-studio%2F%23Create_visual_web_parts_using_visual_studio_20152013_in_SharePoint_20162013_step_by_step%3C%2FA%3E%3CBR%20%2F%3E%3CBR%20%2F%3EHope%20it%20helps%2C%20please%20like%20it%20or%20mark%20it%20as%20a%20solution%20if%20it%20resolves%20ur%20clarification%20or%20issue%3CBR%20%2F%3E-Sudharsan%20K...%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1298370%22%20slang%3D%22en-US%22%3ERe%3A%20Developing%20custom%20web%20part%20on%20Sharepoint%202019%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1298370%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F144422%22%20target%3D%22_blank%22%3E%40Sudharsan%20K%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EGreat!%3C%2FP%3E%3CP%3EOne%20last%20question%3A%20spfx%20platform%20or%20SharePoint%20app%20can%20not%20be%20used%20in%20my%20case%20because%20I%20mean%20.NET%20to%20connect%20to%20my%20SQL%2FOracle%20databases%2C%20right%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMany%20thanks%20for%20your%20prompt%20support%2C%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1298372%22%20slang%3D%22en-US%22%3ERe%3A%20Developing%20custom%20web%20part%20on%20Sharepoint%202019%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1298372%22%20slang%3D%22en-US%22%3EHi%2C%3CBR%20%2F%3EYou%20can%20use%20SPFx%20or%20SharePoint%20app%20but%20both%20are%20client%20side%20coding%2C%20to%20access%20the%20DB%2C%20there%20has%20to%20be%20a%20API%20which%20i%20think%20its%20over%20kill%20for%20your%20project.%20If%20you%20think%20that%20there%20is%20an%20API%20or%20web%20service%20that%20can%20return%20the%20data%20from%20DB%20then%20you%20can%20use%20SPFx%20or%20SharePoint%20App.%3CBR%20%2F%3E%3CBR%20%2F%3EHope%20it%20helps%2C%20please%20like%20it%20or%20mark%20it%20as%20a%20solution%20if%20it%20resolves%20ur%20clarification%20or%20issue%3CBR%20%2F%3E-Sudharsan%20K...%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1298396%22%20slang%3D%22en-US%22%3ERe%3A%20Developing%20custom%20web%20part%20on%20Sharepoint%202019%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1298396%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAll%20is%20clear%20now%20%3A)%3C%2Fimg%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMany%20thanks%2C%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

Hello everyone,

 

I need to develop custom web parts that read data from SQL and Oracle databases.

Kindly advise what is the best practice to execute the above on SharePoint 2019.

 

Many thanks in advance,

6 Replies
Hi,
Since it is SharePoint On-Prem, you will have full control over your server, so you can develop the feature as a web part or application page. You can use the default connection method as we use in .Net by having the connection string in web.config. Let me know whether you are looking for some other things.

Hope it helps, please like it or mark it as a solution if it resolves ur clarification or issue
-Sudharsan K...

Hi @Sudharsan K,

 

Many thanks for your reply.

 

Any advise on how to deploy/install it on my site?

I am used to create the web part as an ascx file using c# that I copy in the Layouts/ User Controls folder and also install the related dll file in the GAC.

 

Best regards,

Hi,
You dont have to do all these manually, follow the below link for step by step process
https://www.sharepointsky.com/sharepoint-2016-visual-web-part-using-visual-studio/#Create_visual_web...

Hope it helps, please like it or mark it as a solution if it resolves ur clarification or issue
-Sudharsan K...

Hi @Sudharsan K ,

 

Great!

One last question: spfx platform or SharePoint app can not be used in my case because I mean .NET to connect to my SQL/Oracle databases, right?

 

Many thanks for your prompt support,

best response confirmed by NewUser2020 (Occasional Contributor)
Solution
Hi,
You can use SPFx or SharePoint app but both are client side coding, to access the DB, there has to be a API which i think its over kill for your project. If you think that there is an API or web service that can return the data from DB then you can use SPFx or SharePoint App.

Hope it helps, please like it or mark it as a solution if it resolves ur clarification or issue
-Sudharsan K...

Hi,

 

All is clear now :)

 

Many thanks,