Saturday, 29 December 2012

How to connect to MySql using JSP


How to connect to MySql using JSP

<%@ page import = "java.sql.*"%>
<html>
<head>
<title>Obtaining a Connection </title>
</head>
<body>
<%
Connection conn=null;
ResultSet result=null;
Statement stmt=null;
ResultSetMetaData rsmd=null;
try
{
Class c=Class.forName("com.mysql.jdbc.Driver");
}
catch(Exception e)
{
out.write("Error!!!!!!" + e);
}
try
{
conn=DriverManager.getConnection("jdbc:mysql://192.168.110.5:3306/databasename","username","password");
out.write("Connected!");
}
catch(SQLException e)
{
System.out.println("Error!!!!!!" + e);
}


1) Change 192.168.110 from the above script to your url for e.g. localhost
2) databasename, username and password to your databasename, username and password

Note: Please make sure you already download the mysql-connector for Java
http://dev.mysql.com/downloads/connector/j/

I preferred using Netbeans as IDE for JSP.


Saturday, 6 October 2012

wamp installation the program can't start because msvcr100.dll is missing from your computer

On Windows 7(64 bit - 32bit) every time when i try to install i have the same problem. on the end of installations its shows this messages: 
The application has failed to start because msvcr100.dll was not found. re-insalling the application may fix the problem. 
After that i click ok and installation is over.


Solution 
-----------

1) Close down all the programs
2) Uninstall Wamp
3) Make sure Internet Explorer is set your default browser before the installation.
4) download Microsoft Visual C++ 2010 SP1 Redistributable Package (x86) and install ...

here's link to the VC++ redistributable 

[www.microsoft.com]
5) Make sure no other programs are using port 80 (Such as IIS, Skype..etc)
6) Reboot the machine
7) Run the Wamp as an administrator
8) It might ask you to select Explorer.exe, all you need to click Open button as by default it opens the location c:\windows

Once you follow the above, hopefully the issue will be no longer apparent.

Any problems feel free to leave your comments or feedback.

Thanks for reading

Sunday, 16 January 2011

TARGET MARKET & PRICING STRATEGIES

B.B.Q Tonight has always been charging slightly higher prices;

For Example: Earlier, the price of a seekh kabab plate was Rs.16 elsewhere whereas they charged Rs.20. Similarly, tikka was Rs.18 each but they charged Rs.22

Mr.Aziz quoted; “We target middle class and lower middle class.”

By claiming the above, it will not be fair to assume that Bar B Q Tonight is targeting middle and lower middle class because the prices that they charge are much higher than what a middle class person can afford.

Daily approximately 3000 customers visit the restaurant and pay around Rs.500 per head. It can accommodate around 1500 hundred people at a time.

There has been an increase in profits and sales every year and more and more people have started to visit it. Summer holidays in June and July are a peak period of sales for Bar B Q Tonight. 40% of the customers are from local community.