473,396 Members | 1,734 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,396 software developers and data experts.

Connection problem from Access front end application to SQL Desktop Engine backend

Hi there,

I sincerely hope that someone out there can help. I have two
instances of the SQL 2000 Desktop Engine running. One is on my local
machine for development and the other is on another machine on our
network which is the production environment. I have built an Access
2003 front end application which connects to this database. This
works fine locally, as you would expect. I successfully installed the
database on the production machine and am able to connect to it via
Access 2003 (using the Data Link Properties window) and from third
party database manager software (similar to Enterprise Manager). I am
not able to to connect to the database via my application.

I am using the "sa" account with a strong password. This is my
connection string:

strConnection = "Provider=sqloledb;DataSource=server02;User
Id=sa;Password=strong;Initial Catalog=Test"

The error I'm getting is:

"Connection cannot be used to perform this operation. It is either
closed or invalid in this context."

The connection string is the only thing that changes in my code when I
switch from my local to my production database. Is there some reason
that I can't use the "sa" account in this fashion that I'm not aware
of? I'd rather not use integrated security for simplicity's sake as
this is a small, internal application. Also, I would have thought
that if that was the issue, I couldn't use "sa" at all, even locally.

I'm going to post to the Access group as well but thought someone here
might have some advice to offer as well.

Thanks,

Barb
Jul 23 '05 #1
2 4218
Hi

You may want to try connecting from your client using osql. It is not clear
if the manager software is on your client. If not then there seems to be a
network problem. Did you install it with the DISABLENETWORKPROTOCOLS
option?
http://support.microsoft.com/default...21120121120120
to enable them see
http://support.microsoft.com/default...b;en-us;827204

John

"Barb" <fu*******@gmail.com> wrote in message
news:2e**************************@posting.google.c om...
Hi there,

I sincerely hope that someone out there can help. I have two
instances of the SQL 2000 Desktop Engine running. One is on my local
machine for development and the other is on another machine on our
network which is the production environment. I have built an Access
2003 front end application which connects to this database. This
works fine locally, as you would expect. I successfully installed the
database on the production machine and am able to connect to it via
Access 2003 (using the Data Link Properties window) and from third
party database manager software (similar to Enterprise Manager). I am
not able to to connect to the database via my application.

I am using the "sa" account with a strong password. This is my
connection string:

strConnection = "Provider=sqloledb;DataSource=server02;User
Id=sa;Password=strong;Initial Catalog=Test"

The error I'm getting is:

"Connection cannot be used to perform this operation. It is either
closed or invalid in this context."

The connection string is the only thing that changes in my code when I
switch from my local to my production database. Is there some reason
that I can't use the "sa" account in this fashion that I'm not aware
of? I'd rather not use integrated security for simplicity's sake as
this is a small, internal application. Also, I would have thought
that if that was the issue, I couldn't use "sa" at all, even locally.

I'm going to post to the Access group as well but thought someone here
might have some advice to offer as well.

Thanks,

Barb

Jul 23 '05 #2
Hi John,

Thanks for your response. Since I posted my query, I did manage to
connect to my remote database using integrated security instead of the
"sa" account. I added my user account to a SQL server group that I
created and then gave that group login rights to the database. That
works fine from my development machine but not if I package up Access
with the Access runtime and try to run on another machine that doesn't
have Access 2003 installed. So, I've solved one problem but now have
another. I've posted again to the Access group to see if anyone can
help me there.

Barb

John Bell wrote:
Hi

You may want to try connecting from your client using osql. It is not clear if the manager software is on your client. If not then there seems to be a network problem. Did you install it with the DISABLENETWORKPROTOCOLS
option?
http://support.microsoft.com/default...21120121120120
to enable them see
http://support.microsoft.com/default...b;en-us;827204

John

"Barb" <fu*******@gmail.com> wrote in message
news:2e**************************@posting.google.c om...
Hi there,

I sincerely hope that someone out there can help. I have two
instances of the SQL 2000 Desktop Engine running. One is on my local machine for development and the other is on another machine on our
network which is the production environment. I have built an Access 2003 front end application which connects to this database. This
works fine locally, as you would expect. I successfully installed the database on the production machine and am able to connect to it via
Access 2003 (using the Data Link Properties window) and from third
party database manager software (similar to Enterprise Manager). I am not able to to connect to the database via my application.

I am using the "sa" account with a strong password. This is my
connection string:

strConnection = "Provider=sqloledb;DataSource=server02;User
Id=sa;Password=strong;Initial Catalog=Test"

The error I'm getting is:

"Connection cannot be used to perform this operation. It is either
closed or invalid in this context."

The connection string is the only thing that changes in my code when I switch from my local to my production database. Is there some reason that I can't use the "sa" account in this fashion that I'm not aware of? I'd rather not use integrated security for simplicity's sake as this is a small, internal application. Also, I would have thought
that if that was the issue, I couldn't use "sa" at all, even locally.
I'm going to post to the Access group as well but thought someone here might have some advice to offer as well.

Thanks,

Barb


Jul 23 '05 #3

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

Similar topics

8
by: Uttam | last post by:
Hello, I am currently in the process of developing an application in a pure desktop world using Access 2000. I am intending to convert this pure desktop application into a Client Server...
4
by: (Pete Cresswell) | last post by:
I would argue that it is not. JET is a desktop DB engine. Sybase is a database Oracle is a database DB2 is a database. VB 6 is a front-end development tool. PowerBuilder is a front-end...
6
by: alanknipmeyer | last post by:
Hi, I`m in the process of migrating a Access 2002 (Run in 2000 mode) from Windows 98 to Win2K Server. It is a shared resource via a file share on the 98 Server. Client systems are Win98 with the...
35
by: deko | last post by:
Do I get more scalability if I split my database? The way I calculate things now, I'll be lucky to get 100,000 records in my Access 2003 mdb. Here some math: Max mdb/mde size = 2000 x 1024 =...
9
by: Barb | last post by:
Hi there, I sincerely hope that someone out there can help. I have two instances of the SQL 2000 Desktop Engine running. One is on my local machine for development and the other is on another...
6
by: jonefer | last post by:
I have two versions of a 'Downtime Application that will run in the event that the mainframe goes down 1) SQL Server ASP.NET app (accessed outside the mainframe network) 2) MS Access Version of...
37
by: jasmith | last post by:
How will Access fair in a year? Two years? .... The new version of Access seems to service non programmers as a wizard interface to quickly create databases via a fancy wizard. Furthermore, why...
16
by: Brian D | last post by:
I have a multiple select list that is created dynamically based on a previous selection on an asp page. The first thing I do is to clear the curent option list by ...
1
by: rlntemp-gng | last post by:
I have two .mdbs, MyTestApp.mdb- front end for forms and MyTestData.mdb-backend for tables. While the front end is copied to the user's desktop via a batch file, the front end is linked to the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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,...

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.