Changes

From SME Server
Jump to navigationJump to search
237 bytes added ,  15:20, 19 June 2009
m
update
Line 88: Line 88:  
  unixodbc: yes
 
  unixodbc: yes
   −
Test connection to a foreign database, overriding settings in freetds.conf (modify to suit your conditions, ip could be replaced with FQDN):
+
Test connection to the foreign database, overriding settings in freetds.conf (modify to suit your conditions, ip could be replaced with FQDN):
    
  tsql -H 192.168.0.112 -p 1433 -U dbuser -P dbpass
 
  tsql -H 192.168.0.112 -p 1433 -U dbuser -P dbpass
Line 160: Line 160:  
  [remoteserver]
 
  [remoteserver]
 
  Driver = FreeTDS
 
  Driver = FreeTDS
  Description = Connection to DB_KALLE on server xp3c
+
  Description = Connection to database DB_TEST on server xp3c
 
  Trace = No
 
  Trace = No
 
  Server = xp3c
 
  Server = xp3c
  Database = db_kalle
+
  Database = db_test
 
  Port = 1433
 
  Port = 1433
 
  TDS_Version = 8.0
 
  TDS_Version = 8.0
Line 182: Line 182:  
====tsql====
 
====tsql====
 
Test connection, using input in freetds.conf:
 
Test connection, using input in freetds.conf:
  tsql -S remoteserver -U testuser -P testpass
+
  tsql -S remoteserver -U dbuser -P dbpass
    
This should output something like this:
 
This should output something like this:
Line 220: Line 220:  
and
 
and
 
  phpinfo();
 
  phpinfo();
 +
and
 +
  $con = odbc_connect("remoteserver", "dbuser", "dbpass");
 +
  if (!$con) { print("There is a problem with SQL Server connection."); }
 +
  else { print("The SQL Server connection object is ready.");
 +
          odbc_close($con); }
    
=== Additional information ===
 
=== Additional information ===
206

edits

Navigation menu