For Programmers: Free Programming Magazines  


Home > Archive > Cobol > April 2004 > Connecting to MS-SQL Server via ADO (MF NE)









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Connecting to MS-SQL Server via ADO (MF NE)
FT

2004-04-03, 10:30 am

Hi everybody,

I need to connect to MS-SQL Server 2000 via ADO - do YOU have some code
that shows my how to manage that?

Thank you very much in advance
FT


p.s.: I'm using Micro Focus Net Express 3.1

LX-i

2004-04-04, 12:30 am

FT wrote:
> Hi everybody,
>
> I need to connect to MS-SQL Server 2000 via ADO - do YOU have some code
> that shows my how to manage that?


Assuming you've got a DSN called "MyDB", something along the lines of

DSN=MyDB

should work for your connection string - then, supply an appropriate
user name and password.

If you can't set up the DSN, check MSDN for the ConnectionString
property for SQL Server - I can't remember the exact string at this point.


--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~
~ / \ / ~ Live from Montgomery, AL! ~
~ / \/ o ~ ~
~ / /\ - | ~ LXi0007@Netscape.net ~
~ _____ / \ | ~ http://www.knology.net/~mopsmom/daniel ~
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
~ I do not read e-mail at the above address ~
~ Please see website if you wish to contact me privately ~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~

FT

2004-04-04, 4:30 am

Thanks for your answer,

but, ConnectionString is not my problem - how and which ActiveX control
to use for the connection was what I thought to be asking for.

FT

BTW: I assume your answer was about ODBC connections, I do need an ADO
connection (-> ADO has no DSN, but DataSource/DateBase)



LX-i schrieb:
> FT wrote:
>
>
>
> Assuming you've got a DSN called "MyDB", something along the lines of
>
> DSN=MyDB
>
> should work for your connection string - then, supply an appropriate
> user name and password.
>
> If you can't set up the DSN, check MSDN for the ConnectionString
> property for SQL Server - I can't remember the exact string at this point.
>
>


Me

2004-04-04, 2:30 pm

"FT" <a@b.com> wrote in message news:406FB950.4040606@b.com...
> Thanks for your answer,
>
> but, ConnectionString is not my problem - how and which ActiveX control
> to use for the connection was what I thought to be asking for.
>

Have you done a Google Search?

For instance:-

http://msdn.microsoft.com/library/d...usingadonet.asp


Gary

2004-04-04, 6:30 pm

"FT" <a@b.com> wrote:
> I need to connect to MS-SQL Server 2000 via ADO - do YOU have some code
> that shows my how to manage that?


FT, for NX3, these might help:

http://downloads.microfocus.com/exa.../sql/adosql.zip

http://downloads.microfocus.com/exa...ral/adodemo.zip

You might also be interested in NX4 EXEC ADO capabilities. If you're on
maint I believe the upgrade is free.

Gary.


LX-i

2004-04-04, 7:30 pm

FT wrote:
> Thanks for your answer,
>
> but, ConnectionString is not my problem - how and which ActiveX control
> to use for the connection was what I thought to be asking for.
>
> FT
>
> BTW: I assume your answer was about ODBC connections, I do need an ADO
> connection (-> ADO has no DSN, but DataSource/DateBase)


Ah - my apologies. I believe you'll need the ADODB.Connection object to
manage the connection, and the ADODB.Recordset object to retrieve data.
(Those aren't the exact .NET names - don't know if you're in that
environment or not - but maybe it'll give you a place to look... :> )


--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~
~ / \ / ~ Live from Montgomery, AL! ~
~ / \/ o ~ ~
~ / /\ - | ~ LXi0007@Netscape.net ~
~ _____ / \ | ~ http://www.knology.net/~mopsmom/daniel ~
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
~ I do not read e-mail at the above address ~
~ Please see website if you wish to contact me privately ~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com