bhanupraveen
New Member
- Joined
- May 2, 2012
- Messages
- 5
Hi,
I have a scenario where in i need to connect to Oracle and get data from a table which contains CLOB datatype value. Below is my code:
Dim ConnectionString As String
Dim SQL_String As String
Set con = New ADODB.Connection
Set recset = New ADODB.Recordset
Oracle_Data_Source = "perf01"
Oracle_User = "PERF_OWNER"
Oracle_Password = "PERF_OWNER"
ConnectionString = "Provider=msdaora;Data Source=" + Oracle_Data_Source + "; User Id=" + Oracle_User + "; Password=" + Oracle_Password
con.ConnectionString = ConnectionString
con.Open con.ConnectionString
SQL_String = "select ID,dbms_lob.substr(bus_key,25,10) from MDI_WORK"
recset.Open SQL_String, con, adOpenStatic, adLockReadOnly
Do While Not recset.EOF
Debug.Print recset.Fields(0).Value
Debug.Print recset.Fields(1).Value
Loop
When i try to execute this code, getting "Application Defined or Object Defined error '1004'", Pls help me.
I have a scenario where in i need to connect to Oracle and get data from a table which contains CLOB datatype value. Below is my code:
Dim ConnectionString As String
Dim SQL_String As String
Set con = New ADODB.Connection
Set recset = New ADODB.Recordset
Oracle_Data_Source = "perf01"
Oracle_User = "PERF_OWNER"
Oracle_Password = "PERF_OWNER"
ConnectionString = "Provider=msdaora;Data Source=" + Oracle_Data_Source + "; User Id=" + Oracle_User + "; Password=" + Oracle_Password
con.ConnectionString = ConnectionString
con.Open con.ConnectionString
SQL_String = "select ID,dbms_lob.substr(bus_key,25,10) from MDI_WORK"
recset.Open SQL_String, con, adOpenStatic, adLockReadOnly
Do While Not recset.EOF
Debug.Print recset.Fields(0).Value
Debug.Print recset.Fields(1).Value
Loop
When i try to execute this code, getting "Application Defined or Object Defined error '1004'", Pls help me.