Database Management
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesDatabase Management

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
1200+ fellow developers rate and compare features of the top IDEs, like Visual Studio, Eclipse, RAD, Delphi and others, across 13 categories. Enjoy this FREE Download of the IDE User Satisfaction Study by Evans Data Corporation. Download Now!
  #1  
Old July 23rd, 2003, 04:38 PM
aratbor aratbor is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: Calgary, Canada
Posts: 3 aratbor User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
iis - mssql server - remote connection help

Please help....

I am wondering how to remotely connect to my mysql database.

The database is sitting on a Windows 2000 Server machine, with IIS and MySQL 2000 Server.

I know the IP address, the server name, username, passwords. Yet I still can't connect. Is it a security issue, or am I using the wrong connection string.
Do I have to configure anything in IIS?
If anybody thinks they can help, I'll send you the connection info, and you can test it out.....

Thanks.

Reply With Quote
  #2  
Old July 24th, 2003, 12:51 AM
messorian messorian is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: NY
Posts: 18 messorian User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 34 m 18 sec
Reputation Power: 0
Aratbor, can you please give a few more details as to what you are trying to accomplish? Are you trying to have a web page connect to a sql server backend or are you trying to establish a connection from IIS to MSSQL for some other reason? If you are trying to query data for a dynamic webpage, please give a list of the technologies you are using and how you are currently trying to connect to the database. From there we should be able to help you out a bit more.

-- messorian

Reply With Quote
  #3  
Old July 24th, 2003, 01:31 AM
aratbor aratbor is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: Calgary, Canada
Posts: 3 aratbor User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I am ultimately trying to display dynamic data on a web page using 'php'.
In the past, I have used a service provider who hosted my database. But now, I have my own windows 2000 server with MS SQL 2000 server.

This is how I usually connect.

$host = 'sql.hostname.com';
$username = 'username';
$password = 'password';
$dbname = 'databasename';
$Link = mysql_connect( $host, $username, $password );


When I configured my 'MS SQL server', I have a specific ServerName (apparently you can have multiple server instances)
I have called this server 'MYSERVER'

I hope this is descriptive enough.


Thanks again.

Reply With Quote
  #4  
Old July 24th, 2003, 01:46 AM
pabloj's Avatar
pabloj pabloj is offline
Modding: Oracle MsSQL Firebird
Dev Shed God 6th Plane (7500 - 7999 posts)
 
Join Date: Jun 2001
Location: Outside US
Posts: 7,711 pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level) 
Time spent in forums: 2 Months 2 Weeks 6 Days 5 h 22 m 58 sec
Reputation Power: 259
You are using the mysql functions, but since you have MSSQL you need to use those!
Take a look at the manual available at www.php.net
Also this article could be of some help at least in configuring your connection to db (http://www.devarticles.com/art/1/100)

Reply With Quote
  #5  
Old July 24th, 2003, 02:21 AM
messorian messorian is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: NY
Posts: 18 messorian User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 34 m 18 sec
Reputation Power: 0
As pabloj noted, you are using the wrong functions to connect to Microsoft Sql Server. You want to use mssql_pconnect(). To get the mssql functions to work take the following steps:
1) Open the php.ini file
2) Search for: ;extension=php_mssql.dll
3) Remove the semi-colon to uncomment the line
4) save the file
5) change your code to use the mssql_* functions.


Now, if you get an error at this point saying that it can not find the required dll, all you need to do is download the binary zip file for windows (not the installer). Now, hunt around in the zip file and you will find php_mssql.dll. Simply unzip the single file into your php directory and you should be all set.

-- messorian

Below is a link to the php documenation for mssql.
Accessing MSSQL from php

Reply With Quote
  #6  
Old July 24th, 2003, 08:25 PM
WineIsGood's Avatar
WineIsGood WineIsGood is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: New York
Posts: 49 WineIsGood User rank is Private First Class (20 - 50 Reputation Level)WineIsGood User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 7 m 51 sec
Reputation Power: 6
If you can use an ODBC connection, simply use the MS Client Network Utility to create a TCP/IP Alias. Give it a name and point it to the IP address of the server. Then, create an ODBC connection against that alias. Now you're connected to the remote SQL Server across the Internet.
-Dave

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesDatabase Management > iis - mssql server - remote connection help


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway