Advertisement
C_Volume2 OLE/ COM/ DCOM/ Active-X #85008

Connect to a SQL database

connect to a SQL database

AI

Riepilogo AI: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Codice sorgente
original-source
Compile with:
csc SQLConnect.cs /r:system.data.dll;system.dll

using System;
using System.Data.SQL;
public class SQLConnect
{
private String connString = "";
private SQLConnection dataConn = null;
public void OpenConnection(string connString)
{
this.connString = connString;
dataConn = new SQLConnection(connString);
dataConn.Open();
}
public static void Main(String [] args)
{
SQLConnect dbTest = new SQLConnect();
dbTest.OpenConnection("server=BEACH;uid=;pwd=;database=junk");
}
}
Commenti originali (3)
Recuperato da Wayback Machine