Login script

voltie

Registered User.
Local time
Today, 13:16
Joined
Mar 15, 2009
Messages
20
hi,

i had an access database builed with adob connection/sql server..

now i have rebuild my database without sql/connection..

but i dont know how to fix change my login/to my database now... the login is searching for my sql/connection.. can someone help meplease to rewrite my existing code please..:

Set cnnLogin = CreateObject("ADODB.Connection")
Dim strConnection As String
Dim rsResult As Recordset

strConnection = "Provider=sqloledb;Data Source=CC497766-A\voltie;Initial Catalog=project4;User Id=project4;Password=project4;Trusted_Connection=Yes"
cnnLogin.Open (strConnection)
Set rsResult = cnnLogin.Execute("select * from USERS where project4_user='" & Me.txtUsername & "'")
If rsResult.EOF Then
MsgBox "Logon failed! Please check username and/or password"
Exit Sub
Else
rsResult.MoveFirst
If Not rsResult.Fields(1).Value = Me.txtPassword.Value Then
MsgBox "Logon failed! Please check username and/or password"
Exit Sub
Else
iTypeOfUser = rsResult.Fields(2).Value
End If
End If
cnnLogin.Close
 
Where are you sourcing your data from now? This will determine how you intend to communicate with it. And why the change? it is usually the reverse.

David
 
Where are you sourcing your data from now? This will determine how you intend to communicate with it. And why the change? it is usually the reverse.

David


Hi David,

Just i have change it to normal access database, so there is no sql server etcetc anymore.. i have transfer all data to an acces database, and create all again, i think i have to do something with currentdb()?

i have delete enterprisemanager,sql etc.
 

Users who are viewing this thread

Back
Top Bottom