Tip:
Highlight text to annotate it
X
Welcome to the SQL Offline Getting Started Videos. In part 2, I will show you the data link.
The data link connects an offline document to a data server. The data link can contain passwords.
So first, I will show you how to include (or exclude) passwords. Here in the data tab under Server, I display the Password Settings dialog.
The default setting is to Never Save which removes passwords (if recognized) from the data link. There is an Always save option,
but I select Connection Specific. So let’s create a few connections and take a look.
I'll connect to three different data servers. First to SQL Server. SQL Server does not include passwords by default.
I'll clear Blank Password and enter the password. One tricky thing here is that Allow Saving Password is not the switch you're looking for.
The switch that matters is Persist Security Info in the All tab.
Setting Persist Security Info to True must be the last thing that I do before I click OK to close the dialog box.
I close the dialog and an SQL Server connection initializes in the Source window. Next I'll connect to MySQL Server.
Here there is no switch to set a password. Later I’ll see that this means a password is included in the data link.
I select a database and OK to connect to MySQL. And finally to Oracle.
Here again there is no option to save a password, but later I’ll see that a password is not included.
So far in this video I have initialized SQL Server, MySQL, and Oracle in the Source window. Let's look at the connection string for each.
For Oracle, I can see that there is no password in the connection string. Or for that matter the user ID is also blank.
For MySQL I see the password is included. Next instead of looking at the connection string in the Source window,
for SQL Server I'll look at the data link in an Offline document. I double click to open the table into a new Offline document.
Click Modify in the Data tab to display the Data Link dialog box.
Here I can see the connection string, which does contain a password for SQL Server. Say that I want to remove the password.
Here I make it blank in the Data Link Properties dialog. I could also just edit the password out of the connection string.
Now in addition to the connection string, the Data Link dialog box is where you can specify the table (or Query).
If I loaded from a SELECT query this might look like SELECT * FROM STATION instead of the table name.
I'll mention that if you enter a new table name, the next data write would create a new table. But I restore the name to STATION.
Under Index I can see that there is a primary key column STATION_KEY.
For most database files and servers, the primary key (as well as other column constraints) is identified here.
I set the update key to primary key (which is also automatic default). I click Save, and the password is removed from the Offline document.
OK I have established that the Offline document contains a data link. Now I'll put the data link to use.
First I make a small change to the Rock 'n' Roll STATION_NAME value so that I have something to update. And then Write SQL.
Because I removed the password, it is now necessary to enter it here when connecting to the data server.
With Write SQL, the connection is needed to read the table from the data server.
SQL Offline compares online data with the Offline document, and writes script for the difference.
I want to show you a feature that makes it easy to reconnect to a data server. First I'll close all connections in the source window.
SQL Offline allows me to open recent connections to a data server in a manner similar to opening recent Offline documents.
This list is stored in your user profile (Registry), and can include passwords. So this feature remains disabled until you Enable Passwords.
(which we did at the beginning of this video). Here I reconnect to MySQL.
To finish the video, I want to show how to create an Offline document from a SELECT instead of a table.
In fact this select statement does not even reference a table. And here again is the select statement in the Data Link dialog box.
And that completes the second Getting Started Video, where we have discussed data links and passwords.
If you have watched the first Getting Started video you can now create offline documents, modify values offline,
and synchronize changes using the data link.
Thank you for watching.