RE: Active X connect to SQL 2000



popol (popol@xxxxxxxxxxxxxxxxxxxxxxxxx) writes:
> Here is a piece of code (running as an ActiveX task of a DTS)
>
> set cnx = CreateObject("ADODB.Connection")
> cnx.provider = "sqloledb"
> cnx.open "(local)","Stat", "Alice"
> cnx.DefaultDatabase = "Stat"

cnx.ConnectionString = "Provider=SQLOLED;Trusted_connection=Yes;" & _
"Server=xxx;Database=xxx";

If you are connecting to the local server, you don't have to specify
the server, as (local) is the default.


--
Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
.



Relevant Pages

  • Re: Connecting to SQL w/ADO
    ... I'm trying to connect to a local server from a local workstation (and ... Internet or MySQL server. ... I would not use the ODBC provider to access SQL Server. ...
    (microsoft.public.vb.database)
  • Re: Login without password
    ... "Troubleshooting Orphaned Users" Topic in Books Online ... >How can I delete the login and add it back? ... >>> My SQL Server is version 7.0. ... >>> one old server to a new one, but it is still SQL Server ...
    (microsoft.public.sqlserver.security)
  • Re: Help a newb (issue with excel, ms access and SQL Server)
    ... I can't figure it out how to do this in SQL server. ... I was using the following to create an excel file based on the select ... I believe there are some examples in Books Online. ...
    (comp.databases.ms-sqlserver)
  • Re: beware: SQL2005 management studio not 2000 compatible
    ... SQL2005 management told me that some feature was not supported on SQL 2000 ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ... Books Online for SQL Server 2005 at ...
    (microsoft.public.sqlserver.tools)
  • Re: Internal Traffic on PC is very slow
    ... Hamster to/ fro XanaNews ... Hamster Classis is a local pop3/ nntp/ smtp/ imap server. ... download mails/ news from several accounts/ servers and combine ... in its own local server and relay them to users who access its ...
    (comp.security.firewalls)

Loading