Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Document handling in ASP?

Status
Not open for further replies.

joffer

Technical User
May 23, 2003
3
0
0
US
I'm going to make an intranet for the company I work for. But I don't want to be the guy who updates the info/data dokuments after the site is done. So what I want to know is methods to make it as easy as possible. Most of the ppl here at work don't know any HTML etc, and I don't want to make hundreds of forms for every page for them to post into an database.

So? any suggestions? applications? solutions? what is normal?
 
You could create an ASP page that reads in a normal text document. Unfortunately it will not look very pretty unless you nail down a very strict document format and make people adhere to that. Then you can make some assumptions and actually format the text to make it more appealing.


Wushutwist


Sun Certified Java 2 Programmer
 
Or depending on how sophisticated you page needs to be just have the changing data in a database.
And use ASP to open the database and output the info in a table.

Or where ever you need some data use this VBScript sample

<%
Set Conn = server.CreateObject(&quot;ADODB.Connection&quot;)
Conn.Open &quot;driver=SQL Server;server=yoursite.com;uid=userID;pwd=password;database=yourDatabase;&quot;
Set RS1 = Conn.Execute(&quot;SELECT * FROM [YourTablename]&quot;)

<table border=&quot;1&quot; width=&quot;90%&quot; bordercolor=&quot;#0066FF&quot;>
<tr>
<td width=&quot;10%&quot; align=&quot;left&quot; bordercolor=&quot;#000000&quot; bgcolor=&quot;#000000&quot;>
<p align=&quot;left&quot;><font color=&quot;#FFFFFF&quot;>Add to PO</font></td>
<td width=&quot;18%&quot; align=&quot;left&quot; bordercolor=&quot;#0066FF&quot; bgcolor=&quot;#000000&quot;>
<p align=&quot;left&quot;><font color=&quot;#FFFFFF&quot;>Part Number</font></td>
<td width=&quot;52%&quot; align=&quot;left&quot; bordercolor=&quot;#000000&quot; bgcolor=&quot;#000000&quot;>
<p align=&quot;left&quot;><font color=&quot;#FFFFFF&quot;>Description</font></td>
<td width=&quot;12%&quot; align=&quot;right&quot; bordercolor=&quot;#000000&quot; bgcolor=&quot;#000000&quot;>
<p align=&quot;left&quot;><font color=&quot;#FFFFFF&quot;>Price</font></td>

<tr>
<td width=&quot;10%&quot; align=&quot;left&quot;> </td>
<td width=&quot;18%&quot; align=&quot;left&quot;> </td>
<td width=&quot;52%&quot; align=&quot;left&quot;> </td>
<td width=&quot;12%&quot; align=&quot;right&quot;> </td>
</tr>
<%
If Not RS1.EOF Then
Do%>
<tr>

<td width=&quot;18%&quot; align=&quot;left&quot;>
<p align=&quot;center&quot;><%Response.Write RS1(&quot;STOCK_CODE&quot;)%></td>
<td width=&quot;52%&quot; align=&quot;left&quot;>
<p align=&quot;center&quot;><%Response.Write RS1(&quot;Description&quot;) %></td>
<td width=&quot;12%&quot; align=&quot;right&quot;>
<%If RS1(&quot;SELLING_PRICE&quot;) = 0 then
Price1 = &quot;Call&quot;
Else
Price1 = FormatCurrency(RS1(&quot;SELLING_PRICE&quot;),2,0,0,0)
End if%>
<p align=&quot;center&quot;><%Response.Write Price1%></td>
</tr>
<% RS1.Movenext
Loop Until RS1.EOF
Else
Response.Write(&quot;No records or something&quot;)
End If
%>
My example is a parts database:
What this does is open a SQL Server7 database and table then it creates a Table
Next it loops through all of the records appending table rows as it goes.


Now you could have a wordy document and anywhere you need changable data put this code:

Hi My Name is <%Response.Write RS1(&quot;Name&quot;)%> I am glad to meet you.


DougP, MCP
dposton@universal1.com

Ask me how Bar-codes can help you be more productive.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top