| | |
Registration and Login scripts using VB and Oledbconnection to Access Database
Please support our ASP.NET advertiser: $4.95 a Month - ASP.NET Web Hosting – Click Here!
![]() |
•
•
Join Date: Nov 2005
Posts: 1
Reputation:
Solved Threads: 0
Hello all Programmers,
I am preparing a website with login credentials to a welcome site.
I need help in the following:
1) create a registeration page where by the user enters their username, password and email address
2) once the user submits the details, records are inserted into users database - use of OleDbconnection to Access database, with no sql parameters.
3) Once the details are entered, the user can enter login page and enter their Email address and password. These details should exist within the access database. If the user enterr the right details, a welcome message is displayed with the Welcome <username> message
Requirements: Design in Webmatrix, language - VB, Database connection - OleDB, Datareader, validation not required for now.
With this script I need to check whether insert works having a reserved word "password" as a field name in a table.
I am a beginner to ASP.NET, so far I have written this:
After compiling this piece of code in WebMatrix, I get this error message " ----> BC30455: Argument not specified for parameter 'strPass' of 'Public Sub AddNewUser(strUser As String, strPass As String, strEmail As String, strPass As String)'. <----"
for Line 12: AddNewUser(usernm, passwrd, emailId), Any ideas why?
I would appreciate any help or suggestions on how to achieve this.
Thanks in advance.
I am preparing a website with login credentials to a welcome site.
I need help in the following:
1) create a registeration page where by the user enters their username, password and email address
2) once the user submits the details, records are inserted into users database - use of OleDbconnection to Access database, with no sql parameters.
3) Once the details are entered, the user can enter login page and enter their Email address and password. These details should exist within the access database. If the user enterr the right details, a welcome message is displayed with the Welcome <username> message
Requirements: Design in Webmatrix, language - VB, Database connection - OleDB, Datareader, validation not required for now.
With this script I need to check whether insert works having a reserved word "password" as a field name in a table.
I am a beginner to ASP.NET, so far I have written this:
ASP.NET Syntax (Toggle Plain Text)
<script runat="server"> Sub cmdSubmit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Dim usernm as String = username.text.Trim() Dim passwrd as String = passwd.text.Trim() Dim emailId as String = email.text.Trim() AddNewUser(usernm, passwrd, emailId) Response.Redirect("login.aspx") End If End sub
ASP.NET Syntax (Toggle Plain Text)
sub reset() username.text = "" password.text = "" email.text = "" end sub
ASP.NET Syntax (Toggle Plain Text)
sub AddNewUser(ByVal strUser As String, ByVal strPass As String, ByVal strEmail As String, ByVal strPass As String) Dim strConnection as String = "Provider=Microsoft.Jet.OLEDB.4.0;" strConnection += "Data Source=C:\Inetpub\wwwroot\myDB.mdb" Dim objConnection as New OledbConnection(strConnection) ' Dim InsertCmd as String = "INSERT INTO passwords (name, email, [password],) values('" & _ strUser & "','" & _ strPass & "','" & _ strEmail & "')" Dim Mycommand = New OleDbCommand(InsertCmd, objConnection) MyCommand.Connection.Open() Try objConnection.Open() MyCommand.ExecuteNonQuery() objConnection.Close() Catch ex As Exception Message.Text = "Error Connecting to Database!" End Try End Sub </script>
After compiling this piece of code in WebMatrix, I get this error message " ----> BC30455: Argument not specified for parameter 'strPass' of 'Public Sub AddNewUser(strUser As String, strPass As String, strEmail As String, strPass As String)'. <----"
for Line 12: AddNewUser(usernm, passwrd, emailId), Any ideas why?
I would appreciate any help or suggestions on how to achieve this.
Thanks in advance.
Last edited by Paladine; Nov 20th, 2005 at 1:03 pm.
Re: Registration and Login scripts using VB and Oledbconnection to Access Database
0
#2 Nov 20th, 2005
Hi there rayfrens;
I can tell you why you are getting this error. You are passing only 3 arguments to a 4 argument subroutine. You have declared strPass twice in the AddNewUser Subroutine
Public Sub AddNewUser(strUser As String, strPass As String, strEmail As String, strPass As String)
Hope this helps
I can tell you why you are getting this error. You are passing only 3 arguments to a 4 argument subroutine. You have declared strPass twice in the AddNewUser Subroutine
Public Sub AddNewUser(strUser As String, strPass As String, strEmail As String, strPass As String)
Hope this helps
![]() |
Similar Threads
- VB: Connect to Access database via ODBC datasource name (Visual Basic 4 / 5 / 6)
- I need help for connecting to Ms access database (VB.NET)
- Writing to an Access Database (Visual Basic 4 / 5 / 6)
- HELP: User Log In From Connected in Access Database (C#)
- Accept/Decline Registration (ASP)
- Writing to an Access Database using Java... (Java)
Other Threads in the ASP.NET Forum
- Previous Thread: How to select the feature during the installation? (.NET)
- Next Thread: Forms authorization, only want a few links
| Thread Tools | Search this Thread |
.net 2.0 activexcontrol advice ajax alltypeofvideos asp asp.net bc30451 beginner bottomasp.net browser businesslogiclayer c# c#gridviewcolumn cac checkbox commonfunctions compatible confirmationcodegeneration content contenttype courier dataaccesslayer database datagrid datagridview datagridviewcheckbox datalist deployment development dgv dropdownlist dropdownmenu dynamic dynamically edit embeddingactivexcontrol fileuploader fill findcontrol flash flv formatdecimal forms formview gridview gudi homeedition iframe iis javascript jquery listbox menu microsoft mouse mssql multistepregistration news objects opera panelmasterpagebuttoncontrols redirect registration relationaldatabases reportemail rotatepage schoolproject security serializesmo.table sessionvariables silverlight smartcard smoobjects software sql-server sqlserver2005 ssl textbox tracking treeview unauthorized validatedate validation vb.net video videos virtualdirectory vista visual-studio visualstudio web webapplications webarchitecture webdevelopemnt webdevelopment webprogramming webservice youareanotmemberofthedebuggerusers





