473,626 Members | 3,119 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.faz enda.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*********@yah oo.com
Jul 19 '05 #1
1 2485
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=VBScri pt %>
<% Response.Buffer = true%>

<HTML>
<HEAD>
<META name=VI60_defau ltClientScript content=VBScrip t>
<TITLE>Securi ty Login Verification</TITLE>
</HEAD>
<BODY>
<%
Dim conntemp
Dim rstemp

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

' Create a connection to the database which houses the login information
set conntemp=Server .CreateObject ("ADODB.Connect ion")
conntemp.Provid er = "Microsoft.Jet. OLEDB.4.0"
conntemp.Connec tionString = "Data Source=" & Server.MapPath
("\database\Exp ressDataWeb.mdb ")
conntemp.open

'Open the recorset connection
set rstemp = Server.CreateOb ject ("ADODB.Records et")

'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="securityl ogin.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("Passwor d")=mypasswo rd then
session("name") =rstemp("accoun t")

' 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("securi tylevel")=rstem p("SecurityLeve l")
Response.write "Security Level =" & session("securi tylevel")

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

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

end if

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

</BODY>
</HTML>
"Caliangela s" <ca*********@ya hoo.com> wrote in message
news:f8******** *************** **@posting.goog le.com...
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.faz enda.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*********@yah oo.com

Jul 19 '05 #2

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

Similar topics

17
5223
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 their results. Here is the C routine. #define CRC16_POLYNOMIAL 0xA001 crc16(INT16U byte, INT16U crc) {
18
5971
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 against a different table (that uses the LIKE predicate) but cannot get around the SQL0132 error . I have tried the hex notation after the LIKE such as (without the quotes)... " where colNewPartNum like ( X'27' || nnn.colPartNum || X'27) " ,...
1
2644
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, LIBPATH=/usr/lpp/icm/lib:/usr/lpp/icm/inso:/usr/lib:/lib:/mqha/db2ha/db2inst2/sqllib/lib HELP ME. Thanks.
9
5162
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 is this.... importing a large csv file (189000 lines, 7 fileds per line)
6
4983
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 for long running reports. When the processing is complete it uses crystal reports to load a template file, populate it, and then export it to a PDF. It works fine so far....
2
1555
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 addition, how do you get the keyboard numbers to activate the "calculator" buttons. (not as important)
6
4083
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 the user wants all pages will produce 3 pages. I want to offer the user the ability to select via the print dialog that only pages 1 and 2 of it are printed or possibly pages 1 and 3 but not 2. At the moment I can produce all three pages...
16
2791
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 efficient navigating within Visual Studio 2005. Let's say your project (or solution) has dozens of forms and hundreds or even thousands of routines. Two Questions: 1) BUILT-IN to Visual Studio 2005. What ideas do you have to quickly
9
2047
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 delegate) is named CASSPrintSQL in namespace CASS. The code is: Private Delegate Sub DisplayMessage(ByVal msg As String) Private _msgListener As DisplayMessage .... Public Sub OnDisplayMessage(ByVal CallerMethod As DisplayMessage) '<== Error
32
2773
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 some new ones on. In my code I am doing the following: For Each ctrl In tpMain.Controls If TypeOf (ctrl) Is CheckBox Then If ctrl.Name.StartsWith("chkS") Then ctrl.Visible = False
0
8196
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8701
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8364
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8502
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7192
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5571
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4090
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4196
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1507
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.