Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
pazzy11
Posting Yak Master
145 Posts |
Posted - 2007-04-11 : 04:54:26
|
Hi I want to understand this ActiveX code ...----------------------------------------------Function Main() dim RS 'Create the 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_SuccessEnd Function----------------------------------okay so gCampaignID & gCShortName & gCampaigns are parameters in the DTS package.but this line DTSGlobalVariables("gCampaignID").value = RS.Fields("code")RS:Fields ? is this some structure with Record Sets ? same question for the next line DTSGlobalVariables("gCShortName").Value = RS.Fields("shortname") Also the 1st line , set RS = CreateObject("ADODB.Recordset") maybe it's this that sets this structure ... any help appreciated , maybe if you could comment the above code ? also if you could direct me to a good ActiveX tutorial .. cheers.. |
|
russell
Pyro-ma-ni-yak
5072 Posts |
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2007-04-11 : 09:38:06
|
Maybe you need little ADO tutorial:[url]http://www.vbexplorer.com/VBExplorer/wrox/sample1061.asp[/url][url]http://www.w3schools.com/ado/default.asp[/url]Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
|
|
|
|
|