468,470 Members | 2,080 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,470 developers. It's quick & easy.

Asp connection not working

347 100+
i have just got hosting on a virtual server and amtrying to get my site working on it

I have the code

Expand|Select|Wrap|Line Numbers
  1. <%
  2. On Error Resume Next
  3.  
  4. Response.Expires=0
  5. Set yaketyConnection=Server.CreateObject("ADODB.Connection")
  6. DatabaseDetails="DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Server.Mappath("D:\vhosts\yaketyyak.co.uk\private\yaketyyak.mdb") & ";"
  7. yaketyConnection.Open DatabaseDetails
  8. yaketyQuery="SELECT * FROM celebs INNER JOIN celebsvoicetypes ON celebs.idnumber = celebsvoicetypes.celebidvoicetypes WHERE celebsvoicetypes.celebstypes ='" &voiceid& "' AND celebs.sex = 'm' ORDER BY celebs.surname,celebs.firstname"
  9. Set yaketyRecordset=yaketyConnection.execute(yaketyQuery)
  10.  
  11. i=yaketyRecordset.recordcount
  12.  
  13. Dim iCount
  14. %>
which works fine in a shred hosting environment, but does not work now.

i have set up an ODBC DSN connection in my control panel and tested it this connects.

what i cant figure out is how to use this ODBC DSN connection that i have set up in my asp page to access the database.
Jun 17 '11 #1
0 1244

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by viviane lima - * - * - | last post: by
3 posts views Thread by Chris Tilley - HPC:Factor | last post: by
3 posts views Thread by R Reyes | last post: by
35 posts views Thread by Eric Sabine | last post: by
3 posts views Thread by Martin B | last post: by
29 posts views Thread by Bryce K. Nielsen | last post: by
3 posts views Thread by =?Utf-8?B?RFNJU3VwcG9ydA==?= | last post: by
reply views Thread by NPC403 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.