View Full Version : code error, please help debug
scroots
10-05-2002, 08:31 PM
i have some code i used a couple of moths ago, but now it doesn`t work. i run it on my pc via PWS, it worked as i say 2 months ago and i haven`t modififed it.
the error is:
Microsoft VBScript runtime error '800a01b6'
Object doesn't support this property or method: 'CreateObject'
/route card/guestbook.asp, line 15
and line 15 of my code is:
Set adoCon = Server.CreateObject("ADODB.Connection")
do i need to post some more of my code?
has anyone got any ideas?
i have added and then removed mysql server in the meantime does that have any relevance?
thanks in advance
scroots
oracleguy
10-05-2002, 09:25 PM
Could you post the rest of your connection code?
Which driver are you using? (i.e. MySQL, Access, Jet, SQL, etc)
whammy
10-06-2002, 04:21 AM
i have added and then removed mysql server in the meantime does that have any relevance?
Yes, it does... make sure that you have assigned write permissions (and DSNs if you need them) to the database...
scroots
10-06-2002, 09:38 AM
some more of my code
'Dimension variables
Dim adoCon 'Holds the Database Connection Object
Dim rsGuestbook 'Holds the recordset for the records in the database
Dim strSQL 'Holds the SQL query for the database
'Create an ADO connection odject
Set adoCon = Server.CreateObject("ADODB.Connection")
'Set an active connection to the Connection object using a DSN-less connection
adoCon.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("guestbook.mdb")
'Set an active connection to the Connection object using DSN connection
'adoCon.Open "DSN=guestbook"
'Create an ADO recordset object
Set rsGuestbook = Server.CreateObject("ADODB.Recordset")
'Initialise the strSQL variable with an SQL statement to query the database
strSQL = "SELECT tblComments.F, tblComments.T, tblComments.D, tblComments.Di, tblComments.M, tblComments.H, tblComments.Ti, tblComments.Total FROM tblComments;"
'Open the recordset with the SQL query
rsGuestbook.Open strSQL, adoCon
whammy were do i change the permissions of the dsns?
cheers
scroots
whammy
10-06-2002, 05:27 PM
Well it looks like you're using a DSNless connection (and an access database), so that you shouldn't have to worry about.
If you're hosting the server, go to the folder in question and check the security settings on it to start with. :)
Also make sure you have the right .mdb driver installed...
scroots
10-06-2002, 06:58 PM
its not a major server its just PWS on my Pc so i can test my scripts, and use it for peronal use.
it worked 2 months ago.
scroots
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.