Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ADODB objects

Status
Not open for further replies.

pazzy

Programmer
Apr 12, 2007
1
ES
Hi
Looking at the following code
----------------------------------------
Function Main()

dim RS

'Create Record set
set RS = CreateObject("ADODB.Recordset")
set RS = DTSGlobalVariables("gCampaigns").value


DTSGlobalVariables("gCampaignID").value = RS.Fields("code")
DTSGlobalVariables("gCShortName").Value = RS.Fields("shortname")

'Go to next row
RS.MoveNext

'Success
Main = DTSTaskExecResult_Success
End Function


----------------------------------------
RS.Fields ? Fields ? is this a built in object of ADODB ?


 
Hi and welcome to Tek-Tips. To get the best from these forums please read faq222-2244 carefully. It will give you guidance on effective forum usage, including finding the right forum to post in. There are language forums for most of the main languages.

For this question, just look at which describes the Fields collection

___________________________________________________________
If you want the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
Steam Engine Prints
 
Strictly speaking, 'Fields' is a collection, not an object. You would use it to extract the contents of the recordset's, er, fields. Thus, the database being queries here would have fields called 'code' and 'shortname' and the statements shown would set values from teh contents of those fields.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top