vb.net - Getting the local instance of SQL Server rather than a named instance -
Shortly before, I wrote a web-based guestbook application that wrote that it is a database of itself.
My code was very amateur, but because it was my first publication, I was very happy with it. Only a month after publishing, I realized that I had made a big mistake in the code.
I have only ever associated with a specific named example from SQL Server, and this is me, if SQL Server is a different name than the frequency I specified, then it will not work.
Therefore, because my users probably will not know what the name of the instance of SQL Server is running, I thought by adding a field where the user can specify that if they do, then What will happen, but what if they do not? My answer was to get the local name, regardless of name.
I tried data source =. Local;
, data source =.
and
A non-named example is called "default instance" and its use "Data Source = (Local); ..."
.
Comments
Post a Comment