Archive

Archive for September, 2017

OLE DB provider “SQLNCLI10” for linked server returned message “No transaction is active.”

September 19, 2017 Leave a comment

Harnessing Linked Servers_1

When you set up a linked server environment between two SQL servers, that are not on the same network, and you try to run a transaction that includes a reference to a linked server; by running a SQL statement like

BEGIN TRANSACTION
update LINKED_SERVER.MY_DATABASE.dbo.MY_TABLE set MY_COLUMN = 1
COMMIT TRANSACTION

and you get an error message like

OLE DB provider “SQLNCLI10” for linked server “myserver” returned message “No transaction is active.”.

Msg 7391, Level 16, State 2, Line 2
The operation could not be performed because OLE DB provider “SQLNCLI10” for linked server “myserver” was unable to begin a distributed transaction.

Then the solution turned out to be – after two days of head-scratching – to : put the Net BIOS name (computer name) for each server involved in the transaction into the hosts file at both sides of the transaction.

The hosts file is in c:\Windows\System32\Drivers\etc\hosts – and you’ll need administrator access to change it.

 

Advertisements
Categories: Uncategorized

Our new #JobSearch #App, powered by @reedcouk #API

September 19, 2017 Leave a comment

392x696bb (1)

Thanks to @reedcouk ‘s API we’ve just relaunched our Job Searcher App on iOS with a new version. 

It’s a £0.99 download, and well worth it, if it helps land your next job !

https://itunes.apple.com/gb/app/job-searcher-app/id464568239?mt=8&at=1000l9tW

Categories: Uncategorized

Book Searcher App for #IOS, new version released

September 19, 2017 Leave a comment

392x696bb

A new version of our app for iOS “Book Searcher”, has just been released at

https://itunes.apple.com/us/app/book-searcher/id464083711?mt=8&at=1000l9tW

It’s a $0.99 cent download, but allows access to thousands of books 🙂

 

Categories: Uncategorized

#Visual #Transliteration from Russian in C#

September 19, 2017 Leave a comment

1200x630bb

Transliteration is where you convert one alphabet into another while maintaining the phonetics in as much as possible.

Visual Transliteration is much more niche, and it about maintaining the visual representation of one alphabet in another, for example  “Н” in Russian is pronounced “N”, but looks visually identical to a Latin “H”.

This code is for VISUAL transliteration, and NOT audible transliteration.

private static string VisualTransliterate(string russian)
{
var map = new Dictionary<string, string>
{
{“а”, “a”},
{“б”, “b”},
{“в”, “B”},
{“г”, “r”},
{“д”, “A”},
{“е”, “e”},
{“ё”, “e”},
{“ж”, “x”},
{“з”, “3”},
{“и”, “N”},
{“й”, “N”},
{“к”, “k”},
{“л”, “n”},
{“м”, “M”},
{“н”, “H”},
{“о”, “o”},
{“п”, “n”},
{“р”, “p”},
{“с”, “c”},
{“т”, “T”},
{“у”, “y”},
{“ф”, “o”},
{“х”, “x”},
{“ц”, “u”},
{“ч”, “u”},
{“ш”, “w”},
{“щ”, “w”},
{“ъ”, “b”},
{“ы”, “b”},
{“ь”, “b”},
{“э”, “3”},
{“ю”, “H”},
{“я”, “R”},
{“А”, “A”},
{“Б”, “B”},
{“В”, “B”},
{“Г”, “R”},
{“Д”, “A”},
{“Е”, “E”},
{“Ё”, “E”},
{“Ж”, “X”},
{“З”, “3”},
{“И”, “N”},
{“Й”, “N”},
{“К”, “K”},
{“Л”, “N”},
{“М”, “M”},
{“Н”, “H”},
{“О”, “O”},
{“П”, “N”},
{“Р”, “P”},
{“С”, “C”},
{“Т”, “T”},
{“У”, “Y”},
{“Ф”, “O”},
{“Х”, “X”},
{“Ц”, “U”},
{“Ч”, “Y”},
{“Ш”, “W”},
{“Щ”, “W”},
{“Ъ”, “b”},
{“Ы”, “b”},
{“Ь”, “b”},
{“Э”, “3”},
{“Ю”, “H”},
{“Я”, “R”}
};
var strOutput = “”;
foreach (var c in russian)
{
if (map.ContainsKey(c.ToString()))
{
strOutput += map[c.ToString()];
}
else
{
strOutput += c.ToString();
}
}
return strOutput;
}

Categories: Uncategorized

#SMTP JS now supports non standard ports

September 18, 2017 Leave a comment

logo

SMTP.JS is a script that allows you send email from Javascript

By default, the SMTP connection is secure (STARTTLS) and over port 25. If you
need to use an SMTP server that does not accepts secure connections, or in on a non-standart port, like 587, then use the button “Encrypt your SMTP Credentials” to store advanced configuration.

 

 

Categories: Uncategorized

Using a #Cors #Proxy to call #API s from #Javascript

September 14, 2017 Leave a comment

proxy-png

Javascript has always limited the ability to make arbitrary web requests to third parties, this has generally meant that projects required a server side component, even if its only purpose was to ferry data from a third party to the client.

CORS changed this somewhat, it allowed API service providers indicate to Javascript clients that it was OK for arbitrary web requests to be made to them, and the fact that any related security concerns were unimportant. – After all, any statically authenticated API would have the api key exposed in client code.

However some API providers don’t declare a CORS header. This can be down to security concerns, ignorance of Javascript clients, or just misconfiguration. That’s where a CORS proxy comes in. This is where a third party will do the connection for you, and it will declare the CORS header saying it’s OK to connect to them.

You can always develop this yourself, but a free public service is  https://cors-anywhere.herokuapp.com – which is open source on github here- https://github.com/Rob–W/cors-anywhere/

All you need to do it call https://cors-anywhere.herokuapp.com/<url> where <url> is the third party API. It passes basic authentication headers through, but you need to call it via AJAX, you can’t just paste it into a browser. This is to prevent service abuse.

Thanks Rob-W, whoever you are 🙂

Categories: Uncategorized

Comparison of Dedicated Windows Servers; for me @easyspace wins

September 6, 2017 Leave a comment

dedicated-hosting-usa-image

A B C D E F G
1
Supplier Ref Memory Speed Disk Price / month (after 1st year, ex VAT) / GBP Url / notes
2
1and1 XL32 32 3.8 2TB 124.99
3
Ovh SP-32 32 4.2 2TB 60+17 = 77
4
coreix SC512L 16 3.5 1TB 144
5
Kimsufi KS-5 16 2 2TB 38 – NOT WINDOWS
6
easy

space

X5650 32 ? 4TB 79.99

Going to move server shortly, after a RAID failure in our 1&1 server, which we’ve had for just under 2 years. So I was looking for something similar, but a little better, than the 24GB 3.4 GHZ quad code 2TB server that (l4i) that we currently pay £80 ex VAT for each month.

Initially, I was just going to go for an upgrade with the same hosting company, but the jump from £80 to £125 seemed too much, even if it had more memory.

So, I hunted around. OVH had a very good deal alt £77, but for VAT reasons, I wanted to be billed from a UK company against our Irish VAT, so it could be zero rated. OVH had an Irish company, which was not what I wanted.

Kimsufi was very cheap, and uses OVH infrastructure, but it only offers Linux, which is no good.

IBM, Amazon, and Azure were way off the mark in terms of price so I didn’t include them.

Eventually I went with EasySpace, even though their online form didn’t work very well, and they take 48 hours to set up when OVH could set up in 2. – but I’m not in a huge rush.

Categories: Uncategorized