Connecting to Microsoft SQL Server Tuc Goodwin. Introduction We are going to discuss establishing an connection to a SQL Server Database. You will learn.

Slides:



Advertisements
Similar presentations
Publishing Your PDB Under Windows
Advertisements

Connecting to Databases. relational databases tables and relations accessed using SQL database -specific functionality –transaction processing commit.
Database Connections with ASP.Net
Connect to Excel Spreadsheet with an OLE DB Connection.
Chapter 13 © 2000 Prentice Hall Chapter 13 Accessing the Database Server: ODBC, OLE DB, and ADO David M. Kroenke Database Processing © 2000 Prentice Hall.
.NET C RYSTAL R EPORTS …Vishal Kumar.. I NTRODUCTION T O C RYSTAL REPORT :- For creating interactive reports that can be integrated into a wide range.
Database Systems Presented by Rubi Boim 1.  Bureaucracy…  Database architecture overview  Buzzwords  SSH Tunneling  Intro to Oracle  Comments on.
The ADO Data Control. Universal Data Access Open Database Connectivity (ODBC) –standard for accessing data in databases OLE-DB –allows access to data.
Using Visual Basic 6.0 to Create Web-Based Database Applications
 ADO Object Model  Database Connection  Record Set  Query Examples  Update & Insertion Examples  An Application Example Working with Database in.
14 1 Chapter 14 Database Connectivity and Web Development Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel.
Web-based Programming Lanjut Pertemuan 5 Matakuliah: M0492 / Web-based Programming Lanjut Tahun: 2007.
Visual Basic Database Access BICS546. Microsoft Universal Data Access OLE DB: The OLE database protocol –Allows a program to access information in any.
Database Programming (using ADO) Universal Data Access – Microsoft strategy for providing access to information across the enterprise. – UDA provides high-performance.
DT221/3 Internet Application Development Active Server Pages & Database Connection.
 2004 Tau Yenny, SI - Binus M0194 Web-based Programming Lanjut Session 5.
Databases and Connectivity MIS 497. Relational Databases Dominant database technology today. Dominant database technology today. Stores data in relational.
Blue Group (ADO) 3/10/98 Universal Data Access with ActiveX Data Objects The Blue Group *Jennifer Kochan *Rebecca Orozco *Chris Papandria *Alicja Stanczak.
ODBC and JDBC What are they – libraries of function calls that support SQL statements Why do we need them –Provide a way for an application to communicate.
OLE and ODBC: Taming the Technologies The Third Annual Perl Conference, 1999 Sunday, August 22, 1999Roth Consulting ODBC.
Overview of Database Access in.Net Josh Bowen CIS 764-FS2008.
Microsoft Access Ervin Ha.
ODBC Open DataBase Connectivity a standard database access method developed by Microsoft to access data from any application regardless of which database.
1 Web Database Processing. Web Database Applications Static Report Publishing a report is prepared from a database application and exported to HTML DB.
CHAPTER 9 DATABASE MANAGEMENT © Prepared By: Razif Razali.
PI Data Access via OLE DB/SQL
September 6, 2015 Connecting Client Applications to Informix Databases using IBM Informix Connect and ODBC James Edmiston Database Consultant Quest Information.
Introduction to ADO.Net and Visual Studio Database Tools ISYS 512.
How to Configure Informix Connect and ODBC James Edmiston Informix DBA Consultant/Quest Information Systems, Inc. Informix User Forum 2005 Moving Forward.
ADO Connect Y.-H. Chen International College Ming-Chuan University Fall, 2004.
ODBC, OLE DB, and ADO Introduction Dr. Ron Eaglin.
Chapter 7 PHP Interacts with Ms. Access (Open DataBase Connectivity (ODBC))
Multiple Cases Access Utilities1 Access & ODBC Managing and Using ODBC Connections P.O. Box 6142 Laguna Niguel, CA
Database Systems Presented by Rubi Boim 1.  Bureaucracy…  Database architecture overview  Buzzwords  SSH Tunneling  Intro to MySQL  Comments on.
Using Visual Basic 6.0 to Create Web-Based Database Applications
Overview of Data Access MacDonald Ch. 15 MIS 324 Professor Sandvig.
Tutorial 10 by Sam ine1020 Introduction to Internet Engineering 1 Database & Server-side Scripting Tutorial 10.
SQL Server 2000 Acropolis Institute of Technology and Research Database fundamentals Prepared By: Rahul Patel.
DTS Conversion to SSIS Conversion Best Practices Mike Davis
File Processing Concepts – Field – combination of 1 or more characters that is the smallest unit of data to be accessed – Record – group of related fields.
Introduction to ADO Y.-H. Chen International College Ming-Chuan University Fall, 2004.
CSS/417 Introduction to Database Management Systems Workshop 4.
What is database?  Any Method for access info into Application from DataBase?  ODBC is standard for Accessing Data.  Problem with ODBC:  Information.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 The SqlConnection Object ADO.NET - Lesson 02  Training time: 10 minutes 
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 12-1 David M. Kroenke’s Chapter Twelve: ODBC, OLE DB, ADO, and ASP Part.
Copyright © Curt Hill Connectivity Communicating with the Database.
AVCE ICT – Unit 7 - Programming Session 16 – Database and VB.
1 Chapter Overview What is Microsoft SQL Server 2000? What are the SQL Server 2000 Components? What is the Relational Database Architecture? What is the.
ADO.NET Architecture MIS3502: Application Integration and Evaluation David Schuff Adapted from material by Arnold Kurtz, David.
ODBC : Open Database Connectivity SNU OOPSLA Lab. October 2005.
1 ADO Activex Data Objects. 2 ADO ADO allows users to access data easily from many existing databases (such as Access or Paradox) From ODBC compliant.
DATABASE SYSTEM VB LINK TO MS-SQL. 2 Visual ProgrammingChapter 6 Select Project -> Component.
Database Issues Peter Chochula 7 th DCS Workshop, June 16, 2003.
ADO & Recordsets. ADO Description & History  ActiveX Data Objects  History  1991 ODBC  Data Access Objects (DAO) for VB developers (JET)  Remote.
Using databases ActiveX Data Objects (ADO) Connecting to a database Reading data from a database Inserting, updating and deleting records Using databases.
ADO .NET from. ADO .NET from “ADO .Net” Evolution/History of ADO.NET MICROSOFT .NET “ADO .Net” Evolution/History of ADO.NET History: Most applications.
Data Control In this presentation… –databases supported –inserting a data control –data control properties –using the data control.
Lecture 4 Manipulating Form Data using methods of Recordset and RecordsetClone in VBA Restrict data with filter 1 Rapid Application Development.
1 Copyright © 2008, Oracle. All rights reserved. Repository Basics.
2 Copyright © 2008, Oracle. All rights reserved. Building the Physical Layer of a Repository.
Visual Basic Database Access
Accessing the Database Server: ODBC, OLE DB, and ADO
Data Virtualization Demoette… ODBC Clients
, MS-Access, QBE, Access/Oracle
Working with Database in ASP
Localizing Datasources with Alchemy Catalyst
ActiveX Data Objects (ADO)
5. Using databases in VB.
VISUAL BASIC INTRODUCTION TO DATA CONNECTIVITY.
Database Processing: David M. Kroenke’s Chapter Twelve: Part One
Presentation transcript:

Connecting to Microsoft SQL Server Tuc Goodwin

Introduction We are going to discuss establishing an connection to a SQL Server Database. You will learn that there is an easy way and a hard way.

Agenda Overview – What do you have to know… Security Modes Database Interfaces Connecting to a SQL Server Data Source

Overview – What do you have to know… 1. Server Name 2. Security Information 3. Database name 4. Data Interface / API to use 5. Steps to connect…

Security Modes There are two types of modes: Standard Mode (default) Integrated Mode

Database Interfaces

Connecting to a SQL Server Data Source Connecting with Data Control Connecting with ADO Data Control (ADO) Connecting with ADO Data Control (DSN) Connecting with ADO Data Control (UDL) Connecting with ADO (Programmatically)

Connecting with Data Control Natively it can’t be done…  It uses DAO. However…  If a Jet Database has already connected to a SQL Server database, then we can connect to that. Downside  We’re indirectly connecting (through JET)  Probably not the most efficient way.  DEMO

Connecting with ADO Data Control (ADO) Natively it connects fine  It’s ADO Set the Connection string property Set the RecordSource property DEMO

Connecting with ADO Data Control (DSN) Natively it connects fine  It’s ODBC Set the Connection string property Set the RecordSource property

Data Source Name (DSN) A DSN is a registry entry (Machine DSN) or text file (File DSN) that contains information about a database and the SQL Server it resides on. Control Panel -> Administrative Tools -> Data Sources (ODBC) Start Menu -> Administrative Tools -> Data Sources (ODBC)

Demo – Setting up a Data Source Name

Example of a File DSN (Standard) [ODBC] DRIVER=SQL Server UID=sa DATABASE=StateU WSID=DALGOODWIN3 APP=Microsoft® Access SERVER=dalgoodwin3

Example of a File DSN (Integrated) [ODBC] DRIVER=SQL Server UID=tgoodwin Trusted_Connection=Yes DATABASE=pubs WSID=DALGOODWIN3 APP=Microsoft Open Database Connectivity SERVER=DALGOODWIN3\DALGOODWIN32000

DEMO – ADO Control with DSN

Connecting with ADO Data Control (UDL) Natively it connects fine  It’s ADO Set the Connection string property Set the RecordSource property

Creating a UDL Create a file with a.UDL extention. Double-click on the icon.

Set the Provider

Set the Connection and Test

Examine the UDL [oledb] ; Everything after this line is an OLE DB initstring Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;User ID=sa;Initial Catalog=pubs;Data Source=dalgoodwin3\dalgoodwin32000 Look familiar? Can you say “Connection string”

DEMO – ADO Control with UDL

Connecting with ADO (Programmatically) Declare an ADO connection object Set the Connection String Open the Connection Instantiate the recordset etc….

DEMO – Connect with ADO

Other ways RDO – Similar to ADO. Use DSN or DSN- less connection strings ODBCDirect – Too much for this lesson ODBC – lots of API calls. Better off with the ADO abstraction.

Summary We discussed establishing an connection to a SQL Server Database. We learned that there is an easy way and a hard way Questions?