Connect to a SQL database
connect to a SQL database
AI
Shrnutí 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.
Zdrojový kód
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");
}
}
Původní komentáře (3)
Obnoveno z Wayback Machine