Vamos a explicar cómo poner distintos tipos de conexiones a base de datos, para no tener que realizar un ODBC.
OJO, si se copia desde la WIKI, verificar que las comillas que os copia son las dobles “normales”.
Conexion SQL Server por OLEDB |
---|
connstring=Provider=SQLOLEDB.1;Persist Security Info=False;User ID=usuario;Password=pass;Initial Catalog=basedatos;Data Source=gestorbasededatos |
Conexión SQL Server |
---|
Provider=SQLOLEDB.1;Persist Security Info=False;User ID=user;Password=pass;Initial Catalog=basedatos;Data Source=gestorbasedatos |
Conexion SQL Server |
---|
Provider=System.Data.sqlclient;Data Source=127.0.0.1;Initial Catalog=basedatos;Persist Security Info=True;User ID=user;Password=pass |
Conexion MYSQL |
---|
Provider=mysql.Data.mysqlclient;Persist Security Info=False;database=basedatos;server=127.0.0.1;user id=user;Password=pass;port=1234 |
Conexión SQL Server |
---|
<add name=“xonesqlserver” connectionString=“Data Source=IPSERVIDORBD;Initial Catalog=basedatos;Persist Security Info=True;User ID=user;Password=pass” providerName=“System.Data.sqlclient” /> |
Conexión MYSQL |
---|
<add name=“xonemysql” connectionString=“Persist Security Info=False;database=basedatos;server=IPSERVIDORBD;user id=user;Password=pass” providerName=“mysql.Data.mysqlclient” /> |
Conexión ORACLE |
---|
<add name=“xoneoracle” connectionString=“Data Source=CGS;Persist Security Info=True;User ID=user;Password=pass;Unicode=True” providerName=“System.Data.oracleclient” /> |