@michelchau There is no difference in the connection for Azure SQL Database and Azure Synapse (formerly Azure SQL Datawarehouse)
Please check this code sample for step by step instructions
Do let us know if you have further questions.
If an Answer is helpful, please “Accept Answer” or Up-Vote for the same which might be beneficial to other community members reading this thread.