I have just started working with Dynamics Finance and operations, how can I connect with sql server in visualstudio using x++. Is there something like connectionstring?
No, there isn't anything like a connection string, because the environment is already configured to use a particular database (which may be Azure SQL, not SQL Server). You're always connected to it.
If you have access to Dynamics Learning Portal, you can watch an introductory course to programming in Finance and Operations. If you can't get access, you can use online resources and books.
Thank you, so I can directly write the query in code and execute it?
That's correct. It will automatically gets data from the AX transactional database.