|
Hey there,
I'm really rusty with connecting to a database via ASP "classic". I usually do this in PHP.
I'm building a newsletter archive system. I created the table in MS-SQL on a remote server. When a person clicks a certain month, I want the listing of the articles to appear into an asp page.
Because the tables are on a remote server, I believe I have to use a dsn-less connection.
I wrote the original program in PHP. But my job wants to keep their pages in ASP. To connect via PHP here's what I do... (the "real names" have been changed to protect the innocent.)
$server="servername.hostingcompany.com";
$username="our_user_name";
$password="our_password";
$sqlconnect=mssql_connect($server, $username, $password);
$sqldb=mssql_select_db("databasename",$sqlconnect) ;
$sqlquery="SELECT article_field FROM table;";
$results= mssql_query($sqlquery);
I'm comfortable with creating and reading recordsets in ASP, it's just opening the proper connection.
Could anyone please help?
Thanks
Donna
|