07-24-2008, 02:30 PM
Code:
Set Conn = CreateObject("ADODB.Connection")
Set Rs = CreateObject("ADODB.recordset")
Conn.Open("DSN=devtest ,username=xxx,password=yyy")
sql = "Select Code, Meaning From TB_AMS052_Codes Where Code_Nam = Pole"
Rs.CursorType = 1 'set to a Keyset cursor type’
Rs.Open sql,Conn
Recordcount = Rs.RecordCount
DataTable.GlobalSheet.AddParameter "Meaning",""
While(NOT Rs.EOF)
'Msgbox Rs.Fields("Meaning")
For i=1 to Recordcount
DataTable.SetCurrentRow(i)
DataTable("Meaning",DtGlobalSheet) = Rs.Fields("Meaning")
Rs.MoveNext
Next
wend
DataTable.Export "C:\DatabaseExample.xls"
Conn.close
Set Conn = Nothing
Set Rs = Nothing
This is the script an error saying that the not able to connect to database .Can you tell me the format for connect string for oracle
I need the sequence for the connstrng