'연결'에 해당되는 글 2건

IT/PHP

php로 mssql 연결

dbcon.php
1
2
3
4
5
6
7
8
9
<?php
    $username = 'username';
    $pass = 'password!';
    $ip = 'ip';
    $dbname = 'dbname';
 
    $connection_string = "Driver={SQL Server};Server=".$ip.";Database=".$dbname;
    $conn = odbc_connect($connection_string,$username,$pass);
?>
cs


,
IT/Delphi

델파이로 mssql 데이터베이스 연결


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
var
 msConnection : TMSConnection;
begin
   msConnection := TMSConnection.Create(nil);
   with msConnection do
   begin
     try
       DisConnect;

       Authentication := auServer;
       Username       := id;
       Password       := pw;
       Server         := serverip;
       Database       := dbname;

       Connect;
      except
        on E : Exception do
        begin
          DisConnect;
          exit;
        end;
      end;
   end;
end;
cs


,

최근 댓글

최근 트랙백

알림

이 블로그는 구글에서 제공한 크롬에 최적화 되어있고, 네이버에서 제공한 나눔글꼴이 적용되어 있습니다.

링크

카운터

Today :
Yesterday :
Total :