11-20-2009, 11:49 AM
Hi pavan
I followed this code
.
my scenario is i want to connect database and from one table 's column 's value fetch and save in excel sheet or datatable.
ex.form employee table i want to fetch First name column's values in excel r datatable.
pls help
I followed this code
Code:
Set con = CreateObject("adodb.connection")
Set rs = CreateObject("adodb.recordset")
con.open "Provider=my query string"
rs.open "sql query ",con
i=0
do until rs<>eof
dim arr
arr(i)=rs("Columnname").value
i=i+1
rs.movenext
loop
my scenario is i want to connect database and from one table 's column 's value fetch and save in excel sheet or datatable.
ex.form employee table i want to fetch First name column's values in excel r datatable.
pls help