Question

Refer back to the database you created in W1 Assignment 3 for ACSCars, Inc., a car...

Refer back to the database you created in W1 Assignment 3 for ACSCars, Inc., a car manufacturing firm. As mentioned previously, ACSCars, Inc. intends to launch a web-based database application for its vendors and dealers and they want to develop the application by using MySQL as the database.

In this assignment, complete the following tasks:

Using ADO.NET and naming the database as ACSCars, write the code for establishing a connection with the ACSCars database, first using a DSN and then a DSN-less connection, assuming MySQL as the database. Use the following information:

Parameters

Connection Name: conAK

Database: ACSCars

User Name: Mathew

Password: Mathew

Explain the different types of connection statements associated with the parameters used in the above connection.

Enhance the above connection by changing the connection time-out to two minutes and the security to mixed mode.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Here is the simple method to establish a DSN-less connection to the database..

A DSN-less connection can be used against any Microsoft Access database on your web site

For your database called "ACSCars.mdb" located in a web directory like "c:/webdata/", you can connect to the database with the following ASP code:

<---
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open "c:/webdata/ACSCars.mdb"
--->

Note:::

For the above condition to satisfy , that you have to specify the Microsoft Access database driver (Provider) and the physical path to the database on your computer.

Connection using DSN::

Create an ODBC Database Connection

You have the ODBC database called "ACSCars" you can connect to the database with the following ASP code:

<---
set conn=Server.CreateObject("ADODB.Connection")
conn.Open "ACSCars"
--->

With an ODBC connection, you can connect to any database, on any computer in your network, as long as an ODBC connection is available.

Creating An ODBC Connection to an MYSQ Database

Here is how to create a connection to a MS Access Database:

  1. Open the ODBC icon in your Control Panel.
  2. Choose the System DSN tab.
  3. Click on Add in the System DSN tab.
  4. Select the Microsoft Access Driver. Click Finish.
  5. In the next screen, click Select to locate the database.
  6. Give the database a Data Source Name (DSN).
  7. Click OK

Here is the pictorial representation ->>>

You can manually add the following details:::

Connection Name: conAK

Database: ACSCars

User Name: Mathew

Password: Mathew

MySQL Connector /ODBC Data Source Configuration MySQU Connector/ODBC Connection Parameters Data Source Name: My MySQL Connection 5.1 Description: Server127.0.0.1 Port: 2306 User: myusername Password: Database: database_name Test DetalsOXeleb Cance

Changing Security Mode ::

You can use SQL Management Studio or use the following

ALTER LOGIN sa ENABLE ;  
GO  
ALTER LOGIN sa WITH PASSWORD = '<enterStrongPasswordHere>' ;  
GO 

Types of connection statements associated:::

Attributes :: Sets or returns the attributes of a Connection object

CommandTimeout ::: Sets or returns the number of seconds to wait while attempting to execute a command

ConnectionTimeout:::   Sets or returns the number of seconds to wait for a connection to open

DefaultDatabase:::   Sets or returns the default database name

Changing the connection time-out::

<---
set conn=Server.CreateObject("ADODB.Connection")
conn.ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0"
conn.ConnectionTimeout=30
conn.open server.mappath("database.mdb")

conn.close
--->

This is the detailed answer for the question you have given.

As the infromation is not sufficient and quiet confusing I am confined to this answer.

Any Queries Hit the comment box

Add a comment
Know the answer?
Add Answer to:
Refer back to the database you created in W1 Assignment 3 for ACSCars, Inc., a car...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • For this course project, you will use various database management and programming techniques to design and...

    For this course project, you will use various database management and programming techniques to design and develop an online sales and distribution system for a fictitious organization. There are two phases—you will complete the first phase this week and the second phase in W5 Assignment 2. Rationale The focus of the project is to develop your database programming skills. This project will help you get a fair idea of the sales and distribution system in any organization that has a...

  • Rationale The focus of the project is to develop your database programming skills. This project will...

    Rationale The focus of the project is to develop your database programming skills. This project will help you get a fair idea of the sales and distribution system in any organization that has a chain of Carrying and Forwarding Agents (CFAs) or super stockists and stockists. You will be able to implement database programming concepts of ADO.NET in VB.NET and ASP.NET to create a real-life, web-based database application. (VB stands for Visual Basic.) Scenario Smooth Pen, Inc., a pen manufacturing...

  • The Northwind database created by Microsoft contains the sales data for a fictitious company called Northwind...

    The Northwind database created by Microsoft contains the sales data for a fictitious company called Northwind Traders, which imports and exports specialty foods from around the world. Here is the schema of the database: Products (ProductID, ProductName, SupplierID, CategoryID, QuantityPerUnit, UnitPrice, UnitsInStock, UnitsOnOrder, ReorderLevel, Discontinued); Suppliers (SupplierID, CompanyName, ContactName , ContactTitle, Address, City, Region, PostalCode, Country, Phone, Fax, HomePage); Categories (CategoryID, CategoryName, Description, Picture); Orders (OrderID, CustomerID, EmployeeID, OrderDate, RequiredDate, ShippedDate, ShipVia,  Freight, ShipName,ShipAddress, ShipCity, ShipRegion, ShipPostalCode, ShipCountry); Order_details (ID, OrderID,...

  • Project Description In this project, you will design and implement a database for keeping track of...

    Project Description In this project, you will design and implement a database for keeping track of information for an online “SOCIAL NETWORK” system (e.g. a simplified version of Facebook!). You will first design an EER schema diagram for this database application. Then, you will map the EER schema into a relational database schema and implement it on ORACLE or MySQL or some other relational DBMS. Finally, you will load some data into your database (via user Interface) and create some...

  • Description: In this assignment, you will be launching a denial of service attack on a web...

    Description: In this assignment, you will be launching a denial of service attack on a web server. We will be using hping3, a command-line oriented network security tool inside Kali Linux (an advanced penetration testing Linux distribution). Setting up the victim machine Download the Windows XP virtual machine with WebGoat server installed, using the following link. We will use this machine as the victim machine and launch a DoS attack on the WebGoat server.https://drive.google.com/open?id=0BwCbaZv8DevUejBPWlNHREFVc2s Open the victim machine and launch...

  • TASK Read the Regional gardens case study document before attempting this assignment. Background: You have been...

    TASK Read the Regional gardens case study document before attempting this assignment. Background: You have been employed by Regional Gardens as their first Chief Information Officer (CIO). You have been tasked by the Board to conduct a review of the company’s risks and start to deploy security policies to protect their data and resources. You are concerned that the company has no existing contingency plans in case of a disaster. The Board indicated that some of their basic requirements for...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT