Need Advice on website designed using Asp

bg

Free Member
May 15, 2005
81
0
Hi all,

I have a website that we will be changing the hosting company. As a result the formal hosting/web developer company have send the files and the mssql database objects over. I am using dreamweaver but for some reason the links are not working maybe due to the database. I have mssql server running on a local machine.

Please pm me if you can help.

Thanks in advance
 
K

Keepsmilin

I am not really clear about your question, however this is to what I have understood---Check if the paths provided are absolute or relative. Could be that they are hard coded. Check with the connection string to the database.

Cheers

:)
Ezylet Services
 
Upvote 0
C

computaguy

Hi,I think I have an idea. Have you created the new web on a local web server? ASP pages will often only work on IIS, found on a microsoft web server. There is a small version of this shipped with many versions of windows called PWS (personal web server) and of you create the new web there you are in with a fighting chance.If you are moving your pages to a different host, make sure that the host is providing you with Microsoft hosting.How many pages do you have?
 
Upvote 0
C

computaguy

Also...Check whether your database engine should be MSSQL or MYSQL. The latter is much more commonly used for web sites, but if you are trying to run your MYSQL with a MSSQL database you are heading for heaps of trouble.
 
Upvote 0

bg

Free Member
May 15, 2005
81
0
IIS is configured, the database is designed using MSSQL/Access but not MYSQL. The new hosting is MShosting account. I am posting the connection.asp webpage here.

<%
' FileName="Connection_odbc_conn_dsn.htm"
' Type="ADO"
' DesigntimeType="ADO"
' HTTP="false"
' Catalog=""
' Schema=""
Dim MM_BOE_STRING
MM_BOE_STRING = "dsn=BOE;uid=dt-data;pwd=********;"

%>


Calling on all ASP guru to pls help?
 
Upvote 0

dave_n

Free Member
Oct 27, 2007
2,842
272
Lancashire
you should write the ado connections yourself manually....and you should NOT be using dsn connections

here you go (dsn-less)

' create a connection string and connection object
constring = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & server.mappath("your_database.mdb")
set conn=Server.CreateObject("ADODB.Connection")

conn.Open constring
set rs = Server.CreateObject("ADODB.recordset")
sql = "SELECT * from table where blah blah blah"
rsr.Open sql, conn
do until rsr.EOF
var_something = rsr.Fields("a field")
rsr.MoveNext
loop


' close the recordset and connection
rs.close
conn.close

' clean up !!!!
set rs = nothing
set conn = nothing
 
Upvote 0

bg

Free Member
May 15, 2005
81
0
Thanks Dave,

I think I only need to open a connection to the database using the connection.asp web page. The other pages that uses database have their query string hard coded. the page will only need
<!--#include virtual="Connections.asp" -->
<%.asp

Question. Do I need to use Dim constring?
constring = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & server.mappath("your_database.mdb")

Many thanks
 
Upvote 0
IIS is configured, the database is designed using MSSQL/Access but not MYSQL. The new hosting is MShosting account. I am posting the connection.asp webpage here.

<%
' FileName="Connection_odbc_conn_dsn.htm"
' Type="ADO"
' DesigntimeType="ADO"
' HTTP="false"
' Catalog=""
' Schema=""
Dim MM_BOE_STRING
MM_BOE_STRING = "dsn=BOE;uid=dt-data;pwd=********;"

%>

Calling on all ASP guru to pls help?

MSSQL/Access? which one, they are two completely different database types and have very different ways of connecting too. Access DB for example will need appropriate permissions on the .mdb file etc and you will need to know the path to it.

As has been said easier not to us a DSN connection (faster too), if you must use a DSN connection then you will need to make sure that is configured in your ODBC data source connections on your server.

In terms of links not working, what do the links read? are the links starting with a / ? do they contain any code that would be replaced at run-time with additional path info, are you running the pages on a web server locally and is that the root site if on Windows xp/vista as they only support one root site at a time. If your using a virtual directory in IIS then your pathing will not be working if your linking relative from root (With a / at the beginning of the link).

Lots of things to understand before a solution can truly be offered I'm afraid. Your welcome to contact me off list if you need additional help.
 
Upvote 0

bg

Free Member
May 15, 2005
81
0
The database was designed with access, dsn was used originally for the connection. That will not be the case now because the server I am moving the files to allow a connection like the one below:

<%
Set Conn = Server.CreateObject("ADODB.Connection")
FilePath = "\namefolder\Connections\mydb.mdb"
Conn.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & FilePath & ";"
%>

The pages are not displaying properly, links not working.

Anyone willing to have a look I can send the files over. Happy to pay, provided everything work fine. I need to upload the files ASAP.

The files are pretty short codes and pages are about 8. Please let me know if you can help.
 
Upvote 0
<%
Dim cn,rs,sql,dbpath
dbpath="path/db"
set cn=Server.CreateObject("ADODB.CONNECTION")
cn.ConnectionString="Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.Mappath("path/db")
cn.open
%>

As per what Dave said, above works fine for me. :)
 
Upvote 0

Latest Articles

Join UK Business Forums for free business advice