By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,162 Members | 1,061 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,162 IT Pros & Developers. It's quick & easy.

Asp connection not working

P: 347
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
  4. Response.Expires=0
  5. Set yaketyConnection=Server.CreateObject("ADODB.Connection")
  6. DatabaseDetails="DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Server.Mappath("D:\vhosts\\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 = 'm' ORDER BY celebs.surname,celebs.firstname"
  9. Set yaketyRecordset=yaketyConnection.execute(yaketyQuery)
  11. i=yaketyRecordset.recordcount
  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
Share this question for a faster answer!
Share on Google+

Post your reply

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