SunQuest
           ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
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  
Old October 2nd, 2003, 03:27 AM
o1webdawg o1webdawg is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 9 o1webdawg User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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 )

Reply With Quote
  #2  
Old October 2nd, 2003, 04:01 AM
pda8333 pda8333 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 216 pda8333 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 h 6 m 31 sec
Reputation Power: 5
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

Reply With Quote
  #3  
Old October 2nd, 2003, 04:37 PM
o1webdawg o1webdawg is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 9 o1webdawg User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
  #4  
Old October 2nd, 2003, 07:14 PM
pda8333 pda8333 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 216 pda8333 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 h 6 m 31 sec
Reputation Power: 5
your welcome. glad to help.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > Asp and Mysql: converting code from use with access


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway