473,499 Members | 1,738 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Help on ASP routine

Hello,

I need a routine to check for a number called CPF (just like Social
Security Number in USA). I already have a validation routine for that
number, but I still need to check if it exists on the institution
databank to avoid frauds on my system.

The idea is to build a "new user register page" and with a CPF field.
So, when the person enter his CPF, the ASP page would check on the
institution databank and validate or not the number. The url for the
public query is the following, remember to replace "hxxp" with "http"
to open the page correctly:

hxxp://www.receita.fazenda.gov.br/Aplicacoes/ATCTA/CPF/ConsultaPublica.asp

I donīt know if itīs possible because it has implemented a "random
numbers" protection. If anyone could help me it would be great.

Thanks!

Caliangelas
ca*********@yahoo.com
Jul 19 '05 #1
1 2473
You would process this the same as you would as a login page. I would set up
a pre-register page that request the CPF number which is submitted by the
user and checks the database for a match. If it matches, then you send them
to whatever page they need to go or let them know this number already exists
and they don't need to register. If it does not exist then they are directed
to the page that with the remaining information you need and passing the CPF
number they typed in the previous page to the new page.

All above is assuming you have the privileges necessary to check the
institution's databank.

Here is the part that processes the data from a form after the user submits.
Replace the Username/Password with your CPF field name:
<%@ Language=VBScript %>
<% Response.Buffer = true%>

<HTML>
<HEAD>
<META name=VI60_defaultClientScript content=VBScript>
<TITLE>Security Login Verification</TITLE>
</HEAD>
<BODY>
<%
Dim conntemp
Dim rstemp

' Pull the data from the form data entered on the previous page
myname=CStr(Request.Form("SearchAccount"))
mypassword=Cstr(Request.Form("AccountPassword"))

' Create a connection to the database which houses the login information
set conntemp=Server.CreateObject ("ADODB.Connection")
conntemp.Provider = "Microsoft.Jet.OLEDB.4.0"
conntemp.ConnectionString = "Data Source=" & Server.MapPath
("\database\ExpressDataWeb.mdb")
conntemp.open

'Open the recorset connection
set rstemp = Server.CreateObject ("ADODB.Recordset")

'Compare the data from the form with the data in the database
sqltemp="SELECT * FROM tblAccountPass where ACCOUNT='"
sqltemp=sqltemp & myname & "'"
rstemp.Open sqltemp, conntemp

If rstemp.EOF then %>
<BR>
<!-- If the user isn't authenticated, return a message to them saying so -->
I'm sorry, we don't have a user named <%=myname%> on file!<br>
Please contact Southwest Express for access to this site.
<!--Please return to <A href="securitylogin.asp">Log In</a> and select
Register-->
<% Response.End

end if

' If the password checksout, then set the session variable to the
Account/Username entered from the form
If rstemp("Password")=mypassword then
session("name")=rstemp("account")

' added check specific for this login; if the value passed isn't correct
fail the login to any pages where the value doesn't match.
session("securitylevel")=rstemp("SecurityLevel")
Response.write "Security Level =" & session("securitylevel")

'If the user authenticates send them to the Table of Contents page;
otherwise fail the login.
Response.Redirect "toc.asp"
else
%>

Password Unrecognized<br>
Try <A href="securitylogin.asp">Try Again</a> again.
<% Response.End

end if

'Close all connections
rstemp.close
conntemp.Close
set rstemp=nothing
set conntemp=nothing
%>

</BODY>
</HTML>
"Caliangelas" <ca*********@yahoo.com> wrote in message
news:f8*************************@posting.google.co m...
Hello,

I need a routine to check for a number called CPF (just like Social
Security Number in USA). I already have a validation routine for that
number, but I still need to check if it exists on the institution
databank to avoid frauds on my system.

The idea is to build a "new user register page" and with a CPF field.
So, when the person enter his CPF, the ASP page would check on the
institution databank and validate or not the number. The url for the
public query is the following, remember to replace "hxxp" with "http"
to open the page correctly:

hxxp://www.receita.fazenda.gov.br/Aplicacoes/ATCTA/CPF/ConsultaPublica.asp

I donīt know if itīs possible because it has implemented a "random
numbers" protection. If anyone could help me it would be great.

Thanks!

Caliangelas
ca*********@yahoo.com

Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

17
5204
by: milesh | last post by:
I have a customer that we need to send data files to using their format. Below is a C routine they sent us for computing a CRC. I tranlated it to the best of my ability to VB6 but can't reproduce...
18
5934
by: Bill Smith | last post by:
The initial row is inserted with the colPartNum column containing a valid LIKE pattern, such as (without the single quotes) 'AB%DE'. I want to update the column value with the results of a query...
1
2630
by: FlyPiger | last post by:
I has installed db2 and IBM CM on AIX 5.2.0 That is a error When I execute "ICMNLSUF" ,error is "SQL0444N" "ICMNLSUF" is a costom function of CM,...
9
5149
by: tym | last post by:
HELP!!! I'm going round the twist with this... I have a VB6 application which is using DAO to access a database (Please - no lectures on ADO, I know what I'm doing with DAO!!) Ok, problem...
6
4957
by: James Radke | last post by:
Hello, I have a multithreaded windows NT service application (vb.net 2003) that I am working on (my first one), which reads a message queue and creates multiple threads to perform the processing...
2
1545
by: Max81 | last post by:
Im trying to build a calculator for an assignment! (due wednesday) im having trouble finding any code for creating Copy/Paste menu buttons (just need the "doing" code) can anyone help? in...
6
4059
by: Siv | last post by:
Hi, I am getting into printing with VB.NET 2005 and want to implement the usual capability that a user can select a selection of pages. I have a report that is generated by my application that if...
16
2767
by: Rex | last post by:
Hi All - I have a question that I think MIGHT be of interest to a number of us developers. I am somewhat new to VIsual Studio 2005 but not new to VB. I am looking for ideas about quick and...
9
2037
by: Flomo Togba Kwele | last post by:
I have a class which processes for a relatively long time. I want to enable other classes which call this one to receive process messages if they wish. The called routine (the one defining the...
32
2749
by: =?Utf-8?B?U2l2?= | last post by:
I have a form that I programmatically generate some check boxes and labels on. Later on when I want to draw the form with different data I want to clear the previously created items and then put...
0
7006
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
7169
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
5467
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,...
1
4917
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...
0
3096
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3088
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1425
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
661
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
294
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.