By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,320 Members | 2,109 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,320 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.