|
-
Jan 27th, 2009, 03:55 PM
#1
Thread Starter
New Member
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 
kind regards
edit: i use vb 6.0
Last edited by helac; Jan 27th, 2009 at 04:09 PM.
-
Jan 27th, 2009, 04:34 PM
#2
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
-
Jan 27th, 2009, 04:44 PM
#3
Thread Starter
New Member
Re: adodc -> variable
thanks alot 
that was exactly what i was looking for 
just one more question:
strData = UCase$(strData)
why to make string to upper case?
kind regards
-
Jan 27th, 2009, 04:51 PM
#4
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.
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
|