HOWTO: Creating a Connection to SQL Server Without a DatasourceLast reviewed: October 31, 1997Article ID: Q155392 |
The information in this article applies to:
SUMMARYWhen creating a connection to access remote data, you can create a connection that does not require an ODBC datasource. Because this method does not require an existing ODBC datasource, you do not have to be concerned with setting up the datasource in the ODBC administrator. This simplifies the task of application distribution.
MORE INFORMATIONThe following steps outline how to create a connection that does not require an ODBC datasource. The connection will be called CONNECT1, and it accesses a SQL Server backend with the following attributes:
Server Name = SQL1 Logon User ID = USER Logon Password = password DATABASE = pubsYou can create the connection either programmatically or using the Connection Designer. Both of these methods will be addressed.
Creating the Connection Programmatically
Creating the Connection Using the Connection Designer
?SQLConnect('CONNECT1')A return value greater than zero indicates a successful connection.
|
Additional query words: DSNLESS
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |