ODBC Setup For MySql and Access - v2

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 7

Confguring Access as a Front End and any ODBC compliant database as a

Backend
Before you have MS Access and MySQL communicate with each other you must frst
make a few changes to your system.
1. Install MySQL
. Install MS Access
!. Install the MySQL "#B$ driver
%. $reate a data&ase'ta&les in MySQL
(. Setu) "#B$ driver to communicate with Access and your MySQL data&ase
*. $reate your user interface in MS Access
What is an ODBC Driver and What Does it Do
Microsoft+s ")en #ata&ase $onnectivity ,"#B$- )rotocol is a widely used and
acce)ted a))lication )rogramming interface ,A.I- for data&ase interaction. "#B$
uses Structured Query Language ,SQL- as its data&ase access language. Most
/indows0&ased )roducts that use data&ases su))ort "#B$. 1sing this A.I2
data&ase a))lications can access data stored in data&ase management systems on
a variety of com)uters even if each data&ase management system uses a di3erent
data storage format and )rogramming interface.
"#B$ is often associated with a #S42 or a #ata Source 4ame. 5hat is &ecause the
#S4 is the a))ointed name for your data&ase in the scri)t calling it. A #S4 is like an
alias to your data&ase2 and your scri)ts will use the alias to access your data&ase.
A data source name ,#S4- is a data structure that contains the information a&out a
s)ecifc data&ase that an ")en #ata&ase $onnectivity ,"#B$- driver needs in order
to connect to it. Included in the #S42 which resides either in the registry or as a
se)arate te6t fle2 is information such as the name2 directory and driver of the
data&ase2 and2 de)ending on the ty)e of #S42 the I# and )assword of the user. 5he
develo)er creates a se)arate #S4 for each data&ase. 5o connect to a )articular
data&ase2 the develo)er s)ecifes its #S4 within a )rogram.
5here are three kinds of #S47 user #S4s ,sometimes called machine #S4s-8 system
#S4s8 and fle #S4s. 1ser and system #S4s are s)ecifc to a )articular com)uter2
and store #S4 information in the registry. A user #S4 allows data&ase access for a
single user on a single com)uter2 and a system #S4 for any user of a )articular
com)uter. A fle #S4 contains the relevant information within a te6t fle with a .#S4
fle e6tension2 and can &e shared &y users of di3erent com)uters who have the
same drivers installed.
Confguration of ODBC Driver in Windos !"
4ote7 MySQL services must &e running ,net start mys9l-.
Start'$ontrol .anel'Administrative 5ools'#ata Source ,"#B$-
$lick on the System DSN ta& a&ove
$lick on the Add &utton
Select the :MySQL "#B$ !.(1 #river+ and click Finish
;ill in the felds as a&ove
o #ata Source 4ame is a #S4 ,alias-0 you give this connection. It can &e
anything you want
o Server 0 is the name or I. address of the server where the MySQL
data&ase resides
o 1ser < is the username to make a connection and login into MySQL
o .assword < is the )assword for the user name a&ove
o #ata&ase < is the name of the data&ase ,do not )ut a )ath-
$lick on the Test &utton to check for connectivity. If everything went "= you
now have an "#B$ connection to your MySQL data&ase and it may &e used
&y other )rograms that su))ort "#B$.
#ake an ODBC Connection to $our #y%&' Database from Access
$reate a 4ew #ata&ase in Access
$lick on the External Data ta& and then the More &utton
Select ODBC Database
Select the Link to the data source by creatin a linked table
o)tion. $lick O!
$lick on the Machine Data Source ta& and highlight the #4S you wish. $lick
O!
Select all the ta&les you want to link to for your )ro>ect. $lick O!.
Select your )rimary keys for each ta&le in your data&ase. $lick O!.
?our new link to the e6ternal data&ase is com)lete. 4ow create your forms2
9ueries2 and re)orts.
4"5@7 ?ou cannot change the structure to a LI4=@# data&ase from Access.
?ou must have your design com)leted &efore linking to Access.
4"5@7 $ertain )rogramming rules must &e followed. ?ou may use the #S4
alias to reference your data&ase.
4"5@7 MySQL uses the same fle names and formats regardless of the
o)erating system so you may co)y data&ases &etween /indows machines
and 1ni62 Linu62 etc. =ee) in mind when )rogramming that /indows is 4"5
case sensitive &ut 1ni6 is. It is therefore good )ractice to always &e aware of
case sensitivity in naming o&>ects2 ta&les2 felds2 etc.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy