airwolfdirectuk
03-16-2006, 10:48 AM
Hi,
trying to create a asp page for a system at work. Basically needs to pull the customers website details form the sql database and then display the website.
I have one that was prewritten to do delivery status but and unsure how to sort out the web page one.
Delivery asp page code is:
<%@ LANGUAGE = VBScript %>
<% Option Explicit %>
<!--#include File="adovbs.inc"-->
<HTML>
<HEAD>
</HEAD>
<BODY>
<%
Response.Expires = 0
Dim sConsignRef
Dim Conn
Dim SQLStatement
Dim RecSet
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.ConnectionString = "DSN=thardata;uid=sa;pwd=tharSQL"
Conn.Open
SQLstatement = "Select ConsignNote FROM DeliveryNote where [id]=" & Request.QueryString("jdeliveryid")
set RecSet = Conn.Execute(SQLstatement)
sConsignRef=RecSet.Fields(0)
Response.Redirect "http://www.city-link.co.uk/pod/podfrm.php?JobNo=" & sConsignRef
%>
</BODY>
</HTML>
so far on the web site code:
<%@ LANGUAGE = VBScript %>
<% Option Explicit %>
<!--#include File="adovbs.inc"-->
<HTML>
<HEAD>
</HEAD>
<BODY>
<%
Response.Expires = 0
Dim sConsignRef
Dim Conn
Dim SQLStatement
Dim RecSet
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.ConnectionString = "DSN=thardata;uid=sa;pwd=tharSQL"
Conn.Open
SQLstatement = "Select WebURL FROM Customers where [id]="
set RecSet = Conn.Execute(SQLstatement)
sConsignRef=RecSet.Fields(0)
Response.Redirect "" & sConsignRef
%>
</BODY>
</HTML>
I know the tables WebURL & Customers are correct.
just total confused on where to go. Any ideas?
Rob
trying to create a asp page for a system at work. Basically needs to pull the customers website details form the sql database and then display the website.
I have one that was prewritten to do delivery status but and unsure how to sort out the web page one.
Delivery asp page code is:
<%@ LANGUAGE = VBScript %>
<% Option Explicit %>
<!--#include File="adovbs.inc"-->
<HTML>
<HEAD>
</HEAD>
<BODY>
<%
Response.Expires = 0
Dim sConsignRef
Dim Conn
Dim SQLStatement
Dim RecSet
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.ConnectionString = "DSN=thardata;uid=sa;pwd=tharSQL"
Conn.Open
SQLstatement = "Select ConsignNote FROM DeliveryNote where [id]=" & Request.QueryString("jdeliveryid")
set RecSet = Conn.Execute(SQLstatement)
sConsignRef=RecSet.Fields(0)
Response.Redirect "http://www.city-link.co.uk/pod/podfrm.php?JobNo=" & sConsignRef
%>
</BODY>
</HTML>
so far on the web site code:
<%@ LANGUAGE = VBScript %>
<% Option Explicit %>
<!--#include File="adovbs.inc"-->
<HTML>
<HEAD>
</HEAD>
<BODY>
<%
Response.Expires = 0
Dim sConsignRef
Dim Conn
Dim SQLStatement
Dim RecSet
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.ConnectionString = "DSN=thardata;uid=sa;pwd=tharSQL"
Conn.Open
SQLstatement = "Select WebURL FROM Customers where [id]="
set RecSet = Conn.Execute(SQLstatement)
sConsignRef=RecSet.Fields(0)
Response.Redirect "" & sConsignRef
%>
</BODY>
</HTML>
I know the tables WebURL & Customers are correct.
just total confused on where to go. Any ideas?
Rob