| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| DesignersTalk > Using ASP created in DreamWeaver for GoDaddy |
|
LinkBack | Thread Tools | Search this Thread |
|
|
#1 (permalink) |
|
Registered User
Join Date: Dec 2007
Posts: 8
|
Using ASP created in DreamWeaver for GoDaddy
Hi all, i've been developing my ASP pages in Dreamweaver using data from an Access Database that mimics the Dir settings of my GoDaddy file structure and it works perfectly. Once uploaded to GoDaddy however it no longer works, the connection settings are different. I have contacted GoDaddy suport and were not very helpfull but they do have some code for connecting to an Access mdb and it works, however trying to use it to design in DreamWeaver it will not display. The code is as follows: <% Dim oConn, oRs Dim qry, connectstr, sDSNDir Dim db_name, db_username, db_userpassword Dim db_server, dsn_name dsn_name = "access_MyData.dsn" fieldname = "link" tablename = "qrylinks" sDSNDir = Server.MapPath("_dsn") connectstr = "filedsn=" & sDSNDir & "/" & dsn_name Set oConn = Server.CreateObject("ADODB.Connection") oConn.Open connectstr qry = "SELECT * FROM " & tablename Set oRS = oConn.Execute(qry) if not oRS.EOF then while not oRS.EOF response.write ucase(fieldname) & ": " & oRs.Fields(fieldname) & " " oRS.movenext wend oRS.close end if Set oRs = nothing Set oConn = nothing %> Which works fine on my site, but not in DW, and my DW code that works perfectly on localHost but not on GoDaddy is as follows: <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <!--#include file="Connections/access_MyData.asp" --> <% Dim rstTest Dim rstTest_numRows Set rstTest = Server.CreateObject("ADODB.Recordset") rstTest.ActiveConnection = MM_access_MyData_STRING rstTest.Source = "SELECT * FROM qryLinks ORDER BY Link ASC" rstTest.CursorType = 0 rstTest.CursorLocation = 2 rstTest.LockType = 1 rstTest.Open() rstTest_numRows = 0 %><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Untitled Document</title> </head> <body> <table width="800" border="0"> <tr align="left" valign="top"> <th width="99" height="349" scope="col"><P> <%=(rstTest.Fields.Item("Link").Value)%> </P></th> <th width="354" scope="col"> </th> <th width="333" scope="col"> </th> </tr> </table> </body> </html> <% rstTest.Close() Set rstTest = Nothing %> This is irritating since i've used asp code created in DW on websites that are hosted at various companies I have worked for and developing and hosting works perfectly but not so we GoDaddy. Has anyone come up against this problem before, any advice ? Thanks in advance, Mitch... |
|
|
|
![]() |