Thursday, August 10, 2006

Database connection

I'm still reluctant to join the VWD camp because Microsoft has made it too difficult for amateur. May be they don't want us to join.

To illustrate my point, e.g. to connect to MySql database

In php/MySql it would be like this

$var = mysql_connect("localhost","root","yourpwd","yourMySql")


Back in the old days when I used vbscript in ASP 3.0, it was

Set Connect = Server.CreateObject("ADODB.Connection")
Connect.open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source= " & yourExcelfile & ";" & _
"Extended Properties=""Excel 8.0; HDR=YES;"""


The above was for connection to a Excel file, I don't expect connecting MySql would be very much different if OLEDB driver was also used. OK I have to admit that there was a adovbs file in the server side include folder with a number of constants to make it work.

My point is I didn't have to use any IDE to do that?

No comments:

Post a Comment