User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the MS SQL section within the Web Development category of DaniWeb, a massive community of 391,796 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,496 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MS SQL advertiser:
Views: 4042 | Replies: 0
Closed Thread
Join Date: Sep 2004
Posts: 1
Reputation: tzadikem is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
tzadikem tzadikem is offline Offline
Newbie Poster

SQL access via Dreamweaver 2004 MX

  #1  
Sep 8th, 2004
I have the following page that I created in Dreamweaver 2004 MX, but don't know how to get some form inputs working. So, I have hardcoded them for now. You can see them below right afte the where clause. Can someone please help me create just a simple form that asks for startdate, enddate and state that works. Thanks.

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include file="Connections/vmfg.asp" -->
<%
Dim rsview
Dim rsview_numRows

Set rsview = Server.CreateObject("ADODB.Recordset")
rsview.ActiveConnection = MM_vmfg_STRING
rsview.Source = "SELECT SHIPPER.CUST_ORDER_ID, SHIPPER.SHIPPED_DATE, SHIPPER.INVOICE_ID, SHIPPER_LINE.USER_SHIPPED_QTY, SHIPPER_LINE.SHIPPED_QTY, SHIPPER_LINE.UNIT_PRICE, SHIPPER_LINE.TRADE_DISC_PERCENT, RECEIVABLE_CURR.CURRENCY_ID, RECEIVABLE_CURR.SELL_RATE, CUST_ORDER_LINE.PART_ID, CUST_ORDER_LINE.ORDER_QTY, CUST_ORDER_LINE.USER_ORDER_QTY, INVENTORY_TRANS.TYPE, INVENTORY_TRANS.ACT_MATERIAL_COST, INVENTORY_TRANS.ACT_LABOR_COST, INVENTORY_TRANS.ACT_BURDEN_COST, INVENTORY_TRANS.ACT_SERVICE_COST, CUSTOMER_ORDER.CUSTOMER_ID, CUSTOMER_ORDER.SHIP_TO_ADDR_NO, CUSTOMER_ORDER.CURRENCY_ID, CUSTOMER.STATE, CUST_ADDRESS.NAME, CUST_ADDRESS.STATE, PART.DESCRIPTION, PART.STOCK_UM FROM dbo.SHIPPER INNER JOIN dbo.RECEIVABLE_CURR ON SHIPPER.INVOICE_ID = RECEIVABLE_CURR.INVOICE_ID INNER JOIN dbo.SHIPPER_LINE ON SHIPPER.PACKLIST_ID = SHIPPER_LINE.PACKLIST_ID AND SHIPPER.CUST_ORDER_ID = SHIPPER_LINE.CUST_ORDER_ID INNER JOIN dbo.INVENTORY_TRANS ON SHIPPER_LINE.TRANSACTION_ID = INVENTORY_TRANS.TRANSACTION_ID INNER JOIN dbo.CUSTOMER_ORDER ON SHIPPER_LINE.CUST_ORDER_ID = CUSTOMER_ORDER.ID INNER JOIN dbo.CUST_ORDER_LINE ON SHIPPER_LINE.CUST_ORDER_ID = CUST_ORDER_LINE.CUST_ORDER_ID AND SHIPPER_LINE.CUST_ORDER_LINE_NO = CUST_ORDER_LINE.LINE_NO INNER JOIN dbo.CUSTOMER ON CUSTOMER_ORDER.CUSTOMER_ID = CUSTOMER.ID INNER JOIN dbo.PART ON CUST_ORDER_LINE.PART_ID = PART.ID LEFT OUTER JOIN dbo.CUST_ADDRESS ON CUSTOMER_ORDER.CUSTOMER_ID = CUST_ADDRESS.CUSTOMER_ID AND CUSTOMER_ORDER.SHIP_TO_ADDR_NO = CUST_ADDRESS.ADDR_NO WHERE SHIPPER.SHIPPED_DATE >= {ts '2003-01-01 00:00:00.00'} AND SHIPPER.SHIPPED_DATE < {ts '2003-12-31 00:00:00.00'} AND CUST_ADDRESS.STATE='CA'"
rsview.CursorType = 0
rsview.CursorLocation = 2
rsview.LockType = 1
rsview.Open()

rsview_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index

Repeat1__numRows = -1
Repeat1__index = 0
rsview_numRows = rsview_numRows + Repeat1__numRows
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.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>
<p>&nbsp;</p>
<table width="200" border="1">
<tr>
<th scope="col">&nbsp;</th>
<th scope="col">&nbsp;</th>
<th scope="col">&nbsp;</th>
<th scope="col">&nbsp;</th>
<th scope="col">&nbsp;</th>
<th scope="col">&nbsp;</th>
<th scope="col">&nbsp;</th>
<th scope="col">&nbsp;</th>
<th scope="col">&nbsp;</th>
<th scope="col">&nbsp;</th>
</tr>
<%
While ((Repeat1__numRows <> 0) AND (NOT rsview.EOF))
%>
<tr>
<td><%=(rsview.Fields.Item("INVOICE_ID").Value)%></td>
<td><%=(rsview.Fields.Item("SHIPPED_DATE").Value)%></td>
<td><%=(rsview.Fields.Item("CUST_ORDER_ID").Value)%></td>
<td><%=(rsview.Fields.Item("NAME").Value)%></td>
<td>&nbsp;</td>
<td><%=(rsview.Fields.Item("PART_ID").Value)%></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
rsview.MoveNext()
Wend
%>

</table>
</body>
</html>
<%
rsview.Close()
Set rsview = Nothing
%>
AddThis Social Bookmark Button
 
Closed Thread

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb MS SQL Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the MS SQL Forum

All times are GMT -4. The time now is 5:14 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC