Question: If I use the following code, it is not going to be used further because the table is getting created. But I just want to append the data instead of creating a new table every time. 

```
SELECT DISTINCT * INTO hist 
FROM source WHERE year(DOJ)< @year

```

Answer: 
Change 

```
$(function ()
    {
    var connection = $.hubConnection("http://localhost:1968");
    connection.start()
        .done(function () {
            console.log('connected');
            connection.send("success?");
        })
        .fail(function (a) {
            console.log('not connected'+a);
        });
});

```

to

```
$(function ()
{
var connection = $.hubConnection("http://localhost:1968");
var hub = connection.createHubProxy("echo");
hub.on("AddMessage", Method);
connection.start({ jsonp: true })
            .done(function () {
            console.log('connected');
            hub.say("success?");
        })
        .fail(function (a) {
            console.log('not connected'+a);
        });
});

function Method(messageFromHub)
{
alert(messageFromHub);
}

```

and

```
class Startup 
{ 
    public void Configuration(IAppBuilder app) 
    { 
        app.MapSignalR();
    } 
} 

```

to

```
class Startup 
{ 
    public void Configuration(IAppBuilder app) 
    { 
        app.MapSignalR(new HubConfiguration() { EnableJSONP = true });} 
} 

```

It should do.

```
app.MapSignalR(new HubConfiguration() { EnableJSONP = true });} 

```

and 

```
connection.start({ jsonp: true })

```

Will allow cross site request
RPC on Server in SignalR with *createHubProxy()*:

Thanks to the answer from **Vishal Ravlani**

But for me

```
hub.say("success?");

```

doesn't work! (Does it work for you?)

I have to write:

```
hub.invoke('say','success?');

```

---

And SignalR has automatically detected CrossOrigin on Client.

On Server I have used:

```
app.Map("/signalr", map =>
            {
                map.UseCors(CorsOptions.AllowAll);

                map.RunSignalR();
            });

```

which was described on: <http://www.asp.net/signalr/overview/signalr-20/hubs-api/hubs-api-guide-javascript-client#crossdomain>