How to connect to SQL Server 2012 from vb.net -
i've looked through web improve part of 2 days trying find how connect sql server 2012 came vs express 2013 desktop.
based on things found on various sites, in connection string (starting "") i've tried
server=.\mssqlexpress;database=brightstar;user=root;password=root
then
.(local)\mssqlexpress
and
.(localhost)\mssqlexpress)
as combinations without "ms" (just sqlexpress
).
nothing works far.
the error message
a network-related or instance-specific error occurred while establishing connection sql server. server not found or not accessible. verify instance name right , sql server configured allow remote connections. (provider: sql network interfaces, error: 26 - error locating server/instance specified)
so question is, instance name of sql server comes packaged version of visual studio? also, haven't gotten "user" , "password" parameters, help welcome there, too. (i guessing @ "root".)
if there's other info can provide helpful, please ask.
thanks.
(btw, sql anywhere?)
if have normal installation without changes, have sql server express instance name of sqlexpress
.
so can connect either using
.\sqlexpress
or
(local)\sqlexpress
or
your-machine-name\sqlexpress
(or ip, if want to)
the .
or (local)
(or localhost
, if insist) stand local machine , \sqlexpress
default instance name sql server express installation.
with sql server 2012 , newer, localdb feature - learn more localdb here
to connect instance, you'd use
(localdb)\v11.0
as server/instance name (or (localdb)\v12.0
sql server 2014 localdb)
for great intro sql server 2012 localdb, see aaron bertrand's article getting started sql server 2012 express localdb
sql-server vb.net visual-studio-2013
No comments:
Post a Comment