Re: Using Access Database as Membership source
- From: Alexey Smirnov <alexey.smirnov@xxxxxxxxx>
- Date: 3 May 2007 13:09:56 -0700
On Apr 26, 12:08 am, James <J...@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
I am quite new to membership and security etc. I have a large Access DB and
want to create a special section on a website for some of the members in the
I have looked how to do this and have found about 10 sites, all with
different ways to do this. I have tried all but none work. The code I have
got closest to working is:
Private connStr As String
Private comm As New OleDb.OleDbCommand
Private _requiresQuestionAndAnswer As Boolean
Private _minRequiredPasswordLength As Integer
Public Overrides Function ValidateUser( _
ByVal username As String, _
ByVal password As String) As Boolean
Dim conn As New OleDb.OleDbConnection(connStr)
Dim sql As String = _
"Select * From Membership WHERE " & _
"username=@username AND password=@password"
Dim comm As New OleDb.OleDbCommand(sql, conn)
Dim reader As OleDb.OleDbDataReader = _
If reader.HasRows Then
Catch ex As Exception
That code comes up with errors about the OleDb.OleDbCommand saying I should
put Data. infront of it.
Is there anyone who can point me in the right direction on how to do this?
James, your code is working for me.
Can you post here the complete error message?
- Prev by Date: Re: 2.0: change of password rules (newbie)
- Next by Date: Re: Using Windows Auth in Sharepoint and ASPx pages question
- Previous by thread: 2.0: change of password rules (newbie)
- Next by thread: Re: Using Windows Auth in Sharepoint and ASPx pages question