You can use the same method for every provider on your system (Oracle, SQL
Server, Access, Excel, ...)
- Select the provider for SQL Server
- Press the 'Next' button
- Enter the servername (*1)
- Specify username and password
- Check 'Allow saving password' (Select 'Yes' to the security warning when
pressing the OK button when finished)
- Select the database
- Test the connection
If you are using SQL Server you will be using the SQLClient, so remove the
Provider-part of the connectionstring
Provider=SQLOLEDB.1;Password=123;Persist Security Info=True;User
ID=sa;Initial Catalog=MyDatabase;Data Source=MyServer
should be
Password=123;Persist Security Info=True;User ID=sa;Initial
Catalog=MyDatabase;Data Source=MyServer
(*1) I'm a little bit confused because you told in your post your database
was on the E: drive of a remote server. That's why I thought you were using
Access.
For SQL Server it doesn't matter on what drive the database resides, you
should be able to connect using the servername...
--
Kind regards,
Ken Huysmans
http://www.khsw-be.net
"Art" wrote:
Ken,
Can I do this with sql server? I'm not at work right now and can't test it
out till tomorrow. If this works with sql server it sounds great!
Art
"kHSw" wrote:
I suppose you are using MS Access?
There's an easy way to create a connectionstring:
- Create a new textfile
- Rename it from 'New Text Document.txt' to 'Connection.udl' (the name
doesn' matter, the extension is the important part)
- Doubleclick on this file
- On the first tab (Provider) select 'Microsoft Jet 4.0 OLE DB Provider'
- Click the 'Next' button
- Browse to the database and select it
- Press the 'Test Connection' button, this should succeed
- Close the wizard
- Open the UDL file with notepad
- The last line is the connectionstring to use
Good luck!
--
Kind regards,
Ken Huysmans
http://www.khsw-be.net