Showing posts with label written. Show all posts
Showing posts with label written. Show all posts

Monday, March 19, 2012

a strange problem with RDA

Hello,

I have written a program for WinCE with .NET. In one of the forms, program gets data from the sql server with RDA. It works fine..the users get data.one two three.....but at 16th or 17th or 18th try an error occurs:

"SQL Mobile encounteres some problems..."

What does it mean? It gets data 15 times but after that it gets error....What is the problem with that?

I'm really confused...

Thanks in advance.

I tried to free the resources like RDA object and other SQL CE objects and it worked...

Saturday, February 25, 2012

A quicker way of performing this XML query?

Hi all

I have the following query that makes up part of a table-value-function i've written in SQL 2K5.

XML Query


SELECT CONVERT(XML, objectdata).value('(/xmlData/IsTrue)[1]', 'bit') as IsTrue
from myTable
where idfield = [@.FunctionTable].ID


Until adding this query, the function ran in under 60 seconds. Adding this query has added an extra 120 seconds to the function execution time.


This query is called around 200 times in the function as part of an update:

UPDATE @.FunctionTable set ...

....

, FieldValue = (SELECT CONVERT(XML, objectdata).value('(/xmlData/IsTrue)[1]', 'bit') as IsTrue
from myTable
where idfield = [@.FunctionTable].ID)

Is there a more performant way to do the same XML lookup?

Many Thanks

Are there any XML indexes created?

WesleyB

Visit my SQL Server weblog @. http://dis4ea.blogspot.com

|||Probabaly not, would this index be placed upon the source field?
|||

You can create an index on the field where you do the XQuery.

WesleyB

Visit my SQL Server weblog @. http://dis4ea.blogspot.com

A quicker way of performing this XML query?

Hi all

I have the following query that makes up part of a table-value-function i've written in SQL 2K5.

XML Query


SELECT CONVERT(XML, objectdata).value('(/xmlData/IsTrue)[1]', 'bit') as IsTrue
from myTable
where idfield = [@.FunctionTable].ID


Until adding this query, the function ran in under 60 seconds. Adding this query has added an extra 120 seconds to the function execution time.


This query is called around 200 times in the function as part of an update:

UPDATE @.FunctionTable set ...

....

, FieldValue = (SELECT CONVERT(XML, objectdata).value('(/xmlData/IsTrue)[1]', 'bit') as IsTrue
from myTable
where idfield = [@.FunctionTable].ID)

Is there a more performant way to do the same XML lookup?

Many Thanks

Are there any XML indexes created?

WesleyB

Visit my SQL Server weblog @. http://dis4ea.blogspot.com

|||Probabaly not, would this index be placed upon the source field?
|||

You can create an index on the field where you do the XQuery.

WesleyB

Visit my SQL Server weblog @. http://dis4ea.blogspot.com

Sunday, February 12, 2012

A little help remembering how to do make table

I can't remember how to add anew table but have written what I can if I may be so bold to ask for some help to create the table.

This sql will be run in MS Access, MySQL and SQL Server if that makes a difference.

Make TABLE [SysVar] fields [Key] text(15) restrant Key1 PrimaryKey, [value] text (25)This sql will be run in MS Access, MySQL and SQL Server if that makes a difference.

It does. It won't run in SQL Server. :)

Look up CREATE TABLE in Books Online for SQL Server.