Actually they are physically sorted in the order of the clustered index information - that's what 'clustered index' means. However, it is the default to build the index supporting the primary key as the clustered index. Tables without a clustered index are not sorted and are referred to as 'heaps'. Specific rows in a heap are referred to internally using row identifiers which give the physical location of the row, but this information isn't available to clients.
If you wish to update a specific row, you need to include some kind of row identifier within the table such that each row has its own identifier.
SQL Server 2005 does provide the RANK function which might prove helpful for updating an ad-hoc query.
DoEvents: Generating unexpected recursion since 1991
Using click once i can update my application on the users machine easily, but when i make database changes, i need the database to also be updated...is there a way to integrate SQL Server 2005 into the click once process without trashing the users existing data?
Thanks in advance for any help!
"Keyboard not found. Press < F1 > to RESUME. "
Source unknown (appears in many common BIOSes as a real error message)
For the last 14 days i have been struggling with design pattern (T-SQL / Tables) for cascading product variants in a E-Commerce solution ("value-pairs pattern" / "diamond pattern"). I did find this DB diagram from IBM (http://publib.boulder.ibm.com/infocenter/wchelp/v5r5/topic/com.ibm.commerce.developer.doc/refs/rdmattribute.htm), which seams to be a good table design.
My problem is, that i cant figure out how, to make the SELECT statement for each cascading selection. Attributes should be selected in a specified order, each dropdown below is disabled until the previous selection is made.
Table design is like this:
"ProductAttribute" (Relates each combination (T-Shirt, Small & Red) to a ProductID ..... AttributeID > ProductID)
"Attribute" (Relates "AttributeType" and "AttributeValue" together)
"AttributeType" (Type, Size, Color)
"AttributeValue" (T-Shirt, Jeans, Jacket, Small etc)
If i have 3 drop downs, with the following options:
Dropdown #1 (Type): T-Shirt, Jeans, Jacket
Dropdown #2 (Size): Small, Medium, Large, Extra Large etc.
Dropdown #3 (Color): Red, Green, Blue, Purple etc.
When the user selects a Type, Dropdown #2 is enabled and populates with possible values for Size. The problem is, how to make a T-SQL that only selects the available sized with the type "T-Shirt".
There is not limitation on how many Attribute each product can have. So a product could have X amount to attribute selections (dropdowns).
A SELECT statement that utilizes a number of correlated subqueries should solve your problem.
SELECT DISTINCT AttributeType, AttributeValueID
INNER JOIN AttributeType
ON Attribute.AttributeTypeID = AttributeType.AttributeTypeID
WHERE AttributeType.AttributeType = 'Size'
SELECT TOP 1 *
WHERE AttributeID = Attribute.AttributeID
SELECT TOP 1 *
FROM ProductAttribute AS ProductAttribute1
INNER JOIN Attribute
ON ProductAttribute1.AttributeID = Attribute.AttributeID
INNER JOIN AttributeValue
ON Attribute.AttributeValueID = AttributeValue.AttributeValueID
WHERE ProductAttribute1.ProductID = ProductAttribute.ProductID
AND AttributeValue.AttributeValue = 'T-Shirt'
In SQL Server 2005 you can do it as following
1. Right click on Connected server.
2. Select Properties menu.
3. Select "Security" option from left pane.
4. check the "Server authentication" option in right pane.
5. Select "Permissions" option from left pane.
6. Add Login or Role to particular user.
Knock out 't' from can't,
You can if you think you can
Thanks for your answer , But :
I'm in a workgroup environment , In this situation , How can I add users of other client computers that are going to connect to server?
and another point is that when I finished writing the program , What settings should I change in order to make my program available for client computers?
Thanks in advance .
i am trying to create a new user to my sql server database, but i am strugling,i want to enable this new user to be able to remotely connect to my database using his C# application, can anyone pls help show me how to do this. currently i have a database which i use windows authentication to connect to it, but now i want this new user and i to connect to one database.
The command object has a default timeout of 30 seconds. YOu will need to set this to some sort of timeout that is long enough for the stored procedure to run. If this is a really long running sp you may need to increase some of the web site timeouts as well.
Thanks for your reply.
Your answers could have solved my problem. If I limit the no. of users.
But that is the problem. No. of users will increase in coming time.
So if there is any other efficient way to solve this problem.
Plz tell me
Neither one of us suggested you needed to limit the number of user being returned. Both of us suggested that if you increase the timeout property of your command object then they will all return. If you look at the time in your query tool that it take to execute and it is like 1 minute, then increase your command timeout to like 2 minutes and you should be fine. If the time in it takes to execute is like 5 minutes then fix your query because you are missing indexes or something if it is taking that long to execute.
I have written a stored proc for searching in DB.For this purpose i have used ISNULL where in check whether the parameter is null or not.But when i use logical statement such as or in between sql statements it fails miserably.