Feeds:
Posts
Comments

Archive for the ‘Errors&Resolutions’ Category

I have a ANP.NET VB Project built with VS2010.
It is 2018 so I have upgraded to SQL Server 2016 and VS2017.
After opening the 2010 project file I was told I did not have the SQL Express installed that is required.
It had a link to the prompt and I have used it to download SQL Express 2014 (didn’t look for 2016 and went with the suggestion). It looked fine and I can see the project with all the files within it and are able to open it.

The real problem started when I wanted to deploy the project and it errored saying: “The target GatherAllFilesToPublish does not exist”. After pulling my hairs for hours and tyring out different unsuccesful suggestions google had to offer I came up with my own solution.

1. I created a new project with VS2016.
2. Then using WinMerege compared the .vbproj file.
3. I found that the below was missing and I copied and pasted it to where it was missing and then it was all working fine:

10.0
$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)

Advertisements

Read Full Post »

I had a HDD taken out of my NAS. Although the HDD was fine but NAS was loosing its connectivity capabilities and eventually not not working one day.

I took the HDD out and found through using different software from Windows that it had Ext4 and RAW file format.

I have tried many software but I was not being able to see my folders and files but rather some other folders and files that I did not recognise (these were the files and folders used by the NAS).

After much looking further I stumbled upon http://www.reclaime.com/.

I tried the trial software and within a few clicks I could see all my files and folders. I was amazed to able to browse the folders and files that belonged to me. I was also really amazed at how easy it was to use the software.

I went ahead and bought the software. Although it was pricey (£190.93) it exactly did what it said on the tin.

 

Read Full Post »

I had a HDD taken out of my NAS – it was the “My Book World Edition II (White Light)”. Although the HDD was fine but the NAS was loosing its connectivity capabilities day by day and eventually stopped working one day.

I successfully took the HDD  out by following the instructions in the below link:

http://www.instructables.com/id/Disassembling-a-Western-Digital-My-Book/

Using varieties of free software from within Windows 10 I discovered that it was partitioned with Linux file format (Ext4 and RAW file formats). I have tried more software but I was not being able to see my folders and files but rather some other folders and files that I did not recognise (these were the files and folders used by the NAS).

After much looking further I stumbled upon http://www.reclaime.com/.

I tried the trial software and within a few clicks I could see all my files and folders. I was amazed to able to browse the folders and files that belonged to me. I was also really amazed at how easy it was to use the software.

I went ahead and bought the software. Although it was pricey (£190.93) it exactly did what it said on the tin.

 

Read Full Post »

The different options available to eliminate/handle decimals

declare @value as float = 123.9876
select ceiling(@value), floor(@value) -- eliminate decimals 
select round(@value,2)

Find triggers inside a database (Courtesy to Harry Lee)

select st.name, strig.name, st.name
from sys.triggers strig inner join sys.tables st
	on strig.parent_id = st.object_id inner join sys.schemas sch
	on st.schema_id = sch.schema_id

Format number as currency

SELECT CONVERT(varchar, CAST(987654321 AS money), 1) 

Find column names in a given table

SELECT OBJECT_NAME(c.OBJECT_ID) TableName, c.name ColumnName
FROM sys.columns AS c
JOIN sys.types AS t ON c.user_type_id=t.user_type_id
WHERE t.name = 'dbo.Foo' --you can change text to other dataTypes
ORDER BY 1--,c.OBJECT_ID;

Note on – pivoting accuracy with numbers
————————————
I have seen from experience that when Pivoting its better to use float or decimal (if you results can contain fractional values) and not integers to get more accurate results. If integer is required then the numbers need to be converted after the Pivotting.

Check IF Table is empty
—————————

To chekc if a record or a certain record exists

if exists(select top 1 * from TableName) — use the where clause to check for a certain record

The if exists checks whether any rows were returned. If I use top 1 in the selected statement that supposedly sohuld be more optimized because it does not need to show the showl table.
The star is used so that it can just be copied and reused by just changing the table name.

Generate Scripts (Backup scripts)
———————————–
Right click on a database
> Task
> Generate Scripts

Select the type of objects
Click the Advances button to see what how you want the script to be produced.

This way you would have all or your selected object include tables and its data all scripted out in a file.

Read Full Post »

BEGIN TRY
	---------------- EOF ------------------
	DROP TABLE AnyTable
	-----------------------------------------

    RAISERROR('This is an example', 16, 1)
    --where 16 is the severity (values 0-10) does not throw an error but can be used produce warnings.
    -- 1 Is an integer from 0 through 255. Using a unique state number for each location can help find which section of code is raising the errors.

END TRY

BEGIN CATCH
	PRINT 'Error Handled: ' + ERROR_MESSAGE()
END CATCH

IF OBJECT_ID('tempdb..##AnyGlobalTable') IS NOT NULL
	DROP TABLE ##AnyGlobalTable

Read Full Post »

If same errors keeps rising after resolving/modifications (to the dimentions or cubes), try:

restarting the applicaton if using the BIDS browser

deleting the object and recreating it again.

Read Full Post »

Error: Communication link failure when connecting to remote database

Suggestion: Try using:

– SQLOLEDB.1 (Microsoft OLE DB Provider for SQL Server)

rather than

– SQLNCLI.1 (Native OLE DB\SQL Server Native Client 10.0)

Read Full Post »

Older Posts »