Guys, help me :
How to connect excel and oracle using vba code?
i have database name, username and password plzzz help me with connection codes...
awaiting for your reply guys!!!
Guys, help me :
How to connect excel and oracle using vba code?
i have database name, username and password plzzz help me with connection codes...
awaiting for your reply guys!!!
Take a look at http://www.carlprothman.net/Default....acleFromOracle
____________________________________________
Nihil simul inventum est et perfectum
Abusus non tollit usum
Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
James Thurber
I have tried the below code
Sub connection()
Dim ProdConnectString As String
Dim conn As New ADODB.connection
ProdConnectString = "provider=site address;user id=xxxx;password=yyyyy;data source = aaaaaaaa"
conn.ConnectionString = ProdConnectString
conn.CursorLocation = adUseClient
conn.Open
End Sub
But i am getting an error "user-defined type not defined" in the highlited area..
Plzzz help me to proceed
You have to set a reference to Microft ActiveX Data Objects.
____________________________________________
Nihil simul inventum est et perfectum
Abusus non tollit usum
Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
James Thurber
Can you explain, how to do it???
plzz
Go to Tools>References in the VBIDE and select it from the list.
____________________________________________
Nihil simul inventum est et perfectum
Abusus non tollit usum
Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
James Thurber
You could even use late-binding
[vba]
Sub connection()
Dim ProdConnectString As String
Dim conn As Object
Set conn = CreateObject("ADODB.connection")
ProdConnectString = "provider=site address;user id=xxxx;password=yyyyy;data source = aaaaaaaa"
conn.ConnectionString = ProdConnectString
conn.CursorLocation = adUseClient
conn.Open
End Sub
[/vba]
____________________________________________
Nihil simul inventum est et perfectum
Abusus non tollit usum
Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
James Thurber
I have set a reference to microsft activex data objects..
But i am getting an error "
Run time error 3706. Provider can not be found. It may not be pro perly installed"
Oracle will provide an OLEDB data provider which you need to have installed. Try the Microsoft version, or evene the ODBC connection string.
____________________________________________
Nihil simul inventum est et perfectum
Abusus non tollit usum
Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
James Thurber
The meaning of Early Binding & Late Binding is dawning slowly on me.Originally Posted by xld
For Early Binding, the user must have the Objects declared and available in the library. Advantage is: he will get to see all the options available.
For Late Binding, the above is not necessary. The syntax has to be correct or it will result in some kind of Run Time Error. It has this obvious disadvantage. So how does one take a call on Binding option?
Regards,
--------------------------------------------------------------------------------------------------------
Shrivallabha
--------------------------------------------------------------------------------------------------------
Using Excel 2016 in Home / 2010 in Office
--------------------------------------------------------------------------------------------------------
I don't think that will fix this problem, it can't make a connection, eraly or late, because the data provider is not found.
____________________________________________
Nihil simul inventum est et perfectum
Abusus non tollit usum
Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
James Thurber