SPFx and SQL

%3CLINGO-SUB%20id%3D%22lingo-sub-233777%22%20slang%3D%22en-US%22%3ESPFx%20and%20SQL%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-233777%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20all%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20currently%20trying%20to%20refactor%20our%20old%20webparts%20into%20SPFx%20solutions.%26nbsp%3B%20I'm%20hitting%20a%20roadblock%20on%20a%20couple%20of%20the%20webparts.%20Some%20of%20these%20older%20webparts%20are%20running%20some%20SqlCommands%20to%20execute%20a%20stored%20procedure.%26nbsp%3B%20Is%20there%20any%20way%20to%20do%20this%20with%20SPFx%20or%20does%20anyone%20have%20a%20better%20recommendation%3F%20I'm%20still%20fairly%20new%20to%20all%20of%20this%20so%20I'm%20trying%20to%20figure%20out%20what%20I%20don't%20know%20about%20what%20I%20don't%20know.%3C%2FP%3E%3CP%3E%3CBR%20%2F%3EThanks%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-233838%22%20slang%3D%22en-US%22%3ERe%3A%20SPFx%20and%20SQL%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-233838%22%20slang%3D%22en-US%22%3EYou%20cannot%20query%20a%20SQL%20Datase%20directly%20from%20SPFx%2C%20but%20you%20can%20make%20a%20call%20to%2C%20for%20instance%2C%20an%20Azure%20Function%20that%20exposes%20your%20SQL%20Database%3C%2FLINGO-BODY%3E
New Contributor

Hi all,

 

I'm currently trying to refactor our old webparts into SPFx solutions.  I'm hitting a roadblock on a couple of the webparts. Some of these older webparts are running some SqlCommands to execute a stored procedure.  Is there any way to do this with SPFx or does anyone have a better recommendation? I'm still fairly new to all of this so I'm trying to figure out what I don't know about what I don't know.


Thanks

1 Reply
You cannot query a SQL Datase directly from SPFx, but you can make a call to, for instance, an Azure Function that exposes your SQL Database