Monday, March 19, 2012
an interesting problem
'news' in a table 'news' storing huge HTML formatted artciles. I had to
replace a particular word 'india' by 'world' in all the records under this
column. Strange thing is the occurances of the word 'india' towards the end
of the articles are getting recognized by
select count(*) from news where charindex('india',news)>0
i.e. the above query results 0. Though there are thousands of records in
the column 'news' containing the word 'india'.
I think the issue is of max limit of charindex.
Please help at the earliest convenience of yours.
Regards,
John-I think the issue is of max limit of charindex.
No I don=B4t think so, because Charindex returns an INT, so there should
be a problem if the character would be found at the
2,147,483,648 +1. So are you searching on the right table and database
? That should return a hit, if the word india is present in there.
HTH, jens Suessmeyer.|||John
Did you try LIKE operator?
"John" <netconsul@.gmail.com> wrote in message
news:ePx4t626FHA.1140@.tk2msftngp13.phx.gbl...
>I manage a news database oriented website where there is a column named
>'news' in a table 'news' storing huge HTML formatted artciles. I had to
>replace a particular word 'india' by 'world' in all the records under this
>column. Strange thing is the occurances of the word 'india' towards the end
>of the articles are getting recognized by
> select count(*) from news where charindex('india',news)>0
>
> i.e. the above query results 0. Though there are thousands of records in
> the column 'news' containing the word 'india'.
> I think the issue is of max limit of charindex.
> Please help at the earliest convenience of yours.
> Regards,
> John
>
>
>|||Thats what my problem is.
select news from news where news like '%india%'
results in 74000+ records while
select count(*) from news where charindex('india',news)>0
returns none.
I am using charindex to find the position of India in the record and use
'updatetext' to replace it by world.
because charindex('india',news) returns 0, updatetext cant replace india in
each record by world.
Any quick help will be appreciated.
"Jens" <Jens@.sqlserver2005.de> wrote in message
news:1132230042.794270.99970@.g43g2000cwa.googlegroups.com...
-I think the issue is of max limit of charindex.
No I don´t think so, because Charindex returns an INT, so there should
be a problem if the character would be found at the
2,147,483,648 +1. So are you searching on the right table and database
? That should return a hit, if the word india is present in there.
HTH, jens Suessmeyer.|||Hi Everyone,
Solution to my problem lies here.
http://www.aspfaq.com/show.asp?id=2445
Please note that my fear about charindex is correct.
Initially I used CHARINDEX, but that failed if the pattern was deeper than
8,000 characters into the value. PATINDEX never dies. :-)
Thanks
John
"John" <netconsul@.gmail.com> wrote in message
news:eT7LVE66FHA.4076@.TK2MSFTNGP10.phx.gbl...
> Thats what my problem is.
> select news from news where news like '%india%'
> results in 74000+ records while
> select count(*) from news where charindex('india',news)>0
>
> returns none.
> I am using charindex to find the position of India in the record and use
> 'updatetext' to replace it by world.
> because charindex('india',news) returns 0, updatetext cant replace india
> in each record by world.
>
> Any quick help will be appreciated.
>
>
> "Jens" <Jens@.sqlserver2005.de> wrote in message
> news:1132230042.794270.99970@.g43g2000cwa.googlegroups.com...
> -I think the issue is of max limit of charindex.
> No I don´t think so, because Charindex returns an INT, so there should
> be a problem if the character would be found at the
> 2,147,483,648 +1. So are you searching on the right table and database
> ? That should return a hit, if the word india is present in there.
> HTH, jens Suessmeyer.
>
an interesting problem
'news' in a table 'news' storing huge HTML formatted artciles. I had to
replace a particular word 'india' by 'world' in all the records under this
column. Strange thing is the occurances of the word 'india' towards the end
of the articles are getting recognized by
select count(*) from news where charindex('india',news)>0
i.e. the above query results 0. Though there are thousands of records in
the column 'news' containing the word 'india'.
I think the issue is of max limit of charindex.
Please help at the earliest convenience of yours.
Regards,
John
-I think the issue is of max limit of charindex.
No I don=B4t think so, because Charindex returns an INT, so there should
be a problem if the character would be found at the
2,147,483,648 +1. So are you searching on the right table and database
? That should return a hit, if the word india is present in there.
HTH, jens Suessmeyer.
|||John
Did you try LIKE operator?
"John" <netconsul@.gmail.com> wrote in message
news:ePx4t626FHA.1140@.tk2msftngp13.phx.gbl...
>I manage a news database oriented website where there is a column named
>'news' in a table 'news' storing huge HTML formatted artciles. I had to
>replace a particular word 'india' by 'world' in all the records under this
>column. Strange thing is the occurances of the word 'india' towards the end
>of the articles are getting recognized by
> select count(*) from news where charindex('india',news)>0
>
> i.e. the above query results 0. Though there are thousands of records in
> the column 'news' containing the word 'india'.
> I think the issue is of max limit of charindex.
> Please help at the earliest convenience of yours.
> Regards,
> John
>
>
>
|||Thats what my problem is.
select news from news where news like '%india%'
results in 74000+ records while
select count(*) from news where charindex('india',news)>0
returns none.
I am using charindex to find the position of India in the record and use
'updatetext' to replace it by world.
because charindex('india',news) returns 0, updatetext cant replace india in
each record by world.
Any quick help will be appreciated.
"Jens" <Jens@.sqlserver2005.de> wrote in message
news:1132230042.794270.99970@.g43g2000cwa.googlegro ups.com...
-I think the issue is of max limit of charindex.
No I dont think so, because Charindex returns an INT, so there should
be a problem if the character would be found at the
2,147,483,648 +1. So are you searching on the right table and database
? That should return a hit, if the word india is present in there.
HTH, jens Suessmeyer.
|||Hi Everyone,
Solution to my problem lies here.
http://www.aspfaq.com/show.asp?id=2445
Please note that my fear about charindex is correct.
Initially I used CHARINDEX, but that failed if the pattern was deeper than
8,000 characters into the value. PATINDEX never dies. :-)
Thanks
John
"John" <netconsul@.gmail.com> wrote in message
news:eT7LVE66FHA.4076@.TK2MSFTNGP10.phx.gbl...
> Thats what my problem is.
> select news from news where news like '%india%'
> results in 74000+ records while
> select count(*) from news where charindex('india',news)>0
>
> returns none.
> I am using charindex to find the position of India in the record and use
> 'updatetext' to replace it by world.
> because charindex('india',news) returns 0, updatetext cant replace india
> in each record by world.
>
> Any quick help will be appreciated.
>
>
> "Jens" <Jens@.sqlserver2005.de> wrote in message
> news:1132230042.794270.99970@.g43g2000cwa.googlegro ups.com...
> -I think the issue is of max limit of charindex.
> No I dont think so, because Charindex returns an INT, so there should
> be a problem if the character would be found at the
> 2,147,483,648 +1. So are you searching on the right table and database
> ? That should return a hit, if the word india is present in there.
> HTH, jens Suessmeyer.
>
an interesting problem
'news' in a table 'news' storing huge HTML formatted artciles. I had to
replace a particular word 'india' by 'world' in all the records under this
column. Strange thing is the occurances of the word 'india' towards the end
of the articles are getting recognized by
select count(*) from news where charindex('india',news)>0
i.e. the above query results 0. Though there are thousands of records in
the column 'news' containing the word 'india'.
I think the issue is of max limit of charindex.
Please help at the earliest convenience of yours.
Regards,
John-I think the issue is of max limit of charindex.
No I don=B4t think so, because Charindex returns an INT, so there should
be a problem if the character would be found at the
2,147,483,648 +1. So are you searching on the right table and database
? That should return a hit, if the word india is present in there.
HTH, jens Suessmeyer.|||John
Did you try LIKE operator?
"John" <netconsul@.gmail.com> wrote in message
news:ePx4t626FHA.1140@.tk2msftngp13.phx.gbl...
>I manage a news database oriented website where there is a column named
>'news' in a table 'news' storing huge HTML formatted artciles. I had to
>replace a particular word 'india' by 'world' in all the records under this
>column. Strange thing is the occurances of the word 'india' towards the end
>of the articles are getting recognized by
> select count(*) from news where charindex('india',news)>0
>
> i.e. the above query results 0. Though there are thousands of records in
> the column 'news' containing the word 'india'.
> I think the issue is of max limit of charindex.
> Please help at the earliest convenience of yours.
> Regards,
> John
>
>
>|||Thats what my problem is.
select news from news where news like '%india%'
results in 74000+ records while
select count(*) from news where charindex('india',news)>0
returns none.
I am using charindex to find the position of India in the record and use
'updatetext' to replace it by world.
because charindex('india',news) returns 0, updatetext cant replace india in
each record by world.
Any quick help will be appreciated.
"Jens" <Jens@.sqlserver2005.de> wrote in message
news:1132230042.794270.99970@.g43g2000cwa.googlegroups.com...
-I think the issue is of max limit of charindex.
No I dont think so, because Charindex returns an INT, so there should
be a problem if the character would be found at the
2,147,483,648 +1. So are you searching on the right table and database
? That should return a hit, if the word india is present in there.
HTH, jens Suessmeyer.|||Hi Everyone,
Solution to my problem lies here.
http://www.aspfaq.com/show.asp?id=2445
Please note that my fear about charindex is correct.
Initially I used CHARINDEX, but that failed if the pattern was deeper than
8,000 characters into the value. PATINDEX never dies. :-)
Thanks
John
"John" <netconsul@.gmail.com> wrote in message
news:eT7LVE66FHA.4076@.TK2MSFTNGP10.phx.gbl...
> Thats what my problem is.
> select news from news where news like '%india%'
> results in 74000+ records while
> select count(*) from news where charindex('india',news)>0
>
> returns none.
> I am using charindex to find the position of India in the record and use
> 'updatetext' to replace it by world.
> because charindex('india',news) returns 0, updatetext cant replace india
> in each record by world.
>
> Any quick help will be appreciated.
>
>
> "Jens" <Jens@.sqlserver2005.de> wrote in message
> news:1132230042.794270.99970@.g43g2000cwa.googlegroups.com...
> -I think the issue is of max limit of charindex.
> No I dont think so, because Charindex returns an INT, so there should
> be a problem if the character would be found at the
> 2,147,483,648 +1. So are you searching on the right table and database
> ? That should return a hit, if the word india is present in there.
> HTH, jens Suessmeyer.
>
Sunday, March 11, 2012
An existing connection was forcibly closed by the remote host
Hi,
I'm running a website using MSSQL 2000. Sometimes (not always) I get this error message on the website:
A transport-level error has occurred when sending the request to the server. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.)
I have also websites running with MySQL and those don't have this problem.
I searched google but I couldn't find usefull information on this problem.
Someone who knows what's going on here ?
All I've found untill now is that it has something to do with the server not responding within a certain time, and thus assuming the connection was closed.I can't find how I can just let it reconnect again in stead of giving me this error message?
An error occurred while established a connection
Hello
I am getting this err msg when trying to logon to my website on the web - on my machine there is no prob,
An error occurred while established a connection to the server.
When connection to Sql.S 2005, this failure may be caused by the fact that
under the default settings sql.s doesn't allow remote connection.
(provider ql.S Network interface, error:26- Error Location Server/Interface Specified)
(the files path is like in the web host s)
now this msg is related to the ASPNETDB.MDF (dont use sql.s db but this file)
thanks
Please check this blog for solutions:
http://blogs.msdn.com/sql_protocols/archive/2007/05/13/sql-network-interfaces-error-26-error-locating-server-instance-specified.aspx
|||Do you have tcp/ip enabled on the server? If you connect from the local machine, you probably won't see the problem but when connecting from a remote machine, you will need tcp/ip enabled. Here are the steps from msdn:
Enable the TCP/IP protocol in SQL Server 2005. To do this, follow these steps:
HTH