Groups | Blog | Home
all groups > sql server odbc > january 2004 >

sql server odbc : SQL connection forcing login for each table



gholtz NO[at]SPAM dslextreme.com
1/25/2004 12:35:31 PM
Does anyone know how to ensure a persistent login??

I have a MS Access application utilizing a SQL 6.5
database. I've created the odbc driver and have
successfully connected using MSQuery from a desktop
running MS 98.
However, each time the Access application connects, I'm
forced to login multiple times (I assume once for each
table) rendering the application virtually unusable.

I've done this before with other Access applications and
on other platforms (Win 95 / Win 2000 / NT 4.0) without
this problem. I even have another VB application
connecting to the same server (different DB) without any
problems.

I only have about four more hairs to pull out before ther
is nothing left!
Mary Chipman
1/25/2004 6:46:38 PM
Log on in code instead of using the GUI tools to relink the tables --
end of problem. Simply create a new TableDef object each time and set
its connection property. The other advantage of this technique is that
you don't have to create a DSN for each user -- you can simply supply
the connection string in your code. When your app closes, delete the
TableDef objects. This also makes your app more secure since users
won't be piggybacking on previous connections.

-- Mary
Microsoft Access Developer's Guide to SQL Server
http://www.amazon.com/exec/obidos/ASIN/0672319446

On Sun, 25 Jan 2004 12:35:31 -0800, "gholtz@dslextreme.com"
[quoted text, click to view]
AddThis Social Bookmark Button