- Category: Blog
- Published: Monday, 10 August 2015 16:17
- Written by Ray White
This is a video to help answer the question of how to connect to SQL server. Sometimes companies have SQL server already set up and have employees on it. But they may install Standard Time® onto a new work station for a new employee. When they do that by default you’ll see in the title bar Standard Time uses a Microsoft Access database. You’ll also see if you go to the File menu and choose Database, we have the name of the ODBC ‘File DSN’ right there. That’s a good tip off we’re using the default Microsoft Access database. All we have to do is change the name to a new file DSN that connects to SQL and we’re probably good. But I’m going to show how to create that file DSN using the steps here below and get connected to SQL. Before I do that I’d like to switch over to SQL and show you some other things. You probably already for SQL server setup but if you don’t there are some videos showing how to do that and how to trouble shoot connections. I want to show one quick thing; I’ll open up the Security section in the Logins. You probably already know that you need to connect to SQL with a login. You can use either Windows authentication or SQL authentication. I’m just going to open one here that’s a SQL authentication login. You’ll notice the default database is Standard Time. If I switch over to the User Mapping and click on the Standard Time row you’ll also see we have db_owner rights. And that allows us to modify the database should we need to do that. I wanted to point that out.
Let’s switch back over to Standard Time. What we’re going to do is create a file DSN that will connect to SQL. I’ll open up ODBC Data Source Administrator, click on the File DSN tab, then we’ll click add. We’re going to scroll down to the bottom and find SQL server, click next. The name of the file DSN will be Standard Time sql. Click next again, then you have to enter the Server, this is where I can’t really help, you’re going to have to know the name of your server for where your database is located. Enter that, click next. In this case I’m going to choose SQL authentication, again you can use NT authentication [Windows authentication] if you have that set up, if you have your log in set up. But otherwise you would need a log in ID and password. So I’ve entered those, I’ve clicked next. I’m going to connect to the Standard Time database by default; click next, finish. Then I’m going to test that and it says the test completed successfully. So I know now I have a good file DSN that can connect to SQL server.
I’m done there. The next thing I need to do is, if I’m using SQL authentication, is to open that up into Notepad and add one more line to the bottom. That is “PWD=password.” I’m going to save that because the ODBC administrator does not save it. Close that, switch back over to Standard Time, now we can go to the File menu choose Database. Here we saw the name of the File DSN that was used for default Microsoft access database. So I simple enter sql, the name is Standard Time sql. I click OK, OK, OK; Standard Time will restart, you can see a completely different set of projects here. If I go to Tools, Projects, I see all of my projects and then you know you’re connected to Standard Time. Make sure the user over here in the upper right corner is the user you are expecting.
That’s pretty much it. There are other videos for trouble shooting SQL connections if you need those.