What string do I use to connect to an SQL Server?

后端 未结 2 389
失恋的感觉
失恋的感觉 2021-01-28 03:05

I\'m trying to execute an SQL Job using a CRM Workflow by making a custom activity. In my code, an online tutorial had me construct it like this (in c#):

[CrmWo         


        
2条回答
  •  南方客
    南方客 (楼主)
    2021-01-28 04:04

    Although not entirely relevant to the question but nonetheless, a useful site to bookmark to aid in your getting the connection string right.

    For SQL Server 2008, see this linky here, on the same site

    Portion of the server string is this:

    Server=myServerName\theInstanceName

    You have used the forward slash in your declarative above

    [Input("Server Connection")]
    [Default("HBSSQL2008/MSSQLSERVER")]                  //<--This String
    public InArgument ServerName { get; set; }
    

    Change it to this:

    [Input("Server Connection")]
    [Default("HBSSQL2008\\MSSQLSERVER")]                  //<--This String
    public InArgument ServerName { get; set; }
    

    Might need to double-slash it to escape it..

提交回复
热议问题