Contact Us Forum Rules Search Archive
WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-06-2004, 02:54 PM
WebProWorld Member
 

Join Date: Jan 2004
Location: England
Posts: 52
mmltonge RepRank 0
Default Connecting using ASP

Hi, i recently transferred hosts without checking whether i could continue using access. The new host only uses MySQL databases, they have set up a DSN connection for me under the name 'Festival' My current code reads

<%
Dim objRec
strConnect = "Driver={Microsoft Access Driver (*.MDB)}; DBQ="& Server.Mappath("websitedb0283716391.mdb")
set objRec = Server.CreateObject("ADODB.Recordset")
objRec.Open "SELECT * FROM LINEUP ORDER BY DAY", strConnect

^^^^ Firstly what would i need to change to to get it to work with MySQL if the DSN name is Festival, user name is Festival and password is readfest2004?

Response.Write
... ---- Creating the table headers
Do While Not objRec.EOF
Response.Write "<tr><td align='center'><font color='#000000' size='2' face='Verdana, Arial, Helvetica, sans-serif'>" & objRec("BANDNAME") & "</font></td><td align='center'><font color='#000000' size='2' face='Verdana, Arial, Helvetica, sans-serif'>" & objRec("STAGE") & "</font></td><td align='center'><font color='#000000' size='2' face='Verdana, Arial, Helvetica, sans-serif'>" & objRec("DAY") & "</font></td></tr>"

^^^^^^^ Will i need to change the code used to display items?

objRec.MoveNext
Loop
Response.Write "</table>"
objRec.Close
Set objRec = Nothing

^^^^^^^ any of that need changing?
%>

As far as i can tell all that needs to be really sorted out it the top section PLEASE help

Thanks
Mark
Reply With Quote
  #2 (permalink)  
Old 04-06-2004, 06:50 PM
WebProWorld Member
 

Join Date: Jan 2004
Location: England
Posts: 52
mmltonge RepRank 0
Default

ok i sorted it i had the DSN name incorrect :)
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Tags: , ,



Thread Tools
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On


Search Engine Optimization by vBSEO 3.2.0