Updating record in an Access 2000 db using ADO
From: MADMAX (anonymous_at_discussions.microsoft.com)
Date: 05/25/04
- Next message: Gabriel Michaud: "Re: ADO Asynchronous Problems on dual-cpu / hyperthreading computers"
- Previous message: David Bernheim: "Re: Using VFP OLE DB within VB6"
- Next in thread: Val Mazur: "Re: Updating record in an Access 2000 db using ADO"
- Reply: Val Mazur: "Re: Updating record in an Access 2000 db using ADO"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 25 May 2004 02:21:09 -0700
Hi guys,
I'm trying to update a record in a Access database. The db is opened via an UDL file.
[oledb]
; Everything after this line is an OLE DB initstring
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\TestDB.mdb;Mode=ReadWrite;Persist Security Info=False
I'm using a command object with text command (adCmdText)
strSQL="Parameters [Logname] Text, [UserPassword] Text, [Name] Text; " & _
"UPDATE Users SET USERPASSWORD = [UserPassword], NAME = [Name] " & _
"WHERE LOGNAME = [Logname] ;"
and if I use parameters I got the following message:
"Operation must use an updateable query."
All goes fine if I don't use parameters:
strSQL = "UPDATE Users SET USERPASSWORD = '" & Password & "' , NAME = '" & name & "' " & _
"WHERE LOGNAME = '" & logname & "' ;"
What's going on ? I would like to use parameters since they guarantee a better control on input.
How good is the Jet Provider ? Things that worked smoth with SQLServer or Oracle, are forcing
me to dig into MSDN to make them work...
THX for your kind reply.
Max
- Next message: Gabriel Michaud: "Re: ADO Asynchronous Problems on dual-cpu / hyperthreading computers"
- Previous message: David Bernheim: "Re: Using VFP OLE DB within VB6"
- Next in thread: Val Mazur: "Re: Updating record in an Access 2000 db using ADO"
- Reply: Val Mazur: "Re: Updating record in an Access 2000 db using ADO"
- Messages sorted by: [ date ] [ thread ]