|
-
Apr 12th, 2005, 12:01 PM
#1
Thread Starter
Member
problems with parametarized query in Access
i have this query in my Access database (saved as qryEditBook):
UPDATE tblBook SET AuthorFirstName = [AuthorFirstName], BookName = [BookName], AuthorSecondName = [AuthorSecondName], BookEdition = [BookEdition], ISBN = [ISBN], Price = [Price], WebLink = [WebLink], DeweyCode = [DeweyCode]
WHERE BookID=[BookID];
in my VB app i do this (iam using DAO 3.6):
[VB]
MsgBox "edit"
Set qd = dB.QueryDefs("qryEditBook") 'open query from db.mdb
'fill up query's parameters
qd.Parameters("BookName") = Trim(txtBookName.Text)
qd.Parameters("AuthorFirstName") = Trim(txtAuthorFirstName.Text)
qd.Parameters("AuthorSecondName") = Trim(txtAuthorSecondName.Text)
qd.Parameters("BookEdition") = Trim(txtBookEdition.Text)
qd.Parameters("ISBN") = Trim(txtISBN.Text)
qd.Parameters("Price") = Trim(txtPrice.Text)
qd.Parameters("WebLink") = Trim(txtWebLink.Text)
qd.Parameters("DeweyCode") = Trim(txtDeweyCode.Text)
qd.Parameters("BookID") = Trim(lblBookID.Caption)
qd.Execute
'clean up
qd.Close
Set qd = Nothing
'refresh msflexgrid
frmViewBooks.RefreshMSFlexGrid
[/VB]
for some reason it when i use the debuger it says that none of the items (ie the paramaters) are found in this collection.
what is wrong with the above code?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|