I have two Adodc controls whihc link to two different databases. There is a search box (InputBox) which searches th recordset but when I try to use the Adodc control again to go through the records I get the message...
"Cannot Update '(expression)'; field not updateable"
My code is as follows:
If optImageDB.Value = True And optMovieDB.Value = False Then
StrSearch = InputBox("Enter the ID that you would like to search for....", "Image Database ID Search"
FindString = "SELECT * FROM pic_table WHERE id LIKE '" & StrSearch & "'"
rsRec.Open FindString, "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\idcnt2\db$\images.mdb", adOpenStatic, adLockReadOnly, adCmdText
txtImgID.Text = rsRec!id
txtImgCadastre.Text = rsRec!cadastre
txtImgAuthor.Text = rsRec!author
txtImgDetails.Text = rsRec!details
txtImgKeywords.Text = rsRec!keywords
txtImgPosted.Text = rsRec!posted
ElseIf optImageDB.Value = False And optMovieDB.Value = True Then
StrSearch = InputBox("Enter the ID that you would like to search for....", "Movie Database ID Search"
FindString = "SELECT * FROM movies_table WHERE id LIKE '" & StrSearch & "'"
rsRec.Open FindString, "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\idcnt2\db$\movies.mdb", adOpenStatic, adLockReadOnly, adCmdText
txtMovID.Text = rsRec!id
txtMovCadastre.Text = rsRec!cadastre
txtMovImgAuthor.Text = rsRec!author
txtMovImgDetails.Text = rsRec!details
txtMovImgKeywords.Text = rsRec!keywords
txtMovImgPosted.Text = rsRec!posted
End If
Do I need to the refresh the Adodc controls on the form?
Thanks....
"Cannot Update '(expression)'; field not updateable"
My code is as follows:
If optImageDB.Value = True And optMovieDB.Value = False Then
StrSearch = InputBox("Enter the ID that you would like to search for....", "Image Database ID Search"
FindString = "SELECT * FROM pic_table WHERE id LIKE '" & StrSearch & "'"
rsRec.Open FindString, "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\idcnt2\db$\images.mdb", adOpenStatic, adLockReadOnly, adCmdText
txtImgID.Text = rsRec!id
txtImgCadastre.Text = rsRec!cadastre
txtImgAuthor.Text = rsRec!author
txtImgDetails.Text = rsRec!details
txtImgKeywords.Text = rsRec!keywords
txtImgPosted.Text = rsRec!posted
ElseIf optImageDB.Value = False And optMovieDB.Value = True Then
StrSearch = InputBox("Enter the ID that you would like to search for....", "Movie Database ID Search"
FindString = "SELECT * FROM movies_table WHERE id LIKE '" & StrSearch & "'"
rsRec.Open FindString, "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\idcnt2\db$\movies.mdb", adOpenStatic, adLockReadOnly, adCmdText
txtMovID.Text = rsRec!id
txtMovCadastre.Text = rsRec!cadastre
txtMovImgAuthor.Text = rsRec!author
txtMovImgDetails.Text = rsRec!details
txtMovImgKeywords.Text = rsRec!keywords
txtMovImgPosted.Text = rsRec!posted
End If
Do I need to the refresh the Adodc controls on the form?
Thanks....