B
bhavesh78
How can I write the data in record set to cells in excel? I have the
following code and the query always returns only ONE row. I want the
result in data set to be put on the excel sheet like say Column1 in
cell A1, column2 in cell A2 and so on...
CODE
---------------------------------
Dim ProdConnectString As String
Dim conn As New ADODB.Connection
Dim rs As New ADODB.Recordset
' String used for connecting to DB
ProdConnectString = "provider=msdaora.1;user
id=USER;password=PASS;data source =
DATASOURCE;option=1+2+8+32+2048+16384"
conn.ConnectionString = ProdConnectString
conn.CursorLocation = adUseClient
conn.Open
mySQLCriTeria = "SELECT A.Col1, A.Col2, B.Col2, B.Col3 from TBL A,
TBL B where A.Col1=B.Col1"'"
rs.Open mySQLCriTeria, conn
following code and the query always returns only ONE row. I want the
result in data set to be put on the excel sheet like say Column1 in
cell A1, column2 in cell A2 and so on...
CODE
---------------------------------
Dim ProdConnectString As String
Dim conn As New ADODB.Connection
Dim rs As New ADODB.Recordset
' String used for connecting to DB
ProdConnectString = "provider=msdaora.1;user
id=USER;password=PASS;data source =
DATASOURCE;option=1+2+8+32+2048+16384"
conn.ConnectionString = ProdConnectString
conn.CursorLocation = adUseClient
conn.Open
mySQLCriTeria = "SELECT A.Col1, A.Col2, B.Col2, B.Col3 from TBL A,
TBL B where A.Col1=B.Col1"'"
rs.Open mySQLCriTeria, conn