English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Write now i am in a webbased project.I have a doubt that which driver
is used for connecting the mysql.I haven't seen any relevent driver
for connecting to the mysql.I know how to connect with Ms access and
oracle what is the difference between the access and mysql connection


Please help me
Thanks in advance

2006-10-10 22:38:10 · 3 answers · asked by Anonymous in Computers & Internet Programming & Design

3 answers

ODBC? Gone r the days of ODBC. Now it is JDBC. U need mysql-connector-j. Previously it was known as mm-mysql since its author is Mark Mathew. After Mark joined MySqlAB the driver is renamed mysql-connector-j. It is available in MySql website. To connect to database u r to create a Database connection pool and use JNDI. That's the J2EE specification. See the manual for ur container and also J2EE manual. Free lunch was always fine for poor people. Presently riches have discovered that poor peoples meals are yummy, nutritious and pocket saving. Riches were always greedy and miser , isn't it?

2006-10-11 08:40:23 · answer #1 · answered by binaryFusion 5 · 0 0

ODBC Driver for MySQL

If you want to connect to a local database, you can use a connection string like the following:

strConnect = "Driver={MySQL ODBC 3.51 Driver};Server=localhost;Database=MyDatabase;User=MyUserName;Password=MyPassword;Option=4;"

If you want to connect with a remote database, you need to specify the name of the server or its IP in the Server parameter. If the Port is distinct to 3306 (default port), you must specify it.

strConnect = "Driver={mySQL ODBC 3.51 Driver};Server=MyRemoteHost;Port=3306;Option=4;Database=MyDatabase;Uid=MyUsername;Pwd=MyPassword;"

The parameter Option can be one or more of the following values:

* 1 - The client can't handle that MyODBC returns the real width of a column.
* 2 - The client can't handle that MySQL returns the true value of affected rows. If this flag is set then MySQL returns 'found rows' instead. One must have MySQL 3.21.14 or newer to get this to work.
* 4 - Make a debug log in c:\myodbc.log. This is the same as putting MYSQL_DEBUG=d:t:O,c::\myodbc.log in AUTOEXEC.BAT.
* 8 - Don't set any packet limit for results and parameters.
* 16 - Don't prompt for questions even if driver would like to prompt.
* 32 - Enable or disable the dynamic cursor support. This is not allowed in MyODBC 2.50.
* 64 - Ignore use of database name in 'database.table.column'.
* 128 - Force use of ODBC manager cursors (experimental).
* 256 - Disable the use of extended fetch (experimental).
* 512 - Pad CHAR fields to full column length.
* 1024 - SQLDescribeCol() will return fully qualified column names.
* 2048 - Use the compressed server/client protocol.
* 4096 - Tell server to ignore space after function name and before '(' (needed by PowerBuilder). This will make all function names keywords!
* 8192 - Connect with named pipes to a MySQLd server running on NT.
* 16384 - Change LONGLONG columns to INT columns (some applications can't handle LONGLONG).
* 32768 - Return 'user' as Table_qualifier and Table_owner from SQLTables (experimental).
* 65536 - Read parameters from the client and ODBC groups from my.cnf.
* 131072 - Add some extra safety checks (should not be needed but...).

If you want to have multiple options, you should add the above flags! For example: 16 + 1024 = 1030 and use Option= 1030;.

2006-10-11 05:47:43 · answer #2 · answered by Damien Fleming 1 · 0 0

This is not recommended for real tme web based projects. This free but always you have to pay a bigger price for free lunch.

2006-10-11 05:59:08 · answer #3 · answered by liketoaskq 5 · 0 0

fedest.com, questions and answers