473,397 Members | 1,960 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

MS Access Frontend for remote sql server

I have a website which runs off a Access database which I am currently
converting to sql server database. I would like to still use my access
front end for reporting and queries..
I created an odbc connection on my computer to the remote sql server
and created a link in access to my sql server tables. All my report and
Queries run fine I just have one problem it keeps on prompting me for
ther password of the remote sqlserver database. I check the odbc
connection and I see the password is not saved in there even though I
put it in. Is there a way I can have the password saved. I do not want
keep on having to enter the password.

Jan 27 '06 #1
4 5473
How did you link that table to Access ? I you used the ODBC
administrator for Creating a DSN and using this Access, make sure that
the password is setup. If so that should be no problem connecting to
the database, unless you use the right password. So try retyping in the
ODBC Administrator the *RIGHT* password.

HTH, jens Suessmeyer,

Jan 27 '06 #2
On 27 Jan 2006 14:08:49 -0800, "Jens" <Je**@sqlserver2005.de> wrote:
How did you link that table to Access ? I you used the ODBC
administrator for Creating a DSN and using this Access, make sure that
the password is setup. If so that should be no problem connecting to
the database, unless you use the right password. So try retyping in the
ODBC Administrator the *RIGHT* password.

HTH, jens Suessmeyer,


There are ways to re-connect to your tables in VBA code.

One option is to re-link in code to tables one by one, and call a
function with a list of table names. (Note - requires hard coding the
user name and password - see below on security concerns.)

Function LinkTable(tblName As String) As Boolean
'links or re-links a single table
'returns true or false based on err value

Dim db As DAO.Database
Dim tdf As DAO.TableDef

On Error Resume Next
Set db = CurrentDb()
'if the link exists, delete it
Set tdf = db.TableDefs(tblName)
If Err.number = 0 Then
'table link exists
db.TableDefs.Delete tblName
db.TableDefs.Refresh
Else
Err.Clear
End If

'create the link
Set tdf = db.CreateTableDef(tblName)
tdf.Connect = "ODBC;Database=" & strSQLDB & ";DSN=" & strDSN &
";uid=username;pwd=password;"
tdf.SourceTableName = tblName
db.TableDefs.Append tdf
If Err.number = 0 Then
LinkTable = True
Debug.Print "Table " & tblName & " linked"
Else
LinkTable = False
End If

db.Close
Set db = Nothing
End Function

Note: You are hard coding the user name and password into the connect
string. This option actually can be fairly secure **provided** that
you have the modules locked down via permissions.

Also note - MS-Access is known for it's lack of real security. You can
enhance it by proper network security. Another option is creating a
**MDE file** -- where the modules will be in a binary format and thus
more secure.

Another solution is to connect as a specific user when the database
starts up (Note - this is not secure because you have to code the
password into a connect string . . . use this only in situations where
you can control access to the database through network security). You
can create a specific MS-Access "user" for the connection string with
just enough permissions to accomplish what you need.

Example:
In a form which opens upon startup include a call to a function like
this:
Call PreConnectWithODBCParameters(strSQLDB, strDSN, "MSAccess_Name",
"password")

In a module:
Sub PreConnectWithODBCParameters(sSQLDatabase As String, sDSN As
String, sUserName As String, sPassword As String)
Dim dbLocal As Database
Dim strConnectInfo As String
Set dbLocal = DBEngine.Workspaces(0).Databases(0)
strConnectInfo = "ODBC;database=" & sSQLDatabase & ";dsn=" & sDSN
& ";" & _
"uid=" & sUserName & ";" & _
"pwd=" & sPassword & ";"
Set dbLocal = OpenDatabase("", False, False, strConnectInfo)
Set dbLocal = Nothing
End Sub
Bill
Jan 28 '06 #3
Hi, i was wondering how do you create a connection to sql server. I'm a
novice in sql server. Pls advise. Thanks

Daniel

aspsql wrote:
I have a website which runs off a Access database which I am currently
converting to sql server database. I would like to still use my access
front end for reporting and queries..
I created an odbc connection on my computer to the remote sql server
and created a link in access to my sql server tables. All my report and
Queries run fine I just have one problem it keeps on prompting me for
ther password of the remote sqlserver database. I check the odbc
connection and I see the password is not saved in there even though I
put it in. Is there a way I can have the password saved. I do not want
keep on having to enter the password.


Jan 31 '06 #4
I have a website which runs off a Access database which I am currently
converting to sql server database. I would like to still use my access
front end for reporting and queries..
I created an odbc connection on my computer to the remote sql server
and created a link in access to my sql server tables. All my report and
Queries run fine I just have one problem it keeps on prompting me for
ther password of the remote sqlserver database. I check the odbc
connection and I see the password is not saved in there even though I
put it in. Is there a way I can have the password saved. I do not want
keep on having to enter the password.

To remove the prompt for the password when opening your linked table make sure you click the option to "Save Password". This option is located in the pop up window where you choose the table or tables you want to link to from the database. Once this is done when you double click the icon to for your linked tables it will open right to themwithout prompting for the password..
Feb 13 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: bala | last post by:
hi access guru's there is a requirement wherein i have to connect ms access frontend with sybase (backend). the data from the frontend should be saved in the table in sybase databae thro...
4
by: Squirrel | last post by:
I've developed an Access 2002 database which will be deployed with the backend on a server and frontend on the users' PCs. I've now been advised that new employees will be given laptops with...
4
by: Trollina | last post by:
I have a medium sized Access 2000 database that has been split into front end/back end. I need some help understanding what to do when I add new tables to the database that I want on the network...
1
by: dfaul | last post by:
I have tested using a single .ADP file on a Win 2003 TS server, and have multiple people access this file. The backend is SQL. As I suspected, the 2nd user gets a Read-Only warning on the .ADP...
42
by: PC Datasheet | last post by:
I have zero experience with using a SQL database for a backend and Access for a frontend. I have some questions: 1. Does an SQL database have tables? 2. How does Access connect to the data in...
3
by: Juergen Lorenz Simon | last post by:
Hello, I'm working on a proposal for migrating a set of MS Access applications over to an Application Server setup. We would want to be capable of running things in parallel for a bit. The idea...
49
by: Mell via AccessMonster.com | last post by:
I created databases on Access 2003 and I want to deploy them to users. My code was also done using 2003. If they have Ms Access 2000 or higher, will they be able to use these dbs with all code,...
1
by: odrap | last post by:
I have a database written in MS Access 2.O that i'm intend to convert to MS ACCESS 2007. The database is a multiuser application which consist of a application database as the frontend and a Data...
2
by: Steve | last post by:
I have zero experience with ODBC. If I have an Access frontend connected to a SQL Database using ODBC, are the tables connected like a frontend/backend Access database where the the tables you see...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.