02-10-2009, 08:05 PM
Code:
Set dtNewSheet=DataTable.AddSheet( "mysheet" )
set stNewCol1=dtNewSheet.addparameter("col1","" )
set stNewCol2=dtNewSheet.addparameter("col2","" )
set stNewCol3=dtNewSheet.addparameter("col3","" )
set conn5=Createobject( "ADODB.Connection")
Srvname5="Driver= {Microsoft ODBC forOracle}:Server= DBserver, UID=Sa,Password= sa"
conn5.open "provider=sqloledb.1;server=xyz;uid=sa;pwd=sa@123;database=First"
Set Rec5 = CreateObject("ADODB.Recordset")
SQL5="select * from employee "
Set Rec5 = conn5.execute( SQL5)
j=1
While not rec5.eof
unit=Rec5.fields("route_seq")
=Rec5.fields("id")
procesc=Rec5.fields("process")
stNewCol1.valuebyrow (j)=majprod
stNewCol2.valuebyrow (j)=orderid
stNewCol3.valuebyrow (j)=header
j=j+1
Rec5.movenext
Wend