473,406 Members | 2,387 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

read text from textfile

the below code displays the details of tittles from a table papers wat i nee is f i click the displayed tittle a textfile of that tittle should get opened help me..
Expand|Select|Wrap|Line Numbers
  1. <%
  2. Dim con,rs,sl
  3.  
  4.     set con=server.CreateObject("ADODB.Connection")
  5.     set rs=server.CreateObject("ADODB.Recordset")
  6.     con.open Application("db")    
  7. sl = "SELECT * FROM papers "
  8. rs.Open sl,con
  9. Response.Write "<table width='100%'>"
  10. Do While Not rs.EOF
  11. response.Write "<tr><td><img src=""images\free_bullet.gif"" width=""10"" height=""10""></td>"
  12. Response.Write "<td><a class=a1 href=" & rs("Upload1") & ">" & rs("Tittle1") & " <br></td></tr>"
  13. rs.MoveNext
  14. Loop
  15. Response.Write "</table>"
  16. rs.Close
  17. con.Close%>
Jan 4 '10 #1
2 1687
jhardman
3,406 Expert 2GB
is the field "upload1" the virtual path to the text file? If so, then this should work:
Expand|Select|Wrap|Line Numbers
  1. <%
  2. Dim con,rs,sl
  3.  
  4.     set con=server.CreateObject("ADODB.Connection")
  5.     set rs=server.CreateObject("ADODB.Recordset")
  6.     con.open Application("db")    
  7. sl = "SELECT * FROM papers "
  8. rs.Open sl,con %>
  9. <table width="100%">
  10. <%
  11. Do While Not rs.EOF %>
  12.    <tr><td><img src="images\free_bullet.gif" width="10" height="10"></td>
  13.    <td><a class="a1" href="<%=rs("Upload1")%>"><%=rs("Tittle1")%>
  14.    <br></td></tr>
  15.    <%
  16.    rs.MoveNext
  17. Loop 
  18. rs.close 
  19. con.Close %>
  20. </table>
  21.  
Let me know if this helps.

Jared
Jan 6 '10 #2
thaks jared it worked..
Jan 7 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: dmiller23462 | last post by:
Hi again guys.... This is my first source of help, by far the best ASP intellectual collective....Thanks in advance for any assistance...Anyway.... The forms I'm still working on (finishing...
3
by: Krish | last post by:
I have requirement, that i get one big chunk of text file. This text file will have has information, that on finding "****End of Information****", i have to split them individual text file with our...
3
by: Avi | last post by:
I need to create a text file that has the data from the 10 tables in the database. The number of fields in the tables exceeds 255 and so I cannot make a new table with all the fields and then...
8
by: andreas | last post by:
A textfile can have different formats like ANSI,UTF8, Unicode ... Using streamreader for a textfile can have different results for chars like é,à,è....depending of the fileformat. To solve this...
9
by: Justme | last post by:
Novice programmer needs help with using fgets to read and ignore the first two lines of a file. I've gone thru the previous posting regarding fgets, but none of them seems to help my situation. I...
3
by: Ray | last post by:
Hello World, I made a Windowsform that reads data from a CSV file. It works fine, but when I have read the data of a record I have to re-Debug the form to read another record. So when I put a...
2
by: RaviRajhulk | last post by:
I am trying to read folder and subfolder and print their name into a text file.I am able to read the folder and its content and write it to the textfile but I am not able to read the content of the...
0
by: Snoze | last post by:
Hello, I'm trying to make an application with C# that writes and reads some lines of a text file, but I want to read one specific line and save the text in a string variable. And the inverse...
6
by: Per Juul Larsen | last post by:
Hi. My Textfile looks like this Variable 1 Variable 2 Variable 3 Variable 4 On opening the application it will read the textfile, and assign each line of variable to at textfield in VB and...
3
by: Raymond Chiu | last post by:
Dear all, Now I have the simple task to read text file line by line into database (SQL Server 2000). If the text file is divided into different fields according to the number of characters,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.