Wrox Programmer Forums
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 20th, 2004, 03:30 PM
Registered User
 
Join Date: Nov 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default ODBC Connection

Hi to all,
I have linked table to an external SQL server.
I am curenctly using an ODBC connection to access the tables, I would like to know how I can programatically make the connection without getting the dialog box asking for the password.

Thanks

Alain


 
Old September 20th, 2004, 03:52 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 625
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to jemacc
Default

Use Trusted Connection

oConn.Open "Provider=sqloledb;" & _
           "Data Source=yourServerName;" & _
           "Initial Catalog=yourDatabaseName;" & _
           "Integrated Security=SSPI"



 
Old September 21st, 2004, 08:23 AM
Registered User
 
Join Date: Nov 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Jemmac,
can you explain to me more about the Trudted connection ??
I am new at this
Also I tried you code and it gives me an error at
oconn.open
Method or data menber not found

Can you give me more explanation
Thanks

Alain


 
Old September 22nd, 2004, 09:05 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 625
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to jemacc
Default

When you create your DSN you have an option to use two type of authentication, one is SQL server authentication and the other is windows authentication.

1. SQL authentication - use a SQL server login account you create in SQL login.
2. Windows Authentication - uses a windows login to SQL

You can use both types of connection when you have setup SQL to use mixed mode.

One question I did not ask; how are you calling your connection string.







Similar Threads
Thread Thread Starter Forum Replies Last Post
Sql vs Odbc Connection vgsgowrisankar C# 2005 6 April 10th, 2008 08:14 AM
Losing ODBC connection kornshell SQL Server ASP 0 June 18th, 2007 09:52 AM
C# create an odbc connection? macupryk Oracle ASP 1 December 8th, 2004 06:55 AM
Need Help with ODBC connection johnjohn Visual C++ 2 December 7th, 2004 01:11 PM
ODBC connection mishaq SQL Server 2000 13 June 16th, 2004 02:55 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.