How do I write a connection string in VB to use the local database. I have
something like this, but it does not work. I do not want to use the local
computer name. I want to make it generic so that the application can run on
any computer.
ThanksTry this:
Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security
Info=False
Note there is no reference to a server so it uses the local server with
integrated security.
Bryce|||found the solution. I just have to use localhost.
Thanks
"Emma" wrote:
> How do I write a connection string in VB to use the local database. I have
> something like this, but it does not work. I do not want to use the local
> computer name. I want to make it generic so that the application can run o
n
> any computer.
> Thanks|||Try,
-- WA
...
oConn.ConnectionString = "Provider=SQLOLEDB;Data Source=(local);Initial
Catalog=Northwind;Integrated Security=SSPI"
...
-- MA
...
oConn.ConnectionString = "Provider=SQLOLEDB;Data Source=(local);Initial
Catalog=Northwind; User ID=MyUsername; Password=MyPassword;"
...
AMB
"Emma" wrote:
> How do I write a connection string in VB to use the local database. I have
> something like this, but it does not work. I do not want to use the local
> computer name. I want to make it generic so that the application can run o
n
> any computer.
> Thanks
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment