How to connect SQLserver to Dlang using ddbc library

2024-03-13 Thread dany via Digitalmars-d-learn
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();

}

`


Re: Alguien me dice como podria conectarme a una base de datos en SQL server?

2024-03-14 Thread dany via Digitalmars-d-learn
On Thursday, 14 March 2024 at 16:55:12 UTC, Ferhat Kurtulmuş 
wrote:

On Thursday, 14 March 2024 at 16:42:04 UTC, dany wrote:

[...]


Deberias preguntar en Ingles en este foro. No mucha gente que 
habla Espanol aqu. Puedes buscar un biblioteca en 
https://code.dlang.org/search?q=sql. Usa un biblioteca de allı. 
No se como se lol hace con MySQL pero se lo hace con MySQL:


https://code.dlang.org/packages/mysql-native
import mysql.safe;

Connection conn;

Connection connectDB(){
auto connectionStr = 
"host=localhost;port=3306;user=root;pwd=;db=deneyler";

return new Connection(connectionStr);
}

Tines que usar una otra biblioteca por MySQL, por supuesto


queria conectarme a SQLserver :'(


Re: Alguien me dice como podria conectarme a una base de datos en SQL server?

2024-03-14 Thread dany via Digitalmars-d-learn

On Thursday, 14 March 2024 at 17:22:35 UTC, Matheus wrote:

On Thursday, 14 March 2024 at 17:08:17 UTC, dany wrote:

...
queria conectarme a SQLserver :'(


You will need an ODBC driver (Bindings):

https://code.dlang.org/packages/arsd-official%3Amssql

Matheus.


ese tambien conecta con sql server?


Re: How can I get an identifiquer of an usb or a harddisk? using C or Cpp or Dlang

2024-04-03 Thread dany via Digitalmars-d-learn
On Wednesday, 3 April 2024 at 00:20:51 UTC, Jonathan M Davis 
wrote:
On Monday, April 1, 2024 5:37:56 PM MDT dany via 
Digitalmars-d-learn wrote:

Actually I would get an ID's Usb


That's going to depend on the operating system, and it's also 
going to depend on exactly what kind of ID you're looking for.


- Jonathan M Davis


I want in win10