views:

427

answers:

2

Hi, When my classic asp page gets to this line of code

Dim cnn As ADODB.Connection

it throws an error http 500. I suppose ado is not correctly installed

Any ideas?

A: 

I doubt that ADO is not installed correctly. Try connecting via the Universal Data Link. You can follow the directions here. http://www.vbrad.com/article.aspx?id=81

You should be able to see whether you can connect or not. If not, you'll get a much more detailed message than you got from ASP.

AngryHacker
+1  A: 

VBScript doesn't let you specify the type - everything is a variant so your code should read

Set cnn = Server.CreateObject("ADODB.Connection")

Bryan Waters
Correct. `Dim cnn : Set cnn = Server.CreateObject("ADODB.Connection")` is more likely what you want...
Funka
Who dim's anything in vbscript. It's not like you've got option explicit or anything.
Bryan Waters