Click here to Skip to main content
15,914,416 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: My Access database isn't being updated, but no errors occurred in my application Pin
SlickyMaster29-Oct-07 1:19
SlickyMaster29-Oct-07 1:19 
GeneralRe: My Access database isn't being updated, but no errors occurred in my application Pin
Dave Kreskowiak29-Oct-07 2:23
mveDave Kreskowiak29-Oct-07 2:23 
GeneralRe: My Access database isn't being updated, but no errors occurred in my application Pin
SlickyMaster29-Oct-07 3:58
SlickyMaster29-Oct-07 3:58 
AnswerRe: My Access database isn't being updated, but no errors occurred in my application Pin
Paul Conrad27-Oct-07 8:33
professionalPaul Conrad27-Oct-07 8:33 
GeneralRe: My Access database isn't being updated, but no errors occurred in my application Pin
SlickyMaster29-Oct-07 4:39
SlickyMaster29-Oct-07 4:39 
GeneralRe: My Access database isn't being updated, but no errors occurred in my application Pin
Paul Conrad29-Oct-07 12:57
professionalPaul Conrad29-Oct-07 12:57 
GeneralRe: My Access database isn't being updated, but no errors occurred in my application Pin
SlickyMaster30-Oct-07 1:26
SlickyMaster30-Oct-07 1:26 
GeneralRe: My Access database isn't being updated, but no errors occurred in my application Pin
SlickyMaster30-Oct-07 8:19
SlickyMaster30-Oct-07 8:19 
I've solved it.

The problem was in the order i was adding the parameters to the OleDbCommand, I wasn't doing it in the same order they where in the UPDATE statement.
So I change the code from:

ublic Sub altpass(ByVal inNome As String, ByVal inPass As String, ByVal inNovPass As String)
Dim comAltPass As New OleDbCommand("UPDATE [Utilizadores] SET [Password]=@NovPass WHERE [Nome]=@Nome AND [Password]=@Pass")

With comAltPass
.Connection = getConexao()
.Connection.Open()
.Parameters.Add(New OleDbParameter("@Nome", inNome))
.Parameters.Add(New OleDbParameter("@Pass", inPass))
.Parameters.Add(New OleDbParameter("@NovPass", inNovPass))
.ExecuteNonQuery()
End With
End Sub

to:

Public Sub altpass(ByVal inNome As String, ByVal inPass As String, ByVal inNovPass As String)
Dim comAltPass As New OleDbCommand("UPDATE [Utilizadores] SET [Password]=@NovPass WHERE [Nome]=@Nome AND [Password]=@Pass")

With comAltPass
.Connection = getConexao()
.Connection.Open()
.Parameters.Add(New OleDbParameter("@NovPass", inNovPass))
.Parameters.Add(New OleDbParameter("@Nome", inNome))
.Parameters.Add(New OleDbParameter("@Pass", inPass))
.ExecuteNonQuery()
End With
End Sub

And it works just fine.

Anyway, I want to thank all of those who spent time trying to help me.

David Manuel Pires
QuestionUsing Multiple Sets of User Settings, How do I retrieve SettingsKey values? Pin
Umbelino26-Oct-07 6:18
Umbelino26-Oct-07 6:18 
AnswerRe: Using Multiple Sets of User Settings, How do I retrieve SettingsKey values? Pin
Dave Kreskowiak26-Oct-07 6:52
mveDave Kreskowiak26-Oct-07 6:52 
GeneralRe: Using Multiple Sets of User Settings, How do I retrieve SettingsKey values? Pin
Umbelino30-Oct-07 8:13
Umbelino30-Oct-07 8:13 
QuestionCan anyone translate this c# code to vb code for me please Pin
kc_renji26-Oct-07 6:01
kc_renji26-Oct-07 6:01 
AnswerRe: Can anyone translate this c# code to vb code for me please Pin
Kschuler26-Oct-07 6:37
Kschuler26-Oct-07 6:37 
AnswerRe: Can anyone translate this c# code to vb code for me please Pin
AliAmjad26-Oct-07 6:38
AliAmjad26-Oct-07 6:38 
GeneralRe: Can anyone translate this c# code to vb code for me please Pin
kc_renji26-Oct-07 6:54
kc_renji26-Oct-07 6:54 
QuestionRe: Can anyone translate this c# code to vb code for me please Pin
kc_renji26-Oct-07 7:53
kc_renji26-Oct-07 7:53 
AnswerRe: Can anyone translate this c# code to vb code for me please Pin
Guffa26-Oct-07 8:18
Guffa26-Oct-07 8:18 
GeneralRe: Can anyone translate this c# code to vb code for me please Pin
kc_renji26-Oct-07 8:59
kc_renji26-Oct-07 8:59 
AnswerRe: Can anyone translate this c# code to vb code for me please Pin
Dave Kreskowiak26-Oct-07 6:46
mveDave Kreskowiak26-Oct-07 6:46 
GeneralRe: Can anyone translate this c# code to vb code for me please Pin
Paul Conrad26-Oct-07 6:57
professionalPaul Conrad26-Oct-07 6:57 
Questionhow do i check if exactly the same record is being entered twice? [modified] Pin
anniie26-Oct-07 5:19
anniie26-Oct-07 5:19 
AnswerRe: how do i check if exactly the same record is being entered twice? Pin
AliAmjad26-Oct-07 5:38
AliAmjad26-Oct-07 5:38 
AnswerRe: how do i check if exactly the same record is being entered twice? Pin
Dave Kreskowiak26-Oct-07 6:54
mveDave Kreskowiak26-Oct-07 6:54 
GeneralRe: how do i check if exactly the same record is being entered twice? [modified] Pin
anniie27-Oct-07 2:38
anniie27-Oct-07 2:38 
GeneralRe: how do i check if exactly the same record is being entered twice? Pin
Dave Kreskowiak27-Oct-07 3:34
mveDave Kreskowiak27-Oct-07 3:34 

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.