Sunday, March 11, 2012

Connecting to external data source

I have found several pages demonstrating this but I still cannot make it
work. I need to connect to an external data source. I have a user DSN named
"OMD" which does not require a username or password. My connection will be
read-only. My intent is to use SQLConnect, although I am open to any
suggestions. I have tried various methods of connecting to Access databases,
figuring that would be easier and then I could connect to my OMD source, but
I have not been able to connect to any other data source. Any words of
encouragement would be appreciated.
How exactly are you trying to connect to external data sources? Linked
servers? Openrowset? Opendatasource? Openquery?
What steps did you take to set this up with SQL Server?
What errors are you getting? What specific types of data sources are
you trying to connect to - e.g. Access, FoxPro, Oracle, Sybase, etc?
I'm not real clear on what it is you are trying to connect to from
where and what the errors are.
-Sue
On Tue, 19 Oct 2004 09:29:12 -0700, Phil T
<PhilT@.discussions.microsoft.com> wrote:

>I have found several pages demonstrating this but I still cannot make it
>work. I need to connect to an external data source. I have a user DSN named
>"OMD" which does not require a username or password. My connection will be
>read-only. My intent is to use SQLConnect, although I am open to any
>suggestions. I have tried various methods of connecting to Access databases,
>figuring that would be easier and then I could connect to my OMD source, but
>I have not been able to connect to any other data source. Any words of
>encouragement would be appreciated.
|||I am trying to connect the the source any way I can.
I have tried Openrowset, openquery, sp_addlinkedserver, sqlconnect,
sqldriverconnect.
I have an ODBC connection named OMD that connects using the Transoft OMD
driver. (Although I have not successfully connected to any type of dtabase;
not even other SQL servers)
It seems to me that sqlconnect is the easiest way to connect. Since there
is no username or password required by the ODBC driver, I thought simply using
declare @.mycode int
@.mycode=sqlconnect(dsn='OMD')
should work. It does not. I would like the proper syntax required.
Somehow I am misinterpreting the examples in the Help files. Please excuse
my ignorance.
Since the code will not compile, I am not getting to the point of errors.
Thanks for replying.
Phil
"Sue Hoegemeier" wrote:

> How exactly are you trying to connect to external data sources? Linked
> servers? Openrowset? Opendatasource? Openquery?
> What steps did you take to set this up with SQL Server?
> What errors are you getting? What specific types of data sources are
> you trying to connect to - e.g. Access, FoxPro, Oracle, Sybase, etc?
> I'm not real clear on what it is you are trying to connect to from
> where and what the errors are.
> -Sue
> On Tue, 19 Oct 2004 09:29:12 -0700, Phil T
> <PhilT@.discussions.microsoft.com> wrote:
>
>
|||If your code won't compile then your first issue is more of
an issue with whatever language you are using and how to
code data access routines. There is no one generic response
on how to do this with any data source and in any language.
In any case, are you trying to code this using the ODBC
APIs? If so, you need to use SQLConnect("DSN-Name") .
It would probably be easier to help you out if you could
post what language you are trying to do this in, what syntax
errors you receive, what the code is that is failing and
what examples you are trying to follow.
-Sue
On Mon, 1 Nov 2004 09:44:05 -0800, Phil T
<PhilT@.discussions.microsoft.com> wrote:
[vbcol=seagreen]
>I am trying to connect the the source any way I can.
>I have tried Openrowset, openquery, sp_addlinkedserver, sqlconnect,
>sqldriverconnect.
>I have an ODBC connection named OMD that connects using the Transoft OMD
>driver. (Although I have not successfully connected to any type of dtabase;
>not even other SQL servers)
>It seems to me that sqlconnect is the easiest way to connect. Since there
>is no username or password required by the ODBC driver, I thought simply using
>declare @.mycode int
>@.mycode=sqlconnect(dsn='OMD')
>should work. It does not. I would like the proper syntax required.
>Somehow I am misinterpreting the examples in the Help files. Please excuse
>my ignorance.
>Since the code will not compile, I am not getting to the point of errors.
>Thanks for replying.
>Phil
>"Sue Hoegemeier" wrote:

No comments:

Post a Comment