Showing posts with label error. Show all posts
Showing posts with label error. Show all posts

Tuesday, March 27, 2012

comparing tables... again...

I asked a similar question not to long ago, but I've just tried the same sort of query for a similar problem and get an error: "Cannot resolve collation conflict for equal to operation". I've no idea what it means. I've had a search around, but can't see anything that seems to do what I'm after.

All I've got is two tables: 'existing_members' and 'forum_users'. I want to select the forum_users.id (my primary key) where their email address also exists in the existing_members table.

Then, I want to insert the forum_users.id into existing_members.forum_users_id

Does that make sense?no, that doesn't make sense

you want to select forum_users ids where the email already exists in existing_members, and then insert them? won't they be duplicates?

it might help to see your query sql, too

rudy|||Are you trying to update a field in table2 with the primary key field from table1 where the email address exists in both table1 and table2 ? Is the email address unique enough to join between the 2 tables ? Please post your update statement.|||OK, here's what I tried:

UPDATE existing_members SET forum_users_id=forum_users.id WHERE email=forum_users.email

but obviously that's not gonna work. I need to kinda do a join on the tables but I'm not sure how?

Cheers..|||UPDATE existing_members
SET forum_users_id=forum_users.id
FROM existing_members, forum.users
WHERE existing_members.email=forum_users.email|||Aha - I didn't know you could do that :)

Right, now I'm getting a "Cannot resolve collation conflict for equal to operation". This would be because the muppets who sent us this (I think their previous data storage policy involved writing stuff on the back of envelopes) have got duplicate entries in there: the same member with a different member number.

So how can I find these duplicate entries? Assuming that the email address is still the best field for comparing individual members, I need to select all entries where the email address occurs elsewhere in the column.

I've tried this, but it seems to be coming up with some weird results:

SELECT email from existing_members WHERE (SELECT COUNT(email) FROM existing_members)>1|||select * from existing_members
where email in
(select email
from existing_members
group by email
having count(*) >1 )sqlsql

Monday, March 19, 2012

compare two fields from same dataset in iif

hi,
This statement returns an "#error" on my report.
=sum(iif(Fields!current_fiscal_period.Value=Fields!fiscal_period.Value,Fields!shrink_dollars_positive.Value,0))
There is only one datatset for this report.
any clues?
thanks,
JustinGot it! I needed to Cint function
=sum(iif(Fields!current_fiscal_period.Value=Fields!fiscal_period.Value,
CInt(Fields!shrink_dollars_positive.Value),0))

Wednesday, March 7, 2012

Compact Database Error Code: 0

I am currently working in VB.NET with SQL Mobile 2005. I am trying to compact a database, .sdf, using the SqlCeEngine Object compact(connectionstring). When I use this code to compact a small database, only about 300KB, it returns okay however when I try to compact a larger database, about 9MB, it returns with a SQL Error Code: 0, "The operation completed successfully" however with no compacted database. The code works however it only seems to work for smaller databases. Does anyone have any ideas on how to correct this error or tell me why it returns with that type of error.

Snuggs

I am able to compact the database of size nearly 21 MB in our lab. Is it possible for you to share the repro for us to diagnose.

Thanks,

LaxmI NRO, MSFT, SQL Mobile, Microsoft Corporation

|||What do I need to do in order to give you the repro, do you mean just an actual copy of the database itself or something else?|||

Yes actual copy of the database itself. Before sharing it to me, can you check whether the DB is in correct state. compact.exe /verify would let you know if there any bad pages in the DB.

Thanks,

Laxmi NRO, MSFT, SQL Mobile, Microsoft Corporation

|||The DB is in the correct state. Do you have a direct email address that I can send this to you because this will not let me send this as an attachment.|||Please send it to l-a-x-m-i-n-r-o-A-T-m-i-c-r-o-s-o-f-t-D-O-T-c-o-m Please also paste this question link in the mail for the context. Thanks, Laxmi NRO, MSFT, SQL Mobile, Microsoft Corporation|||

Hi Snuggs,

As per our conversation I could see that you have opened a bug here in Product Feedback center. http://lab.msdn.microsoft.com/ProductFeedback/viewFeedback.aspx?feedbackid=d0f14331-1b05-418a-9a11-2378457e4eb8

And as mentioned we could not repro. We are able to compact the DB very easily with a sample C# program mentioned in the above URL.

Thanks,

Laxmi NRO, MSFT, SQL Mobile, Microsoft Corporation

Compact Database Error Code: 0

I am currently working in VB.NET with SQL Mobile 2005. I am trying to compact a database, .sdf, using the SqlCeEngine Object compact(connectionstring). When I use this code to compact a small database, only about 300KB, it returns okay however when I try to compact a larger database, about 9MB, it returns with a SQL Error Code: 0, "The operation completed successfully" however with no compacted database. The code works however it only seems to work for smaller databases. Does anyone have any ideas on how to correct this error or tell me why it returns with that type of error.

Snuggs

I am able to compact the database of size nearly 21 MB in our lab. Is it possible for you to share the repro for us to diagnose.

Thanks,

LaxmI NRO, MSFT, SQL Mobile, Microsoft Corporation

|||What do I need to do in order to give you the repro, do you mean just an actual copy of the database itself or something else?|||

Yes actual copy of the database itself. Before sharing it to me, can you check whether the DB is in correct state. compact.exe /verify would let you know if there any bad pages in the DB.

Thanks,

Laxmi NRO, MSFT, SQL Mobile, Microsoft Corporation

|||The DB is in the correct state. Do you have a direct email address that I can send this to you because this will not let me send this as an attachment.|||Please send it to l-a-x-m-i-n-r-o-A-T-m-i-c-r-o-s-o-f-t-D-O-T-c-o-m Please also paste this question link in the mail for the context. Thanks, Laxmi NRO, MSFT, SQL Mobile, Microsoft Corporation|||

Hi Snuggs,

As per our conversation I could see that you have opened a bug here in Product Feedback center. http://lab.msdn.microsoft.com/ProductFeedback/viewFeedback.aspx?feedbackid=d0f14331-1b05-418a-9a11-2378457e4eb8

And as mentioned we could not repro. We are able to compact the DB very easily with a sample C# program mentioned in the above URL.

Thanks,

Laxmi NRO, MSFT, SQL Mobile, Microsoft Corporation

Saturday, February 25, 2012

Communications link failure #0

We are intermittently getting this error on our SQL server. The front end is
access and this happens every so often causing the users to have to exit out
of access and reconnect. I'm by no means a SQL expert, and our programmer
who manages this database isn't sure what it is either, he says it's like
the server is just "forgetting his password" and dumping the ODBC
connection...
Any ideas/help would be appreciated.
Thanks!
Scott
Hi
You don't give what version of MDAC or SQL Server that you are using!
http://www.aspfaq.com/show.asp?id=2160
http://msdn.microsoft.com/data/mdac/default.aspx
Searching Google for "Communications link failure" turns up quite a few
things, it seemed to be quite common with SQL Server 6.5!
You may want to check that you don't have connection pooling.
Try logging the ODBC commands (on the client) and using Profiler on the
server to pin point if there is one particular set of circumstances when it
occurs.
Check your SQL Server logs and Event logs (on client and server) to see if
there in any information or event that corresponds to the timing of your
disconnections.
Use the MDAC component check to show the version and if you have a
consistent installation.
HTH
John
"Scott McDonald" wrote:

> We are intermittently getting this error on our SQL server. The front end is
> access and this happens every so often causing the users to have to exit out
> of access and reconnect. I'm by no means a SQL expert, and our programmer
> who manages this database isn't sure what it is either, he says it's like
> the server is just "forgetting his password" and dumping the ODBC
> connection...
> Any ideas/help would be appreciated.
> Thanks!
> Scott
>
>
|||it's SQL 2000 on Windows 2003 and using Access 2003 - sorry . MDAC is
newest, which I think is x.7 or something...
"John Bell" <JohnBell@.discussions.microsoft.com> wrote in message
news:2B4BF663-A19B-4E40-B44A-D9684B757E4B@.microsoft.com...[vbcol=seagreen]
> Hi
> You don't give what version of MDAC or SQL Server that you are using!
> http://www.aspfaq.com/show.asp?id=2160
> http://msdn.microsoft.com/data/mdac/default.aspx
> Searching Google for "Communications link failure" turns up quite a few
> things, it seemed to be quite common with SQL Server 6.5!
> You may want to check that you don't have connection pooling.
> Try logging the ODBC commands (on the client) and using Profiler on the
> server to pin point if there is one particular set of circumstances when
> it
> occurs.
> Check your SQL Server logs and Event logs (on client and server) to see if
> there in any information or event that corresponds to the timing of your
> disconnections.
> Use the MDAC component check to show the version and if you have a
> consistent installation.
> HTH
> John
>
> "Scott McDonald" wrote:
|||Hi
You may also want to switch protocols and check out the network in
general for possible problems.
John
Scott McDonald wrote:
> it's SQL 2000 on Windows 2003 and using Access 2003 - sorry . MDAC is
[vbcol=seagreen]
> newest, which I think is x.7 or something...
>
> "John Bell" <JohnBell@.discussions.microsoft.com> wrote in message
> news:2B4BF663-A19B-4E40-B44A-D9684B757E4B@.microsoft.com...
using![vbcol=seagreen]
few[vbcol=seagreen]
the[vbcol=seagreen]
when[vbcol=seagreen]
see if[vbcol=seagreen]
your[vbcol=seagreen]
front end[vbcol=seagreen]
to exit[vbcol=seagreen]
programmer[vbcol=seagreen]
it's like[vbcol=seagreen]

Communications link failure #0

We are intermittently getting this error on our SQL server. The front end is
access and this happens every so often causing the users to have to exit out
of access and reconnect. I'm by no means a SQL expert, and our programmer
who manages this database isn't sure what it is either, he says it's like
the server is just "forgetting his password" and dumping the ODBC
connection...
Any ideas/help would be appreciated.
Thanks!
Scott
Hi
You don't give what version of MDAC or SQL Server that you are using!
http://www.aspfaq.com/show.asp?id=2160
http://msdn.microsoft.com/data/mdac/default.aspx
Searching Google for "Communications link failure" turns up quite a few
things, it seemed to be quite common with SQL Server 6.5!
You may want to check that you don't have connection pooling.
Try logging the ODBC commands (on the client) and using Profiler on the
server to pin point if there is one particular set of circumstances when it
occurs.
Check your SQL Server logs and Event logs (on client and server) to see if
there in any information or event that corresponds to the timing of your
disconnections.
Use the MDAC component check to show the version and if you have a
consistent installation.
HTH
John
"Scott McDonald" wrote:

> We are intermittently getting this error on our SQL server. The front end is
> access and this happens every so often causing the users to have to exit out
> of access and reconnect. I'm by no means a SQL expert, and our programmer
> who manages this database isn't sure what it is either, he says it's like
> the server is just "forgetting his password" and dumping the ODBC
> connection...
> Any ideas/help would be appreciated.
> Thanks!
> Scott
>
>
|||it's SQL 2000 on Windows 2003 and using Access 2003 - sorry . MDAC is
newest, which I think is x.7 or something...
"John Bell" <JohnBell@.discussions.microsoft.com> wrote in message
news:2B4BF663-A19B-4E40-B44A-D9684B757E4B@.microsoft.com...[vbcol=seagreen]
> Hi
> You don't give what version of MDAC or SQL Server that you are using!
> http://www.aspfaq.com/show.asp?id=2160
> http://msdn.microsoft.com/data/mdac/default.aspx
> Searching Google for "Communications link failure" turns up quite a few
> things, it seemed to be quite common with SQL Server 6.5!
> You may want to check that you don't have connection pooling.
> Try logging the ODBC commands (on the client) and using Profiler on the
> server to pin point if there is one particular set of circumstances when
> it
> occurs.
> Check your SQL Server logs and Event logs (on client and server) to see if
> there in any information or event that corresponds to the timing of your
> disconnections.
> Use the MDAC component check to show the version and if you have a
> consistent installation.
> HTH
> John
>
> "Scott McDonald" wrote:
|||Hi
You may also want to switch protocols and check out the network in
general for possible problems.
John
Scott McDonald wrote:
> it's SQL 2000 on Windows 2003 and using Access 2003 - sorry . MDAC is
[vbcol=seagreen]
> newest, which I think is x.7 or something...
>
> "John Bell" <JohnBell@.discussions.microsoft.com> wrote in message
> news:2B4BF663-A19B-4E40-B44A-D9684B757E4B@.microsoft.com...
using![vbcol=seagreen]
few[vbcol=seagreen]
the[vbcol=seagreen]
when[vbcol=seagreen]
see if[vbcol=seagreen]
your[vbcol=seagreen]
front end[vbcol=seagreen]
to exit[vbcol=seagreen]
programmer[vbcol=seagreen]
it's like[vbcol=seagreen]

Communications link failure #0

We are intermittently getting this error on our SQL server. The front end is
access and this happens every so often causing the users to have to exit out
of access and reconnect. I'm by no means a SQL expert, and our programmer
who manages this database isn't sure what it is either, he says it's like
the server is just "forgetting his password" and dumping the ODBC
connection...
Any ideas/help would be appreciated.
Thanks!
ScottHi
You don't give what version of MDAC or SQL Server that you are using!
http://www.aspfaq.com/show.asp?id=2160
http://msdn.microsoft.com/data/mdac/default.aspx
Searching Google for "Communications link failure" turns up quite a few
things, it seemed to be quite common with SQL Server 6.5!
You may want to check that you don't have connection pooling.
Try logging the ODBC commands (on the client) and using Profiler on the
server to pin point if there is one particular set of circumstances when it
occurs.
Check your SQL Server logs and Event logs (on client and server) to see if
there in any information or event that corresponds to the timing of your
disconnections.
Use the MDAC component check to show the version and if you have a
consistent installation.
HTH
John
"Scott McDonald" wrote:

> We are intermittently getting this error on our SQL server. The front end
is
> access and this happens every so often causing the users to have to exit o
ut
> of access and reconnect. I'm by no means a SQL expert, and our programmer
> who manages this database isn't sure what it is either, he says it's like
> the server is just "forgetting his password" and dumping the ODBC
> connection...
> Any ideas/help would be appreciated.
> Thanks!
> Scott
>
>|||it's SQL 2000 on Windows 2003 and using Access 2003 - sorry . MDAC is
newest, which I think is x.7 or something...
"John Bell" <JohnBell@.discussions.microsoft.com> wrote in message
news:2B4BF663-A19B-4E40-B44A-D9684B757E4B@.microsoft.com...[vbcol=seagreen]
> Hi
> You don't give what version of MDAC or SQL Server that you are using!
> http://www.aspfaq.com/show.asp?id=2160
> http://msdn.microsoft.com/data/mdac/default.aspx
> Searching Google for "Communications link failure" turns up quite a few
> things, it seemed to be quite common with SQL Server 6.5!
> You may want to check that you don't have connection pooling.
> Try logging the ODBC commands (on the client) and using Profiler on the
> server to pin point if there is one particular set of circumstances when
> it
> occurs.
> Check your SQL Server logs and Event logs (on client and server) to see if
> there in any information or event that corresponds to the timing of your
> disconnections.
> Use the MDAC component check to show the version and if you have a
> consistent installation.
> HTH
> John
>
> "Scott McDonald" wrote:
>|||Hi
You may also want to switch protocols and check out the network in
general for possible problems.
John
Scott McDonald wrote:
> it's SQL 2000 on Windows 2003 and using Access 2003 - sorry . MDAC is
[vbcol=seagreen]
> newest, which I think is x.7 or something...
>
> "John Bell" <JohnBell@.discussions.microsoft.com> wrote in message
> news:2B4BF663-A19B-4E40-B44A-D9684B757E4B@.microsoft.com...
using![vbcol=seagreen]
few[vbcol=seagreen]
the[vbcol=seagreen]
when[vbcol=seagreen]
see if[vbcol=seagreen]
your[vbcol=seagreen]
front end[vbcol=seagreen]
to exit[vbcol=seagreen]
programmer[vbcol=seagreen]
it's like[vbcol=seagreen]

Communications link failure #0

We are intermittently getting this error on our SQL server. The front end is
access and this happens every so often causing the users to have to exit out
of access and reconnect. I'm by no means a SQL expert, and our programmer
who manages this database isn't sure what it is either, he says it's like
the server is just "forgetting his password" and dumping the ODBC
connection...
Any ideas/help would be appreciated.
Thanks!
Scott
Hi
You don't give what version of MDAC or SQL Server that you are using!
http://www.aspfaq.com/show.asp?id=2160
http://msdn.microsoft.com/data/mdac/default.aspx
Searching Google for "Communications link failure" turns up quite a few
things, it seemed to be quite common with SQL Server 6.5!
You may want to check that you don't have connection pooling.
Try logging the ODBC commands (on the client) and using Profiler on the
server to pin point if there is one particular set of circumstances when it
occurs.
Check your SQL Server logs and Event logs (on client and server) to see if
there in any information or event that corresponds to the timing of your
disconnections.
Use the MDAC component check to show the version and if you have a
consistent installation.
HTH
John
"Scott McDonald" wrote:

> We are intermittently getting this error on our SQL server. The front end is
> access and this happens every so often causing the users to have to exit out
> of access and reconnect. I'm by no means a SQL expert, and our programmer
> who manages this database isn't sure what it is either, he says it's like
> the server is just "forgetting his password" and dumping the ODBC
> connection...
> Any ideas/help would be appreciated.
> Thanks!
> Scott
>
>
|||it's SQL 2000 on Windows 2003 and using Access 2003 - sorry . MDAC is
newest, which I think is x.7 or something...
"John Bell" <JohnBell@.discussions.microsoft.com> wrote in message
news:2B4BF663-A19B-4E40-B44A-D9684B757E4B@.microsoft.com...[vbcol=seagreen]
> Hi
> You don't give what version of MDAC or SQL Server that you are using!
> http://www.aspfaq.com/show.asp?id=2160
> http://msdn.microsoft.com/data/mdac/default.aspx
> Searching Google for "Communications link failure" turns up quite a few
> things, it seemed to be quite common with SQL Server 6.5!
> You may want to check that you don't have connection pooling.
> Try logging the ODBC commands (on the client) and using Profiler on the
> server to pin point if there is one particular set of circumstances when
> it
> occurs.
> Check your SQL Server logs and Event logs (on client and server) to see if
> there in any information or event that corresponds to the timing of your
> disconnections.
> Use the MDAC component check to show the version and if you have a
> consistent installation.
> HTH
> John
>
> "Scott McDonald" wrote:
|||Hi
You may also want to switch protocols and check out the network in
general for possible problems.
John
Scott McDonald wrote:
> it's SQL 2000 on Windows 2003 and using Access 2003 - sorry . MDAC is
[vbcol=seagreen]
> newest, which I think is x.7 or something...
>
> "John Bell" <JohnBell@.discussions.microsoft.com> wrote in message
> news:2B4BF663-A19B-4E40-B44A-D9684B757E4B@.microsoft.com...
using![vbcol=seagreen]
few[vbcol=seagreen]
the[vbcol=seagreen]
when[vbcol=seagreen]
see if[vbcol=seagreen]
your[vbcol=seagreen]
front end[vbcol=seagreen]
to exit[vbcol=seagreen]
programmer[vbcol=seagreen]
it's like[vbcol=seagreen]

Communications link failure #0

We are intermittently getting this error on our SQL server. The front end is
access and this happens every so often causing the users to have to exit out
of access and reconnect. I'm by no means a SQL expert, and our programmer
who manages this database isn't sure what it is either, he says it's like
the server is just "forgetting his password" and dumping the ODBC
connection...
Any ideas/help would be appreciated.
Thanks!
Scott
Hi
You don't give what version of MDAC or SQL Server that you are using!
http://www.aspfaq.com/show.asp?id=2160
http://msdn.microsoft.com/data/mdac/default.aspx
Searching Google for "Communications link failure" turns up quite a few
things, it seemed to be quite common with SQL Server 6.5!
You may want to check that you don't have connection pooling.
Try logging the ODBC commands (on the client) and using Profiler on the
server to pin point if there is one particular set of circumstances when it
occurs.
Check your SQL Server logs and Event logs (on client and server) to see if
there in any information or event that corresponds to the timing of your
disconnections.
Use the MDAC component check to show the version and if you have a
consistent installation.
HTH
John
"Scott McDonald" wrote:

> We are intermittently getting this error on our SQL server. The front end is
> access and this happens every so often causing the users to have to exit out
> of access and reconnect. I'm by no means a SQL expert, and our programmer
> who manages this database isn't sure what it is either, he says it's like
> the server is just "forgetting his password" and dumping the ODBC
> connection...
> Any ideas/help would be appreciated.
> Thanks!
> Scott
>
>
|||it's SQL 2000 on Windows 2003 and using Access 2003 - sorry . MDAC is
newest, which I think is x.7 or something...
"John Bell" <JohnBell@.discussions.microsoft.com> wrote in message
news:2B4BF663-A19B-4E40-B44A-D9684B757E4B@.microsoft.com...[vbcol=seagreen]
> Hi
> You don't give what version of MDAC or SQL Server that you are using!
> http://www.aspfaq.com/show.asp?id=2160
> http://msdn.microsoft.com/data/mdac/default.aspx
> Searching Google for "Communications link failure" turns up quite a few
> things, it seemed to be quite common with SQL Server 6.5!
> You may want to check that you don't have connection pooling.
> Try logging the ODBC commands (on the client) and using Profiler on the
> server to pin point if there is one particular set of circumstances when
> it
> occurs.
> Check your SQL Server logs and Event logs (on client and server) to see if
> there in any information or event that corresponds to the timing of your
> disconnections.
> Use the MDAC component check to show the version and if you have a
> consistent installation.
> HTH
> John
>
> "Scott McDonald" wrote:
|||Hi
You may also want to switch protocols and check out the network in
general for possible problems.
John
Scott McDonald wrote:
> it's SQL 2000 on Windows 2003 and using Access 2003 - sorry . MDAC is
[vbcol=seagreen]
> newest, which I think is x.7 or something...
>
> "John Bell" <JohnBell@.discussions.microsoft.com> wrote in message
> news:2B4BF663-A19B-4E40-B44A-D9684B757E4B@.microsoft.com...
using![vbcol=seagreen]
few[vbcol=seagreen]
the[vbcol=seagreen]
when[vbcol=seagreen]
see if[vbcol=seagreen]
your[vbcol=seagreen]
front end[vbcol=seagreen]
to exit[vbcol=seagreen]
programmer[vbcol=seagreen]
it's like[vbcol=seagreen]

Communications link failure #0

We are intermittently getting this error on our SQL server. The front end is
access and this happens every so often causing the users to have to exit out
of access and reconnect. I'm by no means a SQL expert, and our programmer
who manages this database isn't sure what it is either, he says it's like
the server is just "forgetting his password" and dumping the ODBC
connection...
Any ideas/help would be appreciated.
Thanks!
ScottHi
You don't give what version of MDAC or SQL Server that you are using!
http://www.aspfaq.com/show.asp?id=2160
http://msdn.microsoft.com/data/mdac/default.aspx
Searching Google for "Communications link failure" turns up quite a few
things, it seemed to be quite common with SQL Server 6.5!
You may want to check that you don't have connection pooling.
Try logging the ODBC commands (on the client) and using Profiler on the
server to pin point if there is one particular set of circumstances when it
occurs.
Check your SQL Server logs and Event logs (on client and server) to see if
there in any information or event that corresponds to the timing of your
disconnections.
Use the MDAC component check to show the version and if you have a
consistent installation.
HTH
John
"Scott McDonald" wrote:
> We are intermittently getting this error on our SQL server. The front end is
> access and this happens every so often causing the users to have to exit out
> of access and reconnect. I'm by no means a SQL expert, and our programmer
> who manages this database isn't sure what it is either, he says it's like
> the server is just "forgetting his password" and dumping the ODBC
> connection...
> Any ideas/help would be appreciated.
> Thanks!
> Scott
>
>|||it's SQL 2000 on Windows 2003 and using Access 2003 - sorry . MDAC is
newest, which I think is x.7 or something...
"John Bell" <JohnBell@.discussions.microsoft.com> wrote in message
news:2B4BF663-A19B-4E40-B44A-D9684B757E4B@.microsoft.com...
> Hi
> You don't give what version of MDAC or SQL Server that you are using!
> http://www.aspfaq.com/show.asp?id=2160
> http://msdn.microsoft.com/data/mdac/default.aspx
> Searching Google for "Communications link failure" turns up quite a few
> things, it seemed to be quite common with SQL Server 6.5!
> You may want to check that you don't have connection pooling.
> Try logging the ODBC commands (on the client) and using Profiler on the
> server to pin point if there is one particular set of circumstances when
> it
> occurs.
> Check your SQL Server logs and Event logs (on client and server) to see if
> there in any information or event that corresponds to the timing of your
> disconnections.
> Use the MDAC component check to show the version and if you have a
> consistent installation.
> HTH
> John
>
> "Scott McDonald" wrote:
>> We are intermittently getting this error on our SQL server. The front end
>> is
>> access and this happens every so often causing the users to have to exit
>> out
>> of access and reconnect. I'm by no means a SQL expert, and our programmer
>> who manages this database isn't sure what it is either, he says it's like
>> the server is just "forgetting his password" and dumping the ODBC
>> connection...
>> Any ideas/help would be appreciated.
>> Thanks!
>> Scott
>>|||Hi
You may also want to switch protocols and check out the network in
general for possible problems.
John
Scott McDonald wrote:
> it's SQL 2000 on Windows 2003 and using Access 2003 - sorry . MDAC is
> newest, which I think is x.7 or something...
>
> "John Bell" <JohnBell@.discussions.microsoft.com> wrote in message
> news:2B4BF663-A19B-4E40-B44A-D9684B757E4B@.microsoft.com...
> > Hi
> >
> > You don't give what version of MDAC or SQL Server that you are
using!
> > http://www.aspfaq.com/show.asp?id=2160
> > http://msdn.microsoft.com/data/mdac/default.aspx
> >
> > Searching Google for "Communications link failure" turns up quite a
few
> > things, it seemed to be quite common with SQL Server 6.5!
> >
> > You may want to check that you don't have connection pooling.
> >
> > Try logging the ODBC commands (on the client) and using Profiler on
the
> > server to pin point if there is one particular set of circumstances
when
> > it
> > occurs.
> >
> > Check your SQL Server logs and Event logs (on client and server) to
see if
> > there in any information or event that corresponds to the timing of
your
> > disconnections.
> >
> > Use the MDAC component check to show the version and if you have a
> > consistent installation.
> >
> > HTH
> >
> > John
> >
> >
> > "Scott McDonald" wrote:
> >
> >> We are intermittently getting this error on our SQL server. The
front end
> >> is
> >> access and this happens every so often causing the users to have
to exit
> >> out
> >> of access and reconnect. I'm by no means a SQL expert, and our
programmer
> >> who manages this database isn't sure what it is either, he says
it's like
> >> the server is just "forgetting his password" and dumping the ODBC
> >> connection...
> >>
> >> Any ideas/help would be appreciated.
> >>
> >> Thanks!
> >>
> >> Scott
> >>
> >>
> >>

Communication link failure.

What could cause the Microsoft error listed below?
[Microsoft][ODBC SQL Server Driver]Communication link failure.
Thanks,Hi
Loosing connectivity to the server.
In what scenario does this occur?
Normally, network connectivity problems between a server and a client are
caused by faulty network cards, cables and switches. Also check that your
network drivers are up to date.
Regards
Mike
"Joe K." wrote:
> What could cause the Microsoft error listed below?
> [Microsoft][ODBC SQL Server Driver]Communication link failure.
> Thanks,

Communication link failure.

What could cause the Microsoft error listed below?
[Microsoft][ODBC SQL Server Driver]Communication link failure.
Thanks,
Hi
Loosing connectivity to the server.
In what scenario does this occur?
Normally, network connectivity problems between a server and a client are
caused by faulty network cards, cables and switches. Also check that your
network drivers are up to date.
Regards
Mike
"Joe K." wrote:

> What could cause the Microsoft error listed below?
> [Microsoft][ODBC SQL Server Driver]Communication link failure.
> Thanks,

Communication link failure.

What could cause the Microsoft error listed below?
[Microsoft][ODBC SQL Server Driver]Communication link failure.
Thanks,Hi
Loosing connectivity to the server.
In what scenario does this occur?
Normally, network connectivity problems between a server and a client are
caused by faulty network cards, cables and switches. Also check that your
network drivers are up to date.
Regards
Mike
"Joe K." wrote:

> What could cause the Microsoft error listed below?
> [Microsoft][ODBC SQL Server Driver]Communication link failure.
> Thanks,

Communication Link Failure Error

Hi,

I am using ADO in my application to connect and retrieve data from Microsoft SQL Server 2000 SP4. When I start my application, it establishes connection to the server successfully and I am able to retrieve data from the server. here is my test scenario:

1. unplug the network cable from the client machine and put the cable back in after some time. I disconnect from the database in my code when the client machine disconnects from the network

2. Once the client machine comes back on the network, I try to reconnect and retrieve data from the sql server but I get the following error message when I try to execute a sql command:

[Microsoft][ODBC SQL Server Driver]Communication Link failure

This problem occurs only with Window XP SP2. With XP SP1 it works fine. It seems to be problem on the client side as with Windows XP SP1 I do not get this error message at all.

Here are the various details:

1. The firewall is off on the client workstation.

2. the connection string is:

driver={SQL Server};server=AA;uid=BB;pwd=CC;database=DD

where AA = DNS name of server machine where sql server is running.

BB = user name

CC = password

DD= database name

3. The client is remote to the server.

4. I can ping the server machine when the client machine reconnects to the network.

5. I can still telnet the server when the client machine reconnects to the network.

6. client database provider is MDAC odbc.

7. the client and server machines are in the same domain.

8. Shared memory and TCPIP protocols are enabled and TCP is at the top of the list.

9. No alias is being used.

10. Viris scan is not installed.

11. force encriptioned is NOT checked.

Please reply.

It appears a connection pooling issue. The closed connections by the client app are returned to the pool and become invalid after you unplug the cable. Next time you try to connect, odbc reuse the invalid connectin and throw the error. Retry your connection or disable pooling should resolve your issue.|||

I am already doing this:

1. When the machine disconnects from the network, I close the database connection. when the machine reconnects to the network, I try to establish a new connection to the database.

2. The connection pooling is also disabled for SQL server odbc driver under Connection Pooling tab of ODBC Data Source Administrator.

Please reply.

|||

Good day,

Tahir posted this request in Oct this year, has there been any response yet?

We are experiencing exactely the same problem in completely different ODBC client and are desperately looking for a way around this.

regards

|||

I eventually managed to find a way around it. Here are the changes which I made to my code:

1. Changed the connection steing to use native OLE DB as follows:

Provider=sqloledb;Data Source=AAA;Initial Catalog=BBB;User Id=CCC;Password=DDD

where AAA = SQL Server name

BBB = database name

CCC = login user name

DDD= password

2. I declare a list which holds pending SQL request.

3. hook up ADO connection object's Connectioncomplete and Disconnection events.

4. when execution of a SQL query failes, an exception is raisedcatch this exception. check the list of pending requests. if it is empty then add this failed request into the list and disconnect from the database. (this will force to disconnect from an invalid connection if there is any). Do not attempt to disconnect from the database if there is already a pending request in the list.

5. I have a separate thread which attempts to connect to the database. once I have got connection to the database, i suspend that thread.

6. in disconnection event handler, I check if there is an error while I tried to disconnect from the database. If there is NO error then I resume the thread which attempts to connect to the database.

7. in connection event handler, I check if there is an error while I tried to connect to the database. If there is NO error then I start a timer which checks pending request list and if there is any pending request, send it to the SQL server and then empty the list.

Regards,

Tahir Sultan

|||

Tahir thanks for the response.

We still have a problem because we can only use ODBC?

regards

Amanda

|||

Can catch the error and retry the connection be one of your option?

Otherwise, please post your code here and we can try to repro it.

HTH

|||

At the moment we are diconneting and then re-connecting, but even this is not solving the problem. We need to stop the application to get rid of the error. This is only the case for the communication link failure error with all other errors diconnecting and re-connecting works fine.

regards

|||

I had the same problem when I was using ODBC. Even disconnecting and reconnecting did not work at all. I tried all possible ODBC driver configuration but none of them seemed to make any difference. But moving to native OLE DB driver solved the problem.

Tahir Sultan

|||We have a situation common to laptops. I'm convinced that it is the result of some power management setting (hibernate, hard drive shutdown, or standby), but can never log it to pinpoint it exactly. Any suggestions?

Communication Link Failure Error

Hi,

I am using ADO in my application to connect and retrieve data from Microsoft SQL Server 2000 SP4. When I start my application, it establishes connection to the server successfully and I am able to retrieve data from the server. here is my test scenario:

1. unplug the network cable from the client machine and put the cable back in after some time. I disconnect from the database in my code when the client machine disconnects from the network

2. Once the client machine comes back on the network, I try to reconnect and retrieve data from the sql server but I get the following error message when I try to execute a sql command:

[Microsoft][ODBC SQL Server Driver]Communication Link failure

This problem occurs only with Window XP SP2. With XP SP1 it works fine. It seems to be problem on the client side as with Windows XP SP1 I do not get this error message at all.

Here are the various details:

1. The firewall is off on the client workstation.

2. the connection string is:

driver={SQL Server};server=AA;uid=BB;pwd=CC;database=DD

where AA = DNS name of server machine where sql server is running.

BB = user name

CC = password

DD= database name

3. The client is remote to the server.

4. I can ping the server machine when the client machine reconnects to the network.

5. I can still telnet the server when the client machine reconnects to the network.

6. client database provider is MDAC odbc.

7. the client and server machines are in the same domain.

8. Shared memory and TCPIP protocols are enabled and TCP is at the top of the list.

9. No alias is being used.

10. Viris scan is not installed.

11. force encriptioned is NOT checked.

Please reply.

It appears a connection pooling issue. The closed connections by the client app are returned to the pool and become invalid after you unplug the cable. Next time you try to connect, odbc reuse the invalid connectin and throw the error. Retry your connection or disable pooling should resolve your issue.|||

I am already doing this:

1. When the machine disconnects from the network, I close the database connection. when the machine reconnects to the network, I try to establish a new connection to the database.

2. The connection pooling is also disabled for SQL server odbc driver under Connection Pooling tab of ODBC Data Source Administrator.

Please reply.

|||

Good day,

Tahir posted this request in Oct this year, has there been any response yet?

We are experiencing exactely the same problem in completely different ODBC client and are desperately looking for a way around this.

regards

|||

I eventually managed to find a way around it. Here are the changes which I made to my code:

1. Changed the connection steing to use native OLE DB as follows:

Provider=sqloledb;Data Source=AAA;Initial Catalog=BBB;User Id=CCC;Password=DDD

where AAA = SQL Server name

BBB = database name

CCC = login user name

DDD= password

2. I declare a list which holds pending SQL request.

3. hook up ADO connection object's Connectioncomplete and Disconnection events.

4. when execution of a SQL query failes, an exception is raisedcatch this exception. check the list of pending requests. if it is empty then add this failed request into the list and disconnect from the database. (this will force to disconnect from an invalid connection if there is any). Do not attempt to disconnect from the database if there is already a pending request in the list.

5. I have a separate thread which attempts to connect to the database. once I have got connection to the database, i suspend that thread.

6. in disconnection event handler, I check if there is an error while I tried to disconnect from the database. If there is NO error then I resume the thread which attempts to connect to the database.

7. in connection event handler, I check if there is an error while I tried to connect to the database. If there is NO error then I start a timer which checks pending request list and if there is any pending request, send it to the SQL server and then empty the list.

Regards,

Tahir Sultan

|||

Tahir thanks for the response.

We still have a problem because we can only use ODBC?

regards

Amanda

|||

Can catch the error and retry the connection be one of your option?

Otherwise, please post your code here and we can try to repro it.

HTH

|||

At the moment we are diconneting and then re-connecting, but even this is not solving the problem. We need to stop the application to get rid of the error. This is only the case for the communication link failure error with all other errors diconnecting and re-connecting works fine.

regards

|||

I had the same problem when I was using ODBC. Even disconnecting and reconnecting did not work at all. I tried all possible ODBC driver configuration but none of them seemed to make any difference. But moving to native OLE DB driver solved the problem.

Tahir Sultan

|||We have a situation common to laptops. I'm convinced that it is the result of some power management setting (hibernate, hard drive shutdown, or standby), but can never log it to pinpoint it exactly. Any suggestions?

Communication Link Failure Error

Hi,

I am using ADO in my application to connect and retrieve data from Microsoft SQL Server 2000 SP4. When I start my application, it establishes connection to the server successfully and I am able to retrieve data from the server. here is my test scenario:

1. unplug the network cable from the client machine and put the cable back in after some time. I disconnect from the database in my code when the client machine disconnects from the network

2. Once the client machine comes back on the network, I try to reconnect and retrieve data from the sql server but I get the following error message when I try to execute a sql command:

[Microsoft][ODBC SQL Server Driver]Communication Link failure

This problem occurs only with Window XP SP2. With XP SP1 it works fine. It seems to be problem on the client side as with Windows XP SP1 I do not get this error message at all.

Here are the various details:

1. The firewall is off on the client workstation.

2. the connection string is:

driver={SQL Server};server=AA;uid=BB;pwd=CC;database=DD

where AA = DNS name of server machine where sql server is running.

BB = user name

CC = password

DD= database name

3. The client is remote to the server.

4. I can ping the server machine when the client machine reconnects to the network.

5. I can still telnet the server when the client machine reconnects to the network.

6. client database provider is MDAC odbc.

7. the client and server machines are in the same domain.

8. Shared memory and TCPIP protocols are enabled and TCP is at the top of the list.

9. No alias is being used.

10. Viris scan is not installed.

11. force encriptioned is NOT checked.

Please reply.

It appears a connection pooling issue. The closed connections by the client app are returned to the pool and become invalid after you unplug the cable. Next time you try to connect, odbc reuse the invalid connectin and throw the error. Retry your connection or disable pooling should resolve your issue.|||

I am already doing this:

1. When the machine disconnects from the network, I close the database connection. when the machine reconnects to the network, I try to establish a new connection to the database.

2. The connection pooling is also disabled for SQL server odbc driver under Connection Pooling tab of ODBC Data Source Administrator.

Please reply.

|||

Good day,

Tahir posted this request in Oct this year, has there been any response yet?

We are experiencing exactely the same problem in completely different ODBC client and are desperately looking for a way around this.

regards

|||

I eventually managed to find a way around it. Here are the changes which I made to my code:

1. Changed the connection steing to use native OLE DB as follows:

Provider=sqloledb;Data Source=AAA;Initial Catalog=BBB;User Id=CCC;Password=DDD

where AAA = SQL Server name

BBB = database name

CCC = login user name

DDD= password

2. I declare a list which holds pending SQL request.

3. hook up ADO connection object's Connectioncomplete and Disconnection events.

4. when execution of a SQL query failes, an exception is raisedcatch this exception. check the list of pending requests. if it is empty then add this failed request into the list and disconnect from the database. (this will force to disconnect from an invalid connection if there is any). Do not attempt to disconnect from the database if there is already a pending request in the list.

5. I have a separate thread which attempts to connect to the database. once I have got connection to the database, i suspend that thread.

6. in disconnection event handler, I check if there is an error while I tried to disconnect from the database. If there is NO error then I resume the thread which attempts to connect to the database.

7. in connection event handler, I check if there is an error while I tried to connect to the database. If there is NO error then I start a timer which checks pending request list and if there is any pending request, send it to the SQL server and then empty the list.

Regards,

Tahir Sultan

|||

Tahir thanks for the response.

We still have a problem because we can only use ODBC?

regards

Amanda

|||

Can catch the error and retry the connection be one of your option?

Otherwise, please post your code here and we can try to repro it.

HTH

|||

At the moment we are diconneting and then re-connecting, but even this is not solving the problem. We need to stop the application to get rid of the error. This is only the case for the communication link failure error with all other errors diconnecting and re-connecting works fine.

regards

|||

I had the same problem when I was using ODBC. Even disconnecting and reconnecting did not work at all. I tried all possible ODBC driver configuration but none of them seemed to make any difference. But moving to native OLE DB driver solved the problem.

Tahir Sultan

|||We have a situation common to laptops. I'm convinced that it is the result of some power management setting (hibernate, hard drive shutdown, or standby), but can never log it to pinpoint it exactly. Any suggestions?

Communication Link Failure error

Hi Y'all,

When i alter 1 single value in my sql server 2000 sometimes i get following error:

1) [MICROSOFT][ODBC SQL SERVER DRIVER] Communication link failure

After clicking away:

2)CANNOT START MORE TRANSACTION ON THIS SESSION

Maybe someone can help me out on this?

Thanks!

Hi,

First, make sure that your largest column is the last column retuned. Make sure that you do not have any columns returned after a text or an image column

Second, have you recently finished any kind of an upgrade that may have impacted the MDAC? The default connection protocol in MDAC 2.5 was Named Pipes. In 2.7, it changed the default to TCP/IP. You mentioned that you are connecting via TCP/IP, but can you verify that in EM?

Third, you may try the following article which may be helpful to you.http://support.microsoft.com/kb/316872

Hope this helps. Thanks.

Communication Link failure

Hello,
Sometimes my application accessing SQL Server via ODBC is giving an error message "Communication link failure".
The network and server looks fine, but I'am still getting it time to time.
Please recommend possible reasons and solutions.
Thanks indvance.We has some unnoticed unstable connections very difficult to find because NT retried to connect without warning (maybe just some lattency when you tried to access again a lan resource).
We checked with "ping -w5000 -t"
The problem was bad coupling male/female RJ45 connectors in some stations.

Hope this helps,
Csar.

Communication Link Failure

Why would we get a " Communication Link Failure "
I have seen " TimeOut Expired " and General Network Error and can
understand why we get those, but what about the one listed in subject
Any idea ?
Hi Hassan,
Did you ever find a solution to your problem? I had that same issue
today. I did some research and I found some FAQ that stating:
" Make sure that your largest column is the last column retuned. Make
sure that you do not have any columns returned after a text or an image
column"
I kind of don't fully understand it, but in my case.. I had some columns
will a NULL value at the end of the table. I moved them and it seemed
to fix my problem. Here's the site that I found:
http://www.15seconds.com/faq/ODBC/692.htm
Marc F.
Hassan wrote:
> Why would we get a " Communication Link Failure "
> I have seen " TimeOut Expired " and General Network Error and can
> understand why we get those, but what about the one listed in subject
> Any idea ?
>

Communication Link Failure

Thanks in advance for any help. I really appreciate it.
I am getting a strange error message when connecting to a single Sql Server
all of the sudden.
From enterprise manager the error is:
A connection could not be established to ServerName.
Reason: Communication link failure
Please verify Sql Server is running and check your Sql Server registration
properties (by right-clicking on the ServerName node) and try again.
From Query Analyzer the error is:
Unable to connect to server ServerName
ODBC: Msg 0, Level 16, State 1
[Microsoft][ODBC Sql Server Driver]Communication link failure
I am running Sql 2000 SP 3. Both my pc and the server are running Windows
2000.
If I use a different pc under the same login I am able to connect to the
server so the problem must be on my individual pc. I can also connect to
other Sql servers from the pc that is giving me problems. I have tried
uninstalling and reinstalling Sql and I get the same error message.
Does anyone have any idea as to the cause of this?Update...
I am able to register the server via IP address but not server name. When I
register by IP I get the same message that says:
SQL Server registration failed because of the connection failure displayed
below. Do you wish to Register anyway?
Communication link failure
If I click Yes I can then expand the server and view the databases as
normal. When I register by server name I get the same error message but I
still get the Communication link failure when expanding the server.
Help please!!!