SQLTeam.com | Weblogs | Forums

ODBC SQL -> Oracle

I am trying to create a Stored Procedure and a simple query to from SQ (SSMS) to an Oracle DB. I have this done in Access and it is working fine, but I want to do the same type of connection in SQL but not sure how to do that. Below is the way it is done in Access. How can I accomplish the same thing but in SQL?

Thanks!
Mac

Dim cnOracle As ADODB.Connection
Dim rstIcore As ADODB.Recordset
Dim str2 As String
Dim strIcoreSQL As String

Set cnOracle = New ADODB.Connection
Set rstIcore = New ADODB.Recordset

str2 = "Provider=OraOLEDB.Oracle;" & "Data Source=xxxx; User ID=xxxx;Password=xxxx;"

cnOracle.Open str2

rstIcore.ActiveConnection = cnOracle
rstIcore.CursorLocation = adUseServer
rstIcore.CursorType = adOpenKeyset
rstIcore.LockType = adLockReadOnly

strIcoreSQL = "SELECT * FROM CUS"

create a linked server to Oracle

Thanks for the reply. I have a username and password for the oracle DB but do not have access to it. Does any changes need to be made to Oracle in order for the Link Server to work?