digitalmars.D.learn - How to connect SQLserver to Dlang using ddbc library
- dany (20/20) Mar 13 Hello people, I WOULD LIKE TO KNOW HOW I CAN CONNECT FROM MY SQL
Hello people, I WOULD LIKE TO KNOW HOW I CAN CONNECT FROM MY SQL Server to my database. I have seen the GitHub of DDBC, but I'm getting errors. I just made this code, in my SQL Server I don't have any password or user to log in, I just want to enter the name of my database or the server. This is the name of my server: DESKTOP-HLK011R\MSSQLSERVER02 and for example, the name of my database: BDPruebaEmpleados ` import std.stdio; import std.json; import raylib; import ddbc; void main() { string urlServer = "ddbc:sqlserver://localhost,1433?user=sa,password=bbk4k77JKH88g54,driver=FreeTDS"; auto conn = createConnection(urlServer); scope(exit) conn.close(); } `
Mar 13