iEntry 10th Anniversary Forum Rules Search
WebProWorld
Register FAQ Calendar 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.

Share Thread: & Tags

Share Thread:

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

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 03:32 PM.



Search Engine Optimization by vBSEO 3.3.0