Showing posts with label record. Show all posts
Showing posts with label record. Show all posts

Wednesday, March 7, 2012

Error 0x80040E31

Hi.

Somebody can tell how to deal with this error. When I try to connect from an
asp page to update a record wich has a ntext field it give me this error...

I tried with sp_configure 'remote query timeout',0 but no works...

What can I do ??
thanksDaviso (dhernande7@.alumno.uned.es) writes:

Quote:

Originally Posted by

Somebody can tell how to deal with this error. When I try to connect
from an asp page to update a record wich has a ntext field it give me
this error...
>
I tried with sp_configure 'remote query timeout',0 but no works...


Do you get any text with the error message, or just the error code?

If I am to guess from your fiddling with "remote query timeout", the
error is "Timeout Expired". "remote query timeout" is not going to help
you on that one, since that that is the time SQL Server uses when connecting
to linked servers.

Timeouts are always defined on client level, and from an ASP page, you would
set the CommandTimeout on the Connection object. Set it to 0 to wait
indefintely. By default the timeout is 30 seconds.

Another issue why your update takes more than 30 seconds. It could be a
blocking issue, and in that case it does not help if you change the timeout.
But with no information about your code and your system it's impossible to
tell.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx

Sunday, February 26, 2012

Error (8626) while inserting record into table with text field and which is the base for i

I have a problem with inserting records into table when an indexed view
is based on it.
Table has text field (without it there is no problem, but I need it).
Here is a sample code:

USE test
GO

CREATE TABLE dbo.aTable (
[id] INT NOT NULL
, [text] TEXT NOT NULL
)
GO

CREATE VIEW dbo.aView
WITH SCHEMABINDING AS
SELECT [id]
, CAST([text] AS VARCHAR(8000)) [text]
FROM dbo.aTable
GO

CREATE TRIGGER dbo.aTrigger ON dbo.aView INSTEAD OF INSERT
AS
BEGIN
INSERT INTO aTable
SELECT [id], [text]
FROM inserted
END
GO

Do the insert into aTable (also through aView).

INSERT INTO dbo.aTable VALUES (1, 'a')
INSERT INTO dbo.aView VALUES (2, 'b')

Still do not have any problem. But when I need index on view

CREATE UNIQUE CLUSTERED INDEX [id] ON dbo.aView ([id])
GO

I get following error while inserting record into aTable:

-- Server: Msg 8626, Level 16, State 1, Procedure aTrigger, Line 4
-- Only text pointers are allowed in work tables, never text, ntext, or
image columns. The query processor produced a query plan that required
a text, ntext, or image column in a work table.

Does anyone know what causes the error?ing42 (Inga.Korczowska@.gmail.com) writes:
> Do the insert into aTable (also through aView).
> INSERT INTO dbo.aTable VALUES (1, 'a')
> INSERT INTO dbo.aView VALUES (2, 'b')
> Still do not have any problem. But when I need index on view
> CREATE UNIQUE CLUSTERED INDEX [id] ON dbo.aView ([id])
> GO
> I get following error while inserting record into aTable:
> -- Server: Msg 8626, Level 16, State 1, Procedure aTrigger, Line 4
> -- Only text pointers are allowed in work tables, never text, ntext, or
> image columns. The query processor produced a query plan that required
> a text, ntext, or image column in a work table.
> Does anyone know what causes the error?

Did you notice the warning when you created the index:

Warning: The optimizer cannot use the index because the select list of
the view contains a non-aggregate expression.

So the index is not of much use. I guess you have hit a restriction
in SQL Server, which does not report as such in a nice way. When I
run your code in SQL 2005, I get:

Msg 1942, Level 16, State 1, Line 1
Cannot create index on view 'tempdb.dbo.aView'. It contains text, ntext,
image or xml columns.

Which is a more resolute message.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx

Friday, February 24, 2012

Error "Lock Request Time Out" when deleting a record

Hi all,
I'm trying to delete one record from application but I get an Error :
"Lock request time out periode exceeded (37000) was experienced when
deleting a record from dbo.fe9srjh".
I'm using SQL Server 2000 SP3. What should I do ? Thank's a lot ..
rgds,
yuliusSomeone has a conflicting lock which cases your LOCK_TIMEOUT setting (set by
the programmer of your
client application) to time out. Use sp_who, sp_who2, sp_lock, Current Activ
ity in EM to find out
who is locking the resource. When you find that person, talk to the vendor o
f the application that
the person is using and have them figure out why the long lived lock.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Yulius Sutanto" <ysutanto@.atlas-sp.com> wrote in message
news:1130208619.276385.284300@.f14g2000cwb.googlegroups.com...
> Hi all,
> I'm trying to delete one record from application but I get an Error :
> "Lock request time out periode exceeded (37000) was experienced when
> deleting a record from dbo.fe9srjh".
> I'm using SQL Server 2000 SP3. What should I do ? Thank's a lot ..
> rgds,
> yulius
>

Sunday, February 19, 2012

Error - Record has been changed by another user

I apologize in advance if this has been posted but if you get the attached error "The record has been changed by another user...", we've discovered that this error can occur if you have a SQL Server Data Type of "Float" and also a "Text" Data Type in the same table. We discovered that it only happens on some records though and I am not sure why this is so. The solution is apparently to add a TimeStamp Data Type to the SQL Server table which does seem to fix the problem. If anyone has any insight on any other solutions (we cannot change the Data Types) or the reasoning behind this error, I would greatly appreciate the feedback.Where exactly does the error come from. I assume the Access Side?|||Yes, it's from the Access side (and on the linked table itself) and I'm assuming it might have something to do with ODBC and when the record is updated somehow but I haven't been able to pinpoint any rhyme or reason. The frustating part is that there is no consistency on when it happens (i.e. every time the floating number is XXXX or has XXXX number after the decimal, or the record is edited, etc.)

I do know though that (in the case on 1 of the tables I have this problem on) that I can 0 out the floating number and the Text field will then work ok and (on this table) it's has -99.23443 numbers (from a geocoding process) in the floating field, but again, no rhyme or reason or on any specific number. It just randomly occurs on certain records (about 2 dozen on 2000 records).

No problem though editing the Text field in SQL Server itself.

Like I mentioned, the timestamp field in SQL Server seems to be the solution but I had one of our consultants investigate it thoroughly on the web and make some calls to Microsoft and he was unable to come up with any reasoning behind it.|||I'm assuming that this is an mdb and not an access data project.

Try and minic the problem with an adp...betcha it doesn't happen.

Linked tables are a pain...do you open all of the records to a table, or do you allow them to be selected by criteria...

I would recommend unbound everything|||Bound verses unbound doesn't matter (even though we use unbound). Neither does opening all the records verses opening just that record. Yes it is an mdb and you're probably right in that it wouldn't happen on an ADP but at this time that's not an option.

My guess is that it's something with ODBC but no one's been able to answer yet on why this occurs.

In regards to linked tables though, we've had great success in utilizing linked tables and haven't found them to be a pain. It gives us the flexibility of utilizing Access queries with code (and have users which like to create their own queries) which is something that couldn't be done not using linked tables. But optimally, not using linked tables would be nice but again, not an option for us.

Error - procedure expects parameter, which was not supplied

Hi,

I created a stored procedure in the sql server. I try to insert a record from the aspx page. But I keep getting this error,
"procedure expects parameter <@.firstname>, which was not supplied". This is what I am doing.

cmd.CommandText = "proc_insertuser";
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add("@.firstname", SqlDbType.VarChar, 50);
cmd.Parameters["@.firstname"].Value = txtFirstName.Text
...other parameters

I checked the parameter names, it matches correctly. The parameter does get added to the collection. I checked it using cmd.Parameters.Contains("@.firstname") and the value is also correct. Using query analyzer I executed the procedure, I am able to insert a record.

Can anyone tell me what could be the problem.
TAICan you use SQL Profiler? Perhaps that will help diagnose the problem. Is there some other parameter that is missing and being mis-reported?|||if you are using VB.NET I would try replacing your brackets surrounding your parameter name w/ parenthesis instead.

 cmd.Parameters("@.firstname").Value = txtFirstName.Text

HTH

Sandy