Coding89 c# visual studio 2015 MDB 연결하기! Q. Aceess 2010 ooo.mdb 파일을 visual studio 2015 ver에 연결하여 리스트 띄우기!! DataSet을 만든 다음 액세스 데이터베이스에서 연결하려는 테이블을 끌어다 놓아야 함 실행결과 결론.. 유튜브 최고다!! https://www.youtube.com/watch?v=Y0nXfpCPg9c 2023. 8. 3. c# SQL Server 데이터 조회 프로그램 데이터 조회 단계 데이터베이스 연결 --> 커맨드 생성 --> 데이터 조회 --> 조회한 데이터출력 --> 데이터베이스 닫기 데이터베이스 연결: 연결자 = new SQLConnection("연결 문자열") 커맨드 생성: 커맨드 = new SqlCommand() 커맨드.Connection = 연결자 데이터 조회: 커맨드.CommandText = "SELECT 문장" 리더 = 커맨드.ExecuteReader() 조회한 데이터 출력: while(리더.Read()) { 리더.GetOOO(열번호) } 데이터베이스 닫기: 연결자.close() 실행코드 using System; using System.Collections.Generic; using System.Data.SqlClient; using System.Li.. 2023. 7. 31. c# 데이터 입력 프로그램 작성 naverDB의 userTable에 ENTER를 입력할 때까지 반복해서 한 행씩 데이터 입력 using System; using System.Collections.Generic; using System.Data.SqlClient; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Project13_03 { internal class Program { static void Main(string[] args) { //데이터베이스 연결 string connStr = "Server=localhost\\MSSQLSERVER01;Database=master;Trusted_Connection=True;"; SqlConnectio.. 2023. 7. 31. c#에서 sql server 활용 1. SQL Server 데이터 입력을 위한 c# 코딩 순서 데이터베이스 연결 -> 커맨드 생성 -> 테이블 만들기 -> 데이터 입력(반복) -> 데이터베이스 닫기 > 데이터베이스 연결: 연결자 = new SQL Connection("연결문자열"); 커맨드생성: 커맨드 = new sqlCommand() 커맨드.Connection =연결자 테이블 만들기: 커맨드.CommandText = "CREATE TABLE 문장"; 커맨드.ExecuteNonQuery(); 데이터 입력: 커맨드.CommandText = "INSERT INTO 문장"; 커맨드.ExecuteNonQuery(); 데이터베이스 닫기: 연결자. Close() using System; using System.Collections.Generic; .. 2023. 7. 31. 이전 1 2 3 4 ··· 23 다음