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:

<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)


    End If

    End sub
sub reset()

        username.text = ""
        password.text = ""
        email.text = ""

    end sub
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)




      Catch ex As Exception
           Message.Text = "Error Connecting to Database!"
      End Try

    End Sub


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.

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