locked
How to change the locations where SQL server instance name are sssigned to variable? RRS feed

Answers

  • Sorry, I did not realize that this project including two folders. Once convert both folders "SQLExpressProviderSample" and "SqlExpressClientSyncProvider", the error above was gone.
    Thursday, March 4, 2010 8:49 PM

All replies

  • have you checked what the instance name is of your SQL installation. For SQLEXPRESS, the default would be "<yourmachinename>\SQLExpress". So if your machine name is "mypc_name", the correct value should be "mypc_name\SQLEXPRESS".

    Thursday, March 4, 2010 4:19 PM
  • I found out.
    Since I am using SQL devoloper version, so the answer is
    textServerMachine.Text = Environment.MachineName

    Thursday, March 4, 2010 4:46 PM
  • Another problem.
    Once I convert C# to VB, there is an error:

    Imports

     

    Microsoft.Samples.Synchronization.Data.SqlExpress

    There is no samples under microsoft.

    Thursday, March 4, 2010 5:22 PM
  • that's the original namespace in the SqlExpressClientSyncProvider.cs file. Are you sure you didn't change the namespace when you converted to VB?
    Thursday, March 4, 2010 6:35 PM
  • I used "instant vb" utility to convert it. I found that entire folder "SQLExpressClientSyncProvider" did not convert.

    Thursday, March 4, 2010 8:00 PM
  • Hello aspfun,

    Often times, sql server instance names match the machien name.

    If not the same, I usually try "osql -L" command to find out the correct one.

    I am sure there are other ways to achieve this.

    Thanks,

    Patrick

    Thursday, March 4, 2010 8:05 PM
  • Sorry, I did not realize that this project including two folders. Once convert both folders "SQLExpressProviderSample" and "SqlExpressClientSyncProvider", the error above was gone.
    Thursday, March 4, 2010 8:49 PM