PDA

Click to See Complete Forum and Search --> : TCP/IP connection to SQL with ASP


scotty
Mar 2nd, 2001, 08:18 AM
Hello,

I have two Win 2k Advanced Server boxes. One contains ASP pages. The other has MS SQL server on it.

The machines are connected with IP only. They are not "networked" together, no shared drives, etc.

I have been reading up on connection strings, but I can't figure out how to force a TCP/IP connection.

This is what I came up with, but it doesn't work.

<%
strConnect = "Driver={SQL Server}; Server=sql://sqlserv.example.com:1433; database=hous1; uid=floppy; pwd=32disk99"
%>

Thanks,
Scott

jdavison
Mar 2nd, 2001, 08:30 AM
Are they both connected to the internet? If not and they arent on the same netowrk then you cant do it from a different server. if they are both on the internet try this string.

Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=<database name here>;Data Source=<server ip here>

just put the info in for initial catalog and datasource. And dont leave the<>

Hope this helps

Achichincle
Mar 2nd, 2001, 01:54 PM
jdavison,

Can this be done for AccessDB's also or only SQL?

jdavison
Mar 2nd, 2001, 01:57 PM
Not as far as i know. SQL server runs as a server so it respond to the request, access has to be connected to directly. Not sure if odbc would allow for that or not since i have never tried it

Achichincle
Mar 2nd, 2001, 02:11 PM
Thanks.

It just further points at me having to upgrade to SQL7 for connectivity...

jdavison
Mar 2nd, 2001, 02:22 PM
yep, wished i could convince them of that here

scotty
Mar 2nd, 2001, 04:16 PM
The two machines are connected via internet...

How can I put in a password to the SQL database?

Thanks,
Scott