|
-
September 24th, 2002, 03:46 PM
#1
It should be noted that the ADO style of connecting was mimicked by PHP when they created their connection objects for their database servers. It makes it very easy (once you know function names) for an ASP programmer to switch over to PHP and vice versa.
Look at the similarities:
ADO:
set DBConn = Server.CreateObject("ADODB.Connection")
DBConn.Open "Connection_String", "DB_UserName", "DB_Password"
Query = "select column from table where othercolumn = 'someval'"
set rs = DBConn.Execute(Query)
PHP:
$conn = mysql_connect("ServerName", "DB_UserName", "DB_Password");
mysql_select_db("myDB", $conn);
$Query = "select column from table where othercolumn = 'someval'";
$rs = mysql_query($Query, $conn);
They are basically identical with the exception that PHP's mysql_connect function doesn't have a connection string, just the server name (and port, optionally), whereas the ADO-style connection string includes the database name, and the various optional connection parameters. Fundamentally they are identical, and efficiency is the principal reason for it.
If you're going to write on an ASP platform, you'd best use COM objects, otherwise you're really not getting anything in the way of efficiency.
Chris Shepherd
The Nelson-Shepherd cutoff: The point at which you realise someone is an idiot while trying to help them.
\"Well as far as the spelling, I speak fluently both your native languages. Do you even can try spell mine ?\" -- Failed Insult
Is your whole family retarded, or did they just catch it from you?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|