Click here to Skip to main content
15,887,267 members
Home / Discussions / Database
   

Database

 
GeneralRe: mySql in my application Pin
Sasuko30-Oct-05 21:30
Sasuko30-Oct-05 21:30 
GeneralRe: mySql in my application Pin
Paul Conrad31-Oct-05 4:54
professionalPaul Conrad31-Oct-05 4:54 
QuestionORDER BY @Variable??? Pin
Carl Mercier29-Oct-05 10:43
Carl Mercier29-Oct-05 10:43 
AnswerRe: ORDER BY @Variable??? Pin
twostepted30-Oct-05 17:39
twostepted30-Oct-05 17:39 
GeneralRe: ORDER BY @Variable??? Pin
Carl Mercier30-Oct-05 19:19
Carl Mercier30-Oct-05 19:19 
GeneralRe: ORDER BY @Variable??? Pin
twostepted31-Oct-05 12:56
twostepted31-Oct-05 12:56 
AnswerRe: ORDER BY @Variable??? Pin
Edbert P31-Oct-05 12:20
Edbert P31-Oct-05 12:20 
QuestionOptimization - newbie problem Pin
gbaii29-Oct-05 0:36
gbaii29-Oct-05 0:36 
Confused | :confused: Hi all. I have a problem to solve with an MS Access database. In a login form the user have to enter username and password. In the back there is a table called users witch have the fallowing fields: userid, username, userpass. I wrote the fallowing code to check if the username and password match with those in the table users:

Private sub command2_click()
Set rst1 = CurrentDb.OpenRecordset("useri", dbOpenDynaset)

Private Sub Command2_Click()
Dim qdef1, qdef2 As QueryDef
Set rst1 = CurrentDb.OpenRecordset("useri", dbOpenDynaset)
Set qdef1 = CurrentDb.CreateQueryDef("")
With qdef1
.SQL = "SELECT * FROM users " & "WHERE username= '" & [Forms]![form1]![input_user] & "'" & "and userpass= '" & [Forms]![form1]![input_pass] & "'"

Set rst = qdef1.OpenRecordset()
nri = rst.RecordCount
End With
rst1.FindFirst "username= '" & Me.input_user & "'"
If rst1.NoMatch Then
MsgBox "There is not such user!"
Exit Sub
Else
If nri = 0 Then
MsgBox "Password does not match!"
Exit Sub
Else
' Everythiong is ok... go on and do the stuff!!!
End If
End If
End Sub


My question is if there is any possibility to optimize this code, to make it simple.

Thank you very much.
Respect,
Gabriel

AnswerRe: Optimization - newbie problem Pin
Edbert P31-Oct-05 12:28
Edbert P31-Oct-05 12:28 
GeneralRe: Optimization - newbie problem Pin
gbaii1-Nov-05 7:31
gbaii1-Nov-05 7:31 
QuestionMessage for Vijay Mathew Pandyalakal re Easy_odbc Pin
mville28-Oct-05 21:02
mville28-Oct-05 21:02 
Questionconnect to remote oracle Database Pin
odukuye28-Oct-05 10:40
odukuye28-Oct-05 10:40 
QuestionADV ICE WANTED!! Pin
jaygreen928-Oct-05 8:59
jaygreen928-Oct-05 8:59 
AnswerRe: ADV ICE WANTED!! Pin
Colin Angus Mackay28-Oct-05 13:19
Colin Angus Mackay28-Oct-05 13:19 
QuestionProblem with working SQL Server SAVE POINTS in Transactions. Pin
farhan197627-Oct-05 20:11
farhan197627-Oct-05 20:11 
QuestionTriggers and transaction context. Pin
devvvy27-Oct-05 6:15
devvvy27-Oct-05 6:15 
AnswerRe: Triggers and transaction context. Pin
Farhan Noor Qureshi27-Oct-05 9:21
Farhan Noor Qureshi27-Oct-05 9:21 
GeneralRe: Triggers and transaction context. Pin
devvvy27-Oct-05 13:49
devvvy27-Oct-05 13:49 
QuestionDatabase 'foodmart 2000' does not exist Pin
kuldeep_kumar27-Oct-05 5:25
kuldeep_kumar27-Oct-05 5:25 
QuestionDynamic procedures, are they possible? Pin
FruitBatInShades27-Oct-05 3:59
FruitBatInShades27-Oct-05 3:59 
AnswerRe: Dynamic procedures, are they possible? Pin
Colin Angus Mackay27-Oct-05 6:31
Colin Angus Mackay27-Oct-05 6:31 
AnswerRe: Dynamic procedures, are they possible? Pin
codet28-Oct-05 16:28
codet28-Oct-05 16:28 
QuestionProblems inserting data in database with datagrid Pin
wappi_berlin27-Oct-05 1:44
wappi_berlin27-Oct-05 1:44 
QuestionExcluding some fields from a table in a datagrid Pin
odrap26-Oct-05 0:24
odrap26-Oct-05 0:24 
AnswerRe: Excluding some fields from a table in a datagrid Pin
Edbert P26-Oct-05 12:50
Edbert P26-Oct-05 12:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.