Link to home
Start Free TrialLog in
Avatar of tendimes
tendimes

asked on

How to view data from table passing through the function?

I am trying to pass the specific table data through the function "StrDecrypt(ST)" and viewed as HTML on the same ASP page.  Is it possible?  I am still misunderstanding how to pass the string from DB to web site going through the Decrypt process. Also, how to view that data via table or datagrid.

Thanks in advance!!!
<%
Response.Expires = 60
Response.Expiresabsolute = Now() - 1
Response.AddHeader "pragma","no-cache"
Response.AddHeader "cache-control","private"
Response.CacheControl = "no-cache"
 
%>
<!--#include virtual=/common.asp-->
<HTML>
<HEAD>
<TITLE>Databook : Personal Phone Book</TITLE>
</HEAD>
<BODY bgcolor=blue>
<%
Set rs = Server.CreateObject("ADODB.RecordSet")
rs.Open "Select * From Phonebook",strConn,1,2
    rs("Name")=StrDecrypt(strName)
    
'''encrypt
Function StrEncrypt(ST)
	Dim EnDecrypt, strToEncrypt, strEncrypted
	Set EnDecrypt = Server.CreateObject("CryptoDLL.FileString")
 
	With EnDecrypt
		.Password = "PASSWORD"
		.Provider = True
		.ConvertHEX = True
		.HashType = 1
		.CipherType = 1
		StrEncrypt = .EncryptString(ST)
	End With
	Set EnDecrypt = Nothing
End Function
 
'''decrypt
Function StrDecrypt(ST)
	Dim EnDecrypt, strToEncrypt, strEncrypted
	Set EnDecrypt = Server.CreateObject("CryptoDLL.FileString")
 
	With EnDecrypt
		.Password =  "PASSWORD"
		.Provider = True
		.ConvertHEX = True
		.HashType = 1
		.CipherType = 1
 
		StrDecrypt = .DecryptString(ST)
	End With
	Set EnDecrypt = Nothing
End Function
 
%>
 
</BODY>
</HTML>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of dosth
dosth
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
i was gonna say, you aren't writing anything to the page...  all you are doing is including some functions and calling a recordset...


why don't you explain exactly what it is you are trying to do...  just display a name?  what do you mean by "table"?
Avatar of tendimes
tendimes

ASKER

Dosth: Code works perfect.  Thank you!  Now I am having an issue with the RecordSet timing out because it has 100,000+ records.  I increased the server timeout length and also defined the SQL statement to a smaller amount of records.  Although this way of doing things will take many days.  Is there any other options?

Kevp75: The goal was to export my encrypted phonebook data as clear text using the above function.  Now that I am able to export the data I am looking for a method to export all 100,000 records in a timely manner.