|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Asp and Mysql: converting code from use with access
Hello everyone!
I converted my access to mysql and am trying to load a page via an ASP connect to the database. I recieve this error. _______________________________________________ Microsoft VBScript runtime error '800a01a8' Object required: '' config.asp, line 12 ________________________________________________ The conig file is an include in every page on my website so I need to get it to work. Any help would be greatly appreciated!! Here is the problem code for config.asp: <% dim strConnection, adoDataConn, sqlString, RS, con strConnection = "Driver={MySQL ODBC 3.51 Driver}; server=localhost;uid=correct;pwd=correct;database=correct" Set adoDataConn = Server.CreateObject("ADODB.Connection") adoDataConn.Open strConnection %> <% sqlString = "SELECT * FROM config " &_ "ORDER BY header_colour DESC" SET RS = Con.Execute( sqlString ) WHILE NOT RS.EOF line 12 is: SET RS = Con.Execute( sqlString ) |
|
#2
|
|||
|
|||
|
hi o1webdawg,
i think you have two errors. 1) you did not open recordset for your rs. Add this line below as well. Code:
Set rs = Server.CreateObject("ADODB.Recordset")
2) you set the "adoDataConn" but not the "con". So how can you run your con.execute? i think it should be "adoDataConn.execute" Code:
SET RS = adoDataConn.Execute(sqlString) let me know if i'm wrong. happy coding ![]() |
|
#3
|
|||
|
|||
|
Thanks alot. The generic connecection string I found on the internet for mysql had a different name. So I just needed to change the .execute line to be the same.
Best Regards' matt |
|
#4
|
|||
|
|||
|
your welcome. glad to help.
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > Asp and Mysql: converting code from use with access |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|