-
adodc -> variable
hey guys i have really simple question:
i make db in access, i can control it by adodc and datagrid, i know how to add new recordset,
i just cant get one thing:
how to return(export maybe) a value from database field to a variable?
or how to edit database using adodc1 and code ("click and edit" in datagrid is useless, i need to do it by code)
try to make it simple, I'm still a rookie in vb :D
kind regards
edit: i use vb 6.0
-
Re: adodc -> variable
The ADODC control has a Recordset property. Use the Recordset.Fields collection to access the values of the current record.
strData = ADODC1.Recordset.Fields("FieldName").Value
strData = UCase$(strData)
ADODC1.Recordset.Fields("FieldName").Value = strData
ADODC1.Recordset.Fields("AnotherField").Value = 734.23
ADODC1.Recordset.Update
-
Re: adodc -> variable
thanks alot :D
that was exactly what i was looking for :D
just one more question:
strData = UCase$(strData)
why to make string to upper case?
kind regards
-
Re: adodc -> variable
I think brucevde was simply trying to show you that if you ran the code, the upper case value will appear in your updated recordset.