Learn Microsoft Access Advanced Programming Techniques, Tips and Tricks.

Source Connect Str Property and ODBC

We have already seen that the usage of SourceConnectStr Property combined with SourceDatabase Property of MS-Access Query can be used to open external data sources, like dBase, Foxpro (Version 2.5 or 3.0) and Excel Table, directly and work with them.

We have learned how to add the above Property specifications in an IN Clause directly in the SQL of the Query.

Data Source like AS400 (iSeries), SQL Server and Foxpro needs an ODBC (Open DataBase Connectivity) Connect String to get access to these System's data.

The best way to learn and understand more about the Connection String Syntax of different ODBC Data Sources is to go through the following steps and look at the Connection String of the Linked Table:

  1. Create an ODBC DSN (Data Source Name). Refer the Post Linking with IBM AS400 Tables.
  2. Link the Table from the source directly using File - - > Get External Data- ->Link Table.
  3. Select ODBC Databases in the Files of Type control.
  4. Select the ODBC DSN that you have created from the displayed List.
  5. Click OK. If you have not created a DSN you can create a new one by selecting the New. . . Command Button.
  6. Select the Table to link with your MS-Access Database.
  7. After linking the Table, select the linked Table.
  8. Select Design from the Database Menu. You will receive a Warning message saying that the Linked Table Structure cannot be modified. Click Yes to the Prompt: Do You want to open it anyway..?
  9. Display the Property Sheet (View - ->Properties).

On the Description Property of the Table Structure you will find the ODBC String that can be used directly on Query SourceConnectStr Property.

Few examples of ODBC Connection String Values are given below:

AS400 (iSeries) Table:
  • ODBC;DSN=myData;UID=UserID;PWD=Password;TABLE=PAVUP.APC161D
SQL Server:
  • ODBC;DSN=MyData;UID=UserID;PWD=Password;DATABASE=Parts
FoxPro:
  • ODBC;DSN=Visual Foxpro Tables;UID=;PWD=;SourceDB=C:\MyFoxpro;SourceType=DBF;Exclusive=No;BackgroundFetch=Yes;Collate=GENERAL;Null=Yes;Deleted=Yes

As you can see in the above examples that the DSN Name, User ID, Password and other details are Data Source specific and must be provided correctly to get access to their respective Tables.

In the AS400 (iSeries) ODBC Connection String above the Table Name and Folder Name is separated with a dot in between. You may refer the earlier Post Linking with IBM AS400 Tables to learn how to link AS400 (iSeries) Table to MS-Access Database.

Share:

1 comment:

  1. I've Found a SQL scanner that can locate any SQL server at your network (multi-subnet) it can also try to brute force the SA user account (or any other account) to make sure the password is not easy.
    you can get it here: http://www.softpedia.com/get/Internet/Servers/Database-Utils/SQL-Locator.shtml

    ReplyDelete

Translate



PageRank
Subscribe in a reader
Your email address:

Delivered by FeedBurner

Search

Popular Posts

Search This Blog

Blog Archive

Powered by Blogger.

Labels

Forms How Tos Functions MS-Access Security Reports msaccess forms Animations msaccess animation Utilities msaccess controls Access and Internet MS-Access Scurity MS-Access and Internet Queries External Links msaccess reports msaccess tips Accesstips Array Menus and Toolbars MsaccessLinks Process Controls Art Work Downloads msaccess How Tos Graph Charts msaccessQuery Class Module List Boxes Property VBA Combo Boxes Command Buttons Data Emails and Alerts Objects Query Calculation Custom Wizards DOS Commands Data Type ms-access functions msaccess functions msaccess graphs msaccess reporttricks Collection Object msaccessprocess security advanced Access Security Custom Functions Field Type Form Macros Menus Object Reference Report Top Values Variables msaccess email msaccess menus progressmeter Access2007 Auto-Number Command Button Controls Copy Dictionary Object Expression Fields Form Instances Item Join Key Methods Microsoft Numbering System Records Recordset Security Split SubForm Table Time Difference Utility Workgroup Wrapper Classes database msaccess wizards tutorial Access2003 Accounting Year Action Add Animation Attachment Binary Numbers Bookmarks Budgeting ChDir Color Palette Conditional Formatting Data Filtering Defining Pages Diagram Disk Dynamic Lookup Error Handler Excel Export External Filter Formatting Groups Hexadecimal Numbers Import Labels List Logo Macro Mail Merge Main Form Memo Monitoring Octal Numbers Operating System Paste Primary-Key Product Rank Reading Remove Rich Text Sequence SetFocus Summary Tab-Page Tables Union Query User Users Water-Mark Word automatically commands function hyperlinks iSeries Date iif ms-access msaccess msaccess alerts pdf files reference restore switch text toolbar updating upload vba code

Featured Post

Sorting Dictionary Object Keys and Items

Sorting/Indexing of Table Records is a frequently used important exercise to organize the data in proper order, for faster retrieval of inf...

Labels

Blog Archive

Recent Posts