[prev in list] [next in list] [prev in thread] [next in thread]
List: mysql-odbc
Subject: ODBC
From: Sanjeeb K Bhuyan <skbhuyan () MIT ! EDU>
Date: 1999-07-28 18:11:01
[Download RAW message or body]
Hi,
Let me start from the beginning. i have a middleware package called webobjects.
Its at /developer.apple.com/techpubs/webobjects/ . I have the database in MySQL.
The platform is solaris 2.7.
Now to communicate between the two what do I need. I assume this is what I need --->
an ODBC adaptor,and an ODBC driver....is that correct?? I don't think
there exists a native driver for WebObjects and MySQL. Can someone tell me
the components i need to install, how the middleware interacts with the
database? maybe the configurations which need to be done?
This is what I did ---->
I downloaded iodbc-2.50.22a.tar.gz file..i untarred it in my /export/home/ directory.
I now have a directory structure which looks like this ---->
/export/home/iodbc-2.50.22a
/export/home/iodbc-2.50.22a/myodbc-2.50.22
/export/home/iodbc-2.50.22a/iodbc-2.12
Now I understand that what I have to do is get iodbc set up and then
myodbc set up. I also understand that I can use the myodbc-2.50.22 which
comes with iodbc-2.50.22a . Is this correct?
BTW, I installed the source of mysql-- mysql-3.22.25. I followed the
exact instructions on the mysql web page for downloading and installing the
source package. I was able to start mysql,create databases,etc...thus I verified that \
indeed the source package was correctly installed and configured. here's the \
directory structure for mysql.
/export/home/minty/mysql-3.22.25
/usr/local/mysql
OK,back to the steps I took.....
I went to the /export/home/iodbc-2.50.22a/ directory . I \
editted the Config.mk=Config-solaris.mk, so that it looks like this --->
#==================================================
#
#
# You NEED to configure:
#
# MYSQL_DIR
# MYSQL_DBLIBDIR
# ODBC_DIR
#
#
# and CHOOSE one set of operating system
# dependent compilation options: e.g.
# uncomment the lines following Linux OR
# the lines following Solaris
#
#
#
# info:
# README
#
# e-mail:
# maruzz@matrice.it
#==================================================
#============ Default for all system ==============
OS = UNX
SHELL = /bin/sh
AR = ar r
DLDAPI = DLDAPI_SVR4_DLFCN
MYSQL_DLDAPI =DLDAPI_SVR4_DLFCN
DLSUFFIX= so
INCDIR = ../iODBC-2.12
OBJX =
RANLIB = ranlib
#============= Linux ELF =========================
#CC = gcc
#PIC = -fPIC -O6
#LDFLAGS = -shared
#LIBS = -ldl
#MYSQL_LD = gcc
#============= Solaris =========================
#
CC = gcc
PIC = -fPIC
LDFLAGS = -G
LIBS = -ldl -lsocket -lnsl
MYSQL_LD = gcc
#============ ODBC package ========================
ODBC_DIR = /export/home/iodbc-2.50.22a
ODBC = iodbc
iODBC = yes
ODBC_INCLUDE = $(ODBC_DIR)/include
ODBC_LIBPATH = $(ODBC_DIR)/lib
ODBC_LIBS = $(ODBC_LIBPATH)/iodbc.so
#============ Database settings ===================
#
# MYSQL_DIR is the path the the source distribution
#
# MYSQL_DBLIBDIR is the path to the mysql install directory + lib/mysql
MYSQL_DIR = /export/home/minty/mysql-3.22.25
MYSQL_DBENV = mysql
MYSQL_DBDOCDIR =
MYSQL_DBINCLDIR = $(MYSQL_DIR)/include -I$(ODBC_INCLUDE) -I$(MYSQL_DIR)
MYSQL_DBLIBDIR = /export/home/minty/mysql-3.22.25/mysys
MYSQL_DBLIBFILE = $(MYSQL_DBLIBDIR)/libmysqlclient.a
MYSQL_DBLIBS = -lmysqlclient -lmysys -lmystrings -ldbug -lm -lgcc
then I do a --
#make
and the output I get is --->
gcc -O -fPIC -I. -DDLDAPI_SVR4_DLFCN -DVERSION=\"1.0.1\" -c dlf.c
gcc -O -fPIC -I. -DDLDAPI_SVR4_DLFCN -DVERSION=\"1.0.1\" -c dlproc.c
gcc -O -fPIC -I. -DDLDAPI_SVR4_DLFCN -DVERSION=\"1.0.1\" -c herr.c
gcc -O -fPIC -I. -DDLDAPI_SVR4_DLFCN -DVERSION=\"1.0.1\" -c henv.c
gcc -O -fPIC -I. -DDLDAPI_SVR4_DLFCN -DVERSION=\"1.0.1\" -c hdbc.c
gcc -O -fPIC -I. -DDLDAPI_SVR4_DLFCN -DVERSION=\"1.0.1\" -c hstmt.c
gcc -O -fPIC -I. -DDLDAPI_SVR4_DLFCN -DVERSION=\"1.0.1\" -c connect.c
gcc -O -fPIC -I. -DDLDAPI_SVR4_DLFCN -DVERSION=\"1.0.1\" -c prepare.c
gcc -O -fPIC -I. -DDLDAPI_SVR4_DLFCN -DVERSION=\"1.0.1\" -c execute.c
gcc -O -fPIC -I. -DDLDAPI_SVR4_DLFCN -DVERSION=\"1.0.1\" -c result.c
gcc -O -fPIC -I. -DDLDAPI_SVR4_DLFCN -DVERSION=\"1.0.1\" -c fetch.c
gcc -O -fPIC -I. -DDLDAPI_SVR4_DLFCN -DVERSION=\"1.0.1\" -c info.c
gcc -O -fPIC -I. -DDLDAPI_SVR4_DLFCN -DVERSION=\"1.0.1\" -c catalog.c
gcc -O -fPIC -I. -DDLDAPI_SVR4_DLFCN -DVERSION=\"1.0.1\" -DFIX_INI_FILE \
-DDIR_INI_FILE=\"/export/home/iodbc-2.50.22a/lib\" -c misc.c gcc -O -fPIC -I. \
-DDLDAPI_SVR4_DLFCN -DVERSION=\"1.0.1\" -c itrace.c Generating iODBC driver \
manager --> /export/home/iodbc-2.50.22a/lib/iodbc.so ld -G \
-L/export/home/iodbc-2.50.22a/lib dlf.o dlproc.o herr.o henv.o hdbc.o hstmt.o \
connect.o prepare.o execute.o result.o fetch.o info.o catalog.o misc.o itrace.o -o \
/export/home/iodbc-2.50.22a/lib/iodbc.so -ldl -lsocket -lnsl if [ ! -f \
/export/home/iodbc-2.50.22a/lib/iodbc.ini ]; then cp iodbc.UNX \
/export/home/iodbc-2.50.22a/lib/iodbc.ini; fi ar r \
/export/home/iodbc-2.50.22a/lib/libiodbc.a dlf.o dlproc.o herr.o henv.o hdbc.o \
hstmt.o connect.o prepare.o execute.o result.o fetch.o info.o catalog.o misc.o \
itrace.o ranlib /export/home/iodbc-2.50.22a/lib/libiodbc.a
cp isql.h /export/home/iodbc-2.50.22a/include/
cp isqlext.h /export/home/iodbc-2.50.22a/include/
cp odbc_types.h /export/home/iodbc-2.50.22a/include/
cp odbc_funcs.h /export/home/iodbc-2.50.22a/include/
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Don't forget tu update /export/home/iodbc-2.50.22a/lib/iodbc.ini with your conf
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
gcc -D_UNIX_ -O -fPIC -I/export/home/minty/mysql-3.22.25/include \
-I/export/home/iodbc-2.50.22a/include -I/export/home/minty/mysql-3.22.25 \
-I../iODBC-2.12 -DDLDAPI_SVR4_DLFCN -c catalog.c gcc -D_UNIX_ -O -fPIC \
-I/export/home/minty/mysql-3.22.25/include -I/export/home/iodbc-2.50.22a/include \
-I/export/home/minty/mysql-3.22.25 -I../iODBC-2.12 -DDLDAPI_SVR4_DLFCN -c \
connect.c gcc -D_UNIX_ -O -fPIC -I/export/home/minty/mysql-3.22.25/include \
-I/export/home/iodbc-2.50.22a/include -I/export/home/minty/mysql-3.22.25 \
-I../iODBC-2.12 -DDLDAPI_SVR4_DLFCN -c execute.c gcc -D_UNIX_ -O -fPIC \
-I/export/home/minty/mysql-3.22.25/include -I/export/home/iodbc-2.50.22a/include \
-I/export/home/minty/mysql-3.22.25 -I../iODBC-2.12 -DDLDAPI_SVR4_DLFCN -c info.c \
gcc -D_UNIX_ -O -fPIC -I/export/home/minty/mysql-3.22.25/include \
-I/export/home/iodbc-2.50.22a/include -I/export/home/minty/mysql-3.22.25 \
-I../iODBC-2.12 -DDLDAPI_SVR4_DLFCN -c myodbc.c gcc -D_UNIX_ -O -fPIC \
-I/export/home/minty/mysql-3.22.25/include -I/export/home/iodbc-2.50.22a/include \
-I/export/home/minty/mysql-3.22.25 -I../iODBC-2.12 -DDLDAPI_SVR4_DLFCN -c \
options.c gcc -D_UNIX_ -O -fPIC -I/export/home/minty/mysql-3.22.25/include \
-I/export/home/iodbc-2.50.22a/include -I/export/home/minty/mysql-3.22.25 \
-I../iODBC-2.12 -DDLDAPI_SVR4_DLFCN -c prepare.c gcc -D_UNIX_ -O -fPIC \
-I/export/home/minty/mysql-3.22.25/include -I/export/home/iodbc-2.50.22a/include \
-I/export/home/minty/mysql-3.22.25 -I../iODBC-2.12 -DDLDAPI_SVR4_DLFCN -c \
results.c gcc -D_UNIX_ -O -fPIC -I/export/home/minty/mysql-3.22.25/include \
-I/export/home/iodbc-2.50.22a/include -I/export/home/minty/mysql-3.22.25 \
-I../iODBC-2.12 -DDLDAPI_SVR4_DLFCN -c transact.c gcc -D_UNIX_ -O -fPIC \
-I/export/home/minty/mysql-3.22.25/include -I/export/home/iodbc-2.50.22a/include \
-I/export/home/minty/mysql-3.22.25 -I../iODBC-2.12 -DDLDAPI_SVR4_DLFCN -c \
utility.c gcc -D_UNIX_ -O -fPIC -I/export/home/minty/mysql-3.22.25/include \
-I/export/home/iodbc-2.50.22a/include -I/export/home/minty/mysql-3.22.25 \
-I../iODBC-2.12 -DDLDAPI_SVR4_DLFCN -c dll.c gcc -G \
-L/export/home/minty/mysql-3.22.25/mysys catalog.o connect.o execute.o info.o \
myodbc.o options.o prepare.o results.o transact.o utility.o dll.o -o \
/export/home/minty/mysql-3.22.25/mysys/libmyodbc_mysql.so -ldl -lsocket -lnsl \
-lmysqlclient -lmysys -lmystrings -ldbug -lm -lgcc \
/export/home/minty/mysql-3.22.25/mysys/libmysqlclient.a cp \
/export/home/minty/mysql-3.22.25/mysys/libmyodbc_mysql.so \
/export/home/iodbc-2.50.22a/lib/ sync
gcc -O -c gd.c
gcc -O -c gdfontt.c
gcc -O -c gdfonts.c
gcc -O -c gdfontmb.c
gcc -O -c gdfontl.c
gcc -O -c gdfontg.c
rm -f libgd.a
ar rc libgd.a gd.o gdfontt.o gdfonts.o gdfontmb.o \
gdfontl.o gdfontg.o
gcc -O -c gddemo.c
gcc gddemo.o -o gddemo -L./ -lgd -lm
gcc -O -c giftogd.c
gcc giftogd.o -o giftogd -L./ -lgd -lm
gcc -O -c webgif.c
gcc webgif.o -o webgif -L./ -lgd -lm
gcc -g -fPIC -I../iODBC-2.12 -I ./gd1.2 -I/export/home/iodbc-2.50.22a/include \
-DDLDAPI_SVR4_DLFCN -c odbctool.c gcc odbctool.o -o odbctool \
-L/export/home/iodbc-2.50.22a/lib -liodbc -ldl -lsocket -lnsl -lm -L./gd1.2 -lgd gcc \
-g -fPIC -I../iODBC-2.12 -I ./gd1.2 -I/export/home/iodbc-2.50.22a/include \
-DDLDAPI_SVR4_DLFCN -c monitor.c gcc monitor.o \
/export/home/iodbc-2.50.22a/lib/iodbc.so -o monitor -ldl
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Don't forget to update /export/home/iodbc-2.50.22a/lib/iodbc.ini with your conf
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Looks like "make" worked fine,huh? I then proceeded to edit the \
iodbc.ini file. It looks like this ---->
#=============================================================================#
# iodbc.ini (Unix) #
#=============================================================================#
# #
# sample configuration file for iODBC #
# #
#-----------------------------------------------------------------------------#
# #
# a driver section is set up like this: #
# [<identifier>] #
# Driver = <path>/<name_of_dynamic_link_library> #
# DSN = <database_name> #
# #
# <identifier> ::= [A-za-z][A-Za-z0-9_]* #
# [default] ::= entry used, if no other data matches #
# #
# Trace = ON | On | on | 1 | OFF | Off | off | 0 #
# enable tracing of ODBC routines #
# Tracefile = stdout | stderr #
# output for trace information, either stdout or stderr #
# #
#=============================================================================#
[mysql]
Trace = Off
TraceFile= stderr
Driver = /export/home/minty/mysql-3.22.25/mysys/libmyodbc_mysql.so
DSN = test
SERVER = 192.168.1.13
#UID = maruzz
#PWD = maru_pwd
#PORT = 3306
#=============================================================================#
# end of file #
#=============================================================================#
I looked for a libmyodbc_mysql.so which I \
located in
/export/home/iodbc-2.50.22a/lib/
/export/home/minty/mysql-3.22.25/mysys/
I then checked the size of it =102435 bytes.....something wrong here,huh?
Now how do I check that iodbc-2.50.22a works ??
I then go to the foll. directory --->
/export/home/iodbc-2.50.22a/myodbc-2.50.22/
and do a "make"
this is what I get --->
gcc -D_UNIX_ -O -fPIC -I/export/home/minty/mysql-3.22.25/include \
-I/export/home/iodbc-2.50.22a/include -I/export/home/minty/mysql-3.22.25 \
-I../iODBC-2.12 -DDLDAPI_SVR4_DLFCN -c catalog.c gcc -D_UNIX_ -O -fPIC \
-I/export/home/minty/mysql-3.22.25/include -I/export/home/iodbc-2.50.22a/include \
-I/export/home/minty/mysql-3.22.25 -I../iODBC-2.12 -DDLDAPI_SVR4_DLFCN -c \
connect.c gcc -D_UNIX_ -O -fPIC -I/export/home/minty/mysql-3.22.25/include \
-I/export/home/iodbc-2.50.22a/include -I/export/home/minty/mysql-3.22.25 \
-I../iODBC-2.12 -DDLDAPI_SVR4_DLFCN -c execute.c gcc -D_UNIX_ -O -fPIC \
-I/export/home/minty/mysql-3.22.25/include -I/export/home/iodbc-2.50.22a/include \
-I/export/home/minty/mysql-3.22.25 -I../iODBC-2.12 -DDLDAPI_SVR4_DLFCN -c info.c \
gcc -D_UNIX_ -O -fPIC -I/export/home/minty/mysql-3.22.25/include \
-I/export/home/iodbc-2.50.22a/include -I/export/home/minty/mysql-3.22.25 \
-I../iODBC-2.12 -DDLDAPI_SVR4_DLFCN -c myodbc.c gcc -D_UNIX_ -O -fPIC \
-I/export/home/minty/mysql-3.22.25/include -I/export/home/iodbc-2.50.22a/include \
-I/export/home/minty/mysql-3.22.25 -I../iODBC-2.12 -DDLDAPI_SVR4_DLFCN -c \
options.c gcc -D_UNIX_ -O -fPIC -I/export/home/minty/mysql-3.22.25/include \
-I/export/home/iodbc-2.50.22a/include -I/export/home/minty/mysql-3.22.25 \
-I../iODBC-2.12 -DDLDAPI_SVR4_DLFCN -c prepare.c gcc -D_UNIX_ -O -fPIC \
-I/export/home/minty/mysql-3.22.25/include -I/export/home/iodbc-2.50.22a/include \
-I/export/home/minty/mysql-3.22.25 -I../iODBC-2.12 -DDLDAPI_SVR4_DLFCN -c \
results.c gcc -D_UNIX_ -O -fPIC -I/export/home/minty/mysql-3.22.25/include \
-I/export/home/iodbc-2.50.22a/include -I/export/home/minty/mysql-3.22.25 \
-I../iODBC-2.12 -DDLDAPI_SVR4_DLFCN -c transact.c gcc -D_UNIX_ -O -fPIC \
-I/export/home/minty/mysql-3.22.25/include -I/export/home/iodbc-2.50.22a/include \
-I/export/home/minty/mysql-3.22.25 -I../iODBC-2.12 -DDLDAPI_SVR4_DLFCN -c \
utility.c gcc -D_UNIX_ -O -fPIC -I/export/home/minty/mysql-3.22.25/include \
-I/export/home/iodbc-2.50.22a/include -I/export/home/minty/mysql-3.22.25 \
-I../iODBC-2.12 -DDLDAPI_SVR4_DLFCN -c dll.c gcc -G \
-L/export/home/minty/mysql-3.22.25/mysys catalog.o connect.o execute.o info.o \
myodbc.o options.o prepare.o results.o transact.o utility.o dll.o -o \
/export/home/minty/mysql-3.22.25/mysys/libmyodbc_mysql.so -ldl -lsocket -lnsl \
-lmysqlclient -lmysys -lmystrings -ldbug -lm -lgcc \
/export/home/minty/mysql-3.22.25/mysys/libmysqlclient.a cp \
/export/home/minty/mysql-3.22.25/mysys/libmyodbc_mysql.so \
/export/home/iodbc-2.50.22a/lib/ sync
this looks fine too,right??
what do i do now? how do i proceed.....i've done a "make" for both iodbc-2.50.22a,and \
myodbc-2.50.22,but do I have to do a "make install"... the reason I ask this is \
because when i do "make install" I get -- "make --no targets found".
and how do I proceed? How do i interact between the middleware and \
database? Where do I get an ODBC adaptor?and how do I configure it?
I'm alittle confused when people use "configure" or "install"..cuz I \
expect to be able to use "./configure" or "make install",and then i discover that \
there is no file called configure in the directory..so if u could refer to it by \
command-name that would be great!
I apologise for such a long and repetitive email.....
thanx for all the help and replies..I need \
as much help as I can get soon!
thanx,
Sanjeeb Bhuyan
#no. -- (408) 992-0661x105
address--
Fuxito Worldwide
1030 W. Maude Ave
Suite 502
Sunnyvale,CA-94086
www.fuxito.com
---------------------------------------------------------------------
Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
posting. To request this thread, e-mail myodbc-thread491@lists.mysql.com
To unsubscribe, send a message to the address shown in the
List-Unsubscribe header of this message. If you cannot see it,
e-mail myodbc-unsubscribe@lists.mysql.com instead.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic