<script type="text/javascript">
$(function (){
$("input[type=text]").first().focus();
});
</script>
Or put this at the bottom of your master page if you want it done everywhere.
This blog is titled the way it is, because this is the method by which I came to learn most of the following information. 🤪
<script type="text/javascript">
$(function (){
$("input[type=text]").first().focus();
});
</script>
When you get a warning like the following when processing an Analysis Services Cube, it will usually be related to other errors in Processing.
This has something to do with trimming in char columns. To fix the problem, go into the properties of the offending column, and change Trimming to None:
Normally in VS2010, when you right-click on the ‘Controllers’ folder, you will get a menu that includes 'Add/Controller’. If this menu option is gone, it is because the project type is not setup correctly.
To fix this:
User the ‘Value’ method on a column in t-sql to query the values of an XML column. So for example, if you have XML that looks like this:
1: <EventDetails>
2: <EventSource>CAST</EventSource>
3: <EventType>CastSubjectAreaPublished</EventType>
4: <EventTimestamp>2008-12-16T00:42:34</EventTimestamp>
5: <EventArguments>
6: <SubjectAreaId>1000</SubjectAreaId>
7: <ClientId>3450</ClientId>
8: <UserId>3</UserId>
9: <WorkEventId>6515</WorkEventId>
10: </EventArguments>
11: </EventDetails>
You can query it with T-SQL that looks like this:
1: select top 20
2: messagebody.value('(/EventDetails/EventType)[1]', 'varchar(50)') as EventType,
3: ( select max(SubjectAreaName) from EnterpriseODB..SubjectArea where
4: SubjectAreaId = messagebody.value('(/EventDetails/EventArguments/SubjectAreaId)[1]', 'int')) as SubjectArea
5: from processedmessagelog
6: where messagebody.value('(/EventDetails/EventArguments/ClientId)[1]', 'varchar(10)') = 3450
Note that the ‘[1]’ tells sql to retrieve the first instance of that value.
Say that you want to concatenate values from several records into a single string. The classic example is a list of categories where you want to present it to the user as Category Name followed by a comma separated list of all products for that category.
There are multiple solutions for this problem, but this one seems to be the most straight forward:
1: Select C.Name,
2: stuff((select ', ' + P.Name
3: from Product as P
4: where P.CategoryId = C.Id
5: for xml path('')),1,2,'') as ProductList
6: from Category as C
Occasionally, when attempting to connect to a server on a different domain, you may get an error that says the credentials are incorrect even though you didn’t enter any credentials, or if you do enter the credentials, it says that these credentials conflict with an existing set of credentials. To fix this, open a command prompt and enter the following command:
1: net use \\server /delete
Then you should be able to connect to the server, either through the command prompt or through the command prompt:
1: net use x: \\server\share /user:username password
When registering a hard disk with Oracle Virtual Box, if you get an error like the following:
It means you need to change the UUID of the disk. This generally happens if you have cloned a disk. To correct this, you need to run the VBoxManage program which comes with Virtual Box. This is generally located in the C:\Program Files\Oracle\VirtualBox directory. Open up a command prompt in this directory and do the following (filling in the name of your hard disk file where applicable:
VBoxManage internalcommands sethduuid c:\directory\MyHDFile.vhd