For SQL Server ODBC Driver
' VB.NET
Imports System.Data.Odbc
...
Dim oODBCConnection As OdbcConnection
Dim sConnString As String = _
"Driver={SQL Server};" & _
"Server=MySQLServerName;" & _
"Database=MyDatabaseName;" & _
"Uid=MyUsername;" & _
"Pwd=MyPassword"
oODBCConnection = New Odbc.OdbcConnection(sConnString)
oODBCConnection.Open()
For Oracle ODBC Driver
' VB.NET
Imports System.Data.Odbc
...
Dim oODBCConnection As OdbcConnection
Dim sConnString As String = _
"Driver={Microsoft ODBC for Oracle};" & _
"Server=OracleServer.world;" & _
"Uid=myUsername;" & _
"Pwd=myPassword"
oODBCConnection = New Odbc.OdbcConnection(sConnString)
oODBCConnection.Open()
For Access (JET) ODBC Driver
' VB.NET
Imports System.Data.Odbc
...
Dim oODBCConnection As OdbcConnection
Dim sConnString As String = _
"Driver={Microsoft Access Driver (*.mdb)};" & _
"Dbq=c:\somepath\mydb.mdb;" & _
"Uid=Admin;" & _
"Pwd="
oODBCConnection = New Odbc.OdbcConnection(sConnString)
oODBCConnection.Open()
For Sybase System 11 ODBC Driver
' VB.NET
Imports System.Data.Odbc
...
Dim oODBCConnection As OdbcConnection
Dim sConnString As String = _
"Driver={Sybase System 11};" & _
"SRVR=mySybaseServerName;" & _
"DB=myDatabaseName;" & _
"UID=myUsername;" & _
"PWD=myPassword"
oODBCConnection = New OdbcConnection(sConnString)
oODBCConnection.Open()
For all other ODBC Drivers
' VB.NET
Imports System.Data.Odbc
...
Dim oODBCConnection As OdbcConnection
Dim sConnString As String = "Dsn=myDsn;" & _
"Uid=myUsername;" & _
"Pwd=myPassword"
oODBCConnection = New Odbc.OdbcConnection(sConnString)
oODBCConnection.Open()
2004/12/21
ADO.NET DB연결 문자열 - System.Data.ODBC
가장 많이 본 글
-
Windows Server 2003 Service Pack 1 에서 부터는, 64-bit IIS 에서는 32-bit 응용프로그램을 운영할 수가 있습니다. Windows-32-on-Windows-64 (WOW64) 기술을 통해서 말이죠.^^ 그런데, 6...
-
이벤트 형식: 정보 이벤트 원본: MSSQLSERVER 이벤트 범주: (2) 이벤트 ID: 3406 날짜: 2008-08-12 시간: 오전 9:00:36 사용자: N/A 컴퓨터: ERP02 설명: 24개의 트랜잭션이 데이터베이스 'RexG...
-
IP 주소를 설정하거나, 변경을 할려면 어떤 인터페이스에 어떤 IP 주소가 설정이 되어 있는지 확인을 먼저 해야 합니다. 다음과 같이 해당 컴퓨터의 모든 이더넷 인터페이스의 설정값을 확인할 수 있습니다. wmic:root\cli>nicconfi...
댓글 없음:
댓글 쓰기