MySQL versus OCI Functions
Hi, I am looking for a list
to see the opposite from MySQL Functions to OCI Functions
for example
MySQL OCI
mysql_list_fileds() ?
mysql_fetch_field() ?
mysql_query() ?
mysql_free_result() ?
and so on !
Could somebody help me ?
Thanks
Stefan
check this links :-
http://www.php.net/manual/en/ref.oracle.php
http://www.php.net/manual/en/ref.oci8.php
Similar Messages
-
How to use a mysql built-in function with dataprovider
hi.
I want to use a mysql built-in function, for example, MD5() on a column when updating a table with dataprovider.
Something like this doesn't work:
MyDataProviderOne.setValue("tablename.field_name", "MD5('some text')");
How should it be done?
thanks.
Mike.hi.
thanks. this helped, but I'd like to use also different functions, that's why, I'd rather do it by MySQL built-in functions with dataprovider... Is there any way to do that?
best regards.
Mike. -
OCI Function call vs Odatabase Class
In my application I've used ODatabase class to
open a database connection.
At the same time, I use OCI function calls method to connect to the same database. This is use to execute store procedure & query.
My question is that does it cause double connection to Oracle?Yes.
-
Hi all,
I just have one question, how can I use mysql C API function for my labview program? I program it use dll call, but I use command "show processlist;"in mysql database,can see this process yet.So ,anybody can help me to solve this?
Thanks,
also , anyone have example,show...I am very appreciate...Do you really want to use a C API to do that?
I don't see the need for a C API or a call to a DLL. I find it more logical to connect to your MySQL DB Server and run "show processlist" as an SQL Statement.
but if you insist on using a DLL, I am guessing this link will help you: Using Existing C Code or a DLL in LabVIEW -
Program blocked in oci function
Hello,
When I read data from the database, everything works well. But when my program run some time, it blocked in oci function and can't work.
Here is a stack from my code:
GNU gdb 6.6
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i586-suse-linux"...
Using host libthread_db library "/lib/libthread_db.so.1".
Attaching to program: /usr/local/fountain/shinedb/bin/dbsyndata, process 5609
Reading symbols from /usr/local/fountain/shinedb/lib/libmdbcore.so...done.
Loaded symbols for /usr/local/fountain/shinedb/lib/libmdbcore.so
Reading symbols from /usr/local/fountain/shinedb/lib/libdbapi.so...done.
Loaded symbols for /usr/local/fountain/shinedb/lib/libdbapi.so
Reading symbols from /usr/local/fountain/shinedb/lib/libhdb.so...done.
Loaded symbols for /usr/local/fountain/shinedb/lib/libhdb.so
Reading symbols from /usr/lib/libstdc++.so.6...done.
Loaded symbols for /usr/lib/libstdc++.so.6
Reading symbols from /lib/libm.so.6...done.
Loaded symbols for /lib/libm.so.6
Reading symbols from /lib/libgcc_s.so.1...done.
Loaded symbols for /lib/libgcc_s.so.1
Reading symbols from /lib/libc.so.6...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /usr/local/fountain/shinedb/lib/libpub.so...done.
Loaded symbols for /usr/local/fountain/shinedb/lib/libpub.so
Reading symbols from /lib/libpthread.so.0...done.
[Thread debugging using libthread_db enabled]
[New Thread -1232918864 (LWP 5609)]
Loaded symbols for /lib/libpthread.so.0
Reading symbols from /usr/local/fountain/oracle/oracle/product/10.2.0/client_1/lib/libclntsh.so.10.1...done.
Loaded symbols for /usr/local/fountain/oracle/oracle/product/10.2.0/client_1/lib/libclntsh.so.10.1
Reading symbols from /usr/local/fountain/shinedb/lib/libnvlist.so...done.
Loaded symbols for /usr/local/fountain/shinedb/lib/libnvlist.so
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /usr/local/fountain/oracle/oracle/product/10.2.0/client_1/lib/libnnz10.so...done.
Loaded symbols for /usr/local/fountain/oracle/oracle/product/10.2.0/client_1/lib/libnnz10.so
Reading symbols from /lib/libdl.so.2...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /lib/libnsl.so.1...done.
Loaded symbols for /lib/libnsl.so.1
Reading symbols from /usr/local/lib/libutils.so...done.
Loaded symbols for /usr/local/lib/libutils.so
0xffffe410 in __kernel_vsyscall ()
(gdb) where
#0 0xffffe410 in __kernel_vsyscall ()
#1 0xb7d8aa63 in __read_nocancel () from /lib/libc.so.6
#2 0xb7430db3 in snttread ()
from /usr/local/fountain/oracle/oracle/product/10.2.0/client_1/lib/libclntsh.so.10.1
#3 0xb742e38a in nttrd ()
from /usr/local/fountain/oracle/oracle/product/10.2.0/client_1/lib/libclntsh.so.10.1
#4 0xb731fccc in nsprecv ()
from /usr/local/fountain/oracle/oracle/product/10.2.0/client_1/lib/libclntsh.so.10.1
#5 0xb7322f97 in nsrdr ()
from /usr/local/fountain/oracle/oracle/product/10.2.0/client_1/lib/libclntsh.so.10.1
#6 0xb73059e3 in nsdo ()
from /usr/local/fountain/oracle/oracle/product/10.2.0/client_1/lib/libclntsh.so.10.1
#7 0xb7302c83 in nsbrecv ()
from /usr/local/fountain/oracle/oracle/product/10.2.0/client_1/lib/libclntsh.so.10.1
#8 0xb7335b43 in nioqrc ()
from /usr/local/fountain/oracle/oracle/product/10.2.0/client_1/lib/libclntsh.so.10.1
#9 0xb7448d27 in ttcdrv ()
---Type <return> to continue, or q <return> to quit---
from /usr/local/fountain/oracle/oracle/product/10.2.0/client_1/lib/libclntsh.so.10.1
#10 0xb733cea5 in nioqwa ()
from /usr/local/fountain/oracle/oracle/product/10.2.0/client_1/lib/libclntsh.so.10.1
#11 0xb71a12bb in upirtrc ()
from /usr/local/fountain/oracle/oracle/product/10.2.0/client_1/lib/libclntsh.so.10.1
#12 0xb7116f5a in kpurcsc ()
from /usr/local/fountain/oracle/oracle/product/10.2.0/client_1/lib/libclntsh.so.10.1
#13 0xb70cc59f in kpuexecv8 ()
from /usr/local/fountain/oracle/oracle/product/10.2.0/client_1/lib/libclntsh.so.10.1
#14 0xb70ce92e in kpuexec ()
from /usr/local/fountain/oracle/oracle/product/10.2.0/client_1/lib/libclntsh.so.10.1
#15 0xb71a5e26 in OCIStmtExecute ()
from /usr/local/fountain/oracle/oracle/product/10.2.0/client_1/lib/libclntsh.so.10.1
Thanks.hi Nikeda,
I replaced the sizeof(double) to DBL_DIG/FLT_DIG constant, now the program doesn't crashes but the conversion is not happening properly.
The result of any number after conversion is "0".
Any suggestions, Thanks in advance .. below is the code snippet u asked for ..
class ABC
double qty ;
ott structure
struct abc_ott
OCINumber qty ;
// pro*c code
EXEC SQL BEGIN DECLARE SECTION ;
abc_ott * abc_ott_inst ;
EXEC SQL END DECLARE SECTION ;
EXEC SQL ALLOCATE :abc_ott_inst ;
ABC * abc = new ABC ;
abc->qty = 100.0 ;
OCINumberFromReal(ociError, &abc->qty, (uword)sizeof(double), &abc_ott_inst->qty ) ;
// call with DBL_DIG
OCINumberFromReal(ociError, &abc->qty, DBL_DIG, &abc_ott_inst->qty ) ;
Edited by: user3894537 on May 20, 2010 8:25 AM
Edited by: user3894537 on May 20, 2010 8:38 AM -
OCI functions corrupt this pointer in c++ program
Hallo! I have a c++ program that uses OCI functions. When this program is compiled with optimisation it dies with segmentation violation. Investigation has shown that after return from OCIStmtFetch2 function this pointer (stored in %edi) becomes corrupt.
I tested this problem on pentium with g++ 4. On sun with CC compiler from sunstudio it also crashes, but somewhere on return from oracle function: 0xffffffff7e3aaa34: kpufch+0x0274: ret (I'm not familiar with sparc assembler).
When the program is compiled without optimisation everything works fine.
Any ideas/experience?Hi,
We faced a similar problem where our c++ program crashed. the stack showed that the error was from oracle library.
_______Stack Trace_________
#0 0x40d21936 in lxhmcnv () from /sbcimp/run/tp/oracle/client/v9.2.0.7.0-32bit/lib/libclntsh.so.9.0
#1 0x40d09959 in lxgcnvc () from /sbcimp/run/tp/oracle/client/v9.2.0.7.0-32bit/lib/libclntsh.so.9.0
#2 0x40a54ebc in kpcxk2u () from /sbcimp/run/tp/oracle/client/v9.2.0.7.0-32bit/lib/libclntsh.so.9.0
#3 0x40a78c10 in ttccDefineConvert () from /sbcimp/run/tp/oracle/client/v9.2.0.7.0-32bit/lib/libclntsh.so.9.0
#4 0x40a79256 in ttccfpg () from /sbcimp/run/tp/oracle/client/v9.2.0.7.0-32bit/lib/libclntsh.so.9.0
#5 0x40a7820f in ttcfour () from /sbcimp/run/tp/oracle/client/v9.2.0.7.0-32bit/lib/libclntsh.so.9.0
#6 0x40810f0b in kpufCopyPrefRows () from /sbcimp/run/tp/oracle/client/v9.2.0.7.0-32bit/lib/libclntsh.so.9.0
#7 0x408115ee in kpufch0 () from /sbcimp/run/tp/oracle/client/v9.2.0.7.0-32bit/lib/libclntsh.so.9.0
#8 0x40812904 in kpufch () from /sbcimp/run/tp/oracle/client/v9.2.0.7.0-32bit/lib/libclntsh.so.9.0
#9 0x407442b9 in OCIStmtFetch2 () from /sbcimp/run/tp/oracle/client/v9.2.0.7.0-32bit/lib/libclntsh.so.9.0
#10 0x406a051c in sqlcucFetch () from /sbcimp/run/tp/oracle/client/v9.2.0.7.0-32bit/lib/libclntsh.so.9.0
#11 0x4069289a in sqlall () from /sbcimp/run/tp/oracle/client/v9.2.0.7.0-32bit/lib/libclntsh.so.9.0
#12 0x40689933 in sqlnst () from /sbcimp/run/tp/oracle/client/v9.2.0.7.0-32bit/lib/libclntsh.so.9.0
#13 0x40675946 in sqlcmex () from /sbcimp/run/tp/oracle/client/v9.2.0.7.0-32bit/lib/libclntsh.so.9.0
#14 0x40675e50 in sqlcxt () from /sbcimp/run/tp/oracle/client/v9.2.0.7.0-32bit/lib/libclntsh.so.9.0
#15 0x41e7a64f in next (pX=0xffc42040) at ProCSqlProcessor.c:1027
Please let me know if you resolved your issue and any idea of where we might be going wrong.
Thanks,
Gautam -
Re: Making the oci functions to work
Dear Support
I need help with the compile of php.
I need to make the oci function to work. I am getting
undefined function oci_connect
I need to compile PHP with the option --with-oci8[=DIR], where DIR defaults to your environment variable ORACLE_HOME.
thank
ruth goldson
[email protected]
718-253-7971If you're on Linux start by reading http://otn.oracle.com/tech/opensource/php/apache/inst_php_apache_linux.html
If you're on Windows read http://otn.oracle.com/tech/opensource/php/apache/inst_php_apache_windows.html
Also see http://otn.oracle.com/tech/opensource/php/php_troubleshooting_faq.html
Hope these help. If you still have difficulty, post the details and maybe someone will be able to help.
By the way, this is not a support forum. This is a general forum where you may or may not get answers to questions
depending if people know the answer.
-- CJ -
Getting the OCI function code (OCI_ATTR_FNCODE)
Hello,
I'm migrating an application from OCI 7 into OCI 10g, and I need to find out the OCI function code (that is, an integer representing the last OCI function executed). It seems to be OCI_ATTR_FNCODE, but when I use this, I always get 0. I got this value from the OCI 8 documentation, but it is no longer listed in the 10g documentation.
Is there another way to do this? I am hopeful, since the header file oci.h does have a section of function codes (OCI_FNCODE_*)
Cheers,
Miguel Pascoe
[email protected]
The opinions expressed here are those of the author and do not necessarily reflect those of CGI.If you're looking for what type of SQL statement (insert, update, delete, etc.), then it's OCI_ATTR_SQLFNCODE. In the code below sth is the statement handle.
ub2 stmt_type;
OCIAttrGet((dvoid *)sth,
(ub4)OCI_HTYPE_STMT,
(dvoid *)&stmt_type,
(ub4 *)0,
(ub4)OCI_ATTR_SQLFNCODE,
(OCIError *)errhp); -
Are OCI Function calls secure enough?
Dear Friends,
I would like to know if the OCI programming is used these days. If yes, are these calls secure enough to take care of the ever increasing frauds.
Regards
Bhaskar DivechaI am using OCI in my application and using it connect to an Oracle Instance over the network.
How secure will the username, password and data be?
Is it sent over the network as clear text? Or is there any encryption involved?
What is Oracle Advanced Security? How can I configure this?
Found this thread, but it wasnt very helpful.
Re: Are OCI Function calls secure enough?
Thanks in advance,
Harsha -
MYSQL 'Limit' equivalent function in Oracle8
Hi, i am currently trying to convert some mysql expressions/functions so that i am able to use them with an Oracle database. The function is 'Limits', for example:SELECT BI.title, BI.authors, BI.edition
FROM bookinfo BI, booksonsale BO,users U
WHERE BO.username = U.username
AND BI.isbn = BO.isbn
ORDER BY BI.title
LIMIT 5,20;
The limit basically lists only results from 5 to 20, i.e only 15 results are shown. How would i do this using Oracle SQL?While not identical, you might get away with using the 'ROWNUM' psuedo column.
-
Using mySQL Password encryption function
hi there,
I am using mySQL's password encryption function to store passwords
safely in a tabe. The problem is when I retreive the username and password, because the password in encrypted, it won't match the password entered in a JSP page. Is there any way I can decrypt it to its original form so I can do a equal match comparision.
thanks
maniFor Eg. you can compare the following way...
Here,
userdb - table name
pwd - Column in table (password encrypted field)
'userpassword' - user entered value....
theSql = "SELECT PASSWORD('userpassword'), pwd FROM userdb
rs = statement.executeQuery(theSql);
if (rs.next())
String strPswdEnter=rs.getString(1);
String strPswdData=rs.getString(2);
if (strPswdEnter.equalsIgnoreCase(strPswdData))
bPasswordCorrect=true;
Regards,
Chandramohan V -
Calling OCI functions from Java
Is it possible to call OCI's API functions from Java and create a Lightweight Session ?
Please help me out.I too would like to know how this can be accomplished. I have
seen several posts that claim it is possible with Oracle91. -
Mysql- PHP- FLASH function. (Passing function to a package)
I've just started with ActionScript3.0, and is currently
working on a flash that is to communicate with a mysql database and
have found a great deal of example code online that I've started to
work with.
Currently I have the following package added to my project:
quote:
package
import flash.events.*;
import flash.net.*;
public class SendAndLoad
public function SendAndLoad()
public function sendData( url:String, _vars:URLVariables,
completeFunc:Function ):void
var request:URLRequest = new URLRequest( url );
var loader:URLLoader = new URLLoader();
loader.dataFormat = URLLoaderDataFormat.VARIABLES;
request.data = _vars;
request.method = URLRequestMethod.POST;
loader.addEventListener( Event.COMPLETE, completeFunc );
loader.addEventListener( IOErrorEvent.IO_ERROR, onIOError );
loader.load(request);
//private function handleComplete( event:Event ):void
// var loader:URLLoader = URLLoader( event.target );
// trace( "Par: " + loader.data.par );
// trace( "Message: " + loader.data.msg );
private function onIOError(event:IOErrorEvent):void
trace("Error loading URL.");
And is running the following code in my flash:
quote:
import SendAndLoad;
import flash.net.URLVariables;
function loadUsername( event:Event ):void
var loader:URLLoader = URLLoader( event.target );
//userNameText.text = "ffff";
userNameText.text = loader.data.user;
var url:String = "pages/test.php";
var vars:URLVariables = new URLVariables();
var sal:SendAndLoad = new SendAndLoad();
sal.sendData( url, vars, loadUsername );
As you can see I am trying to seperate the function to be
called when the return value of the page I am accessing returns
with a value, so I wont need to pass all different actions to be
called on different pages I will be requesting throughout my flash
program.
But as it is now, the function loadUsername, never even gets
called, which I assume is because the package can't call the
function outside it.
As I said, I am just starting out with ActionScript 3.0, and
is kind of stuck at this.
Any thoughts?I never tried to pass a function into a class an attempt to
execute it. I am not sure this approach will ever work.
I suggest the following approach (see code): -
Calling OCI function from Java
I am looking for a sample code in Java wherein OCI is used to create a Lightweight Session.
ThanksThis link is amazing since those sources were wrote in 1998 and I started to develop JNative in 2004. I did not found them when I started.
Since JNative can deal with callbacks and probably COM in a near future, I expect to see it living to Dolphin at least.
--Marc (http://jnative.sf.net) -
I made a java servlet with JBuilder 3.5 using a Oracle 8.1.6.2.0 Database and the JDBC thin drivers.
I read somewhere that the OCI - drivers are faster and better for servlets. So I downloaded them and instead of the original thin drivers I used thes OCI-drivers.
But now I can't make a connection to the DB.
Is there a way to install them or do I just
need to locate the position of the .zip file ?
I am currently using win nt. Maybe its only for Solaris ?
Any help welcome at [email protected]
nullOCI drivers are quicker than their thin equivalents and are very good for server side programming.
There are a few basic rules:
Unlike thin drivers, you must have an Oracle Net8 client on the machine.
You have to use the full Database Service Name as defined in the TNSNAMES.ORA file to make the connection. i.e.,
My Database SID is SJJ
My Database Service Name is SJJ.APJ
My OCI Drive connection must specify:
Connection conn = DriverManager.getConnection ("jdbc:oracle:oci8:@sjj.apj" ,user,password);
otherwise I will get a SQL Exception/TNSNAMES error.
It works on NT too.
Hope this helps...
Maybe you are looking for
-
SGD VDI vCenter problem accessing multiple desktops simultaneously
Hi, I am using vCenter as a desktop provider and have created multiple flexible desktop pools in VDI. These desktops pools are then assigned to users in SGD. When accessing these desktops simultaneously through SGD either SGD or VDI gets confused and
-
I have iPhone 5s. After updating to 8.0.2 , it freezes often when i cut the call... happened 7 times ... had to switch off every time .... what to do?????? help....
-
"Mac OSX has quit unexpectedly"
I have had my imac desktop for about a year (i have 10.4 Tiger), using it daily with little to no trouble. Twice in the past two weeks, a grey screen comes from the top of my desktop to the bottom, freezing my computer with a message that informs me
-
Application crash when saving Vista 64bit
Everytime I save a project, Robohelp crashes. First crash: Problem Event Name: APPCRASH Application Name: RoboHTML.exe Application Version: 8.0.0.203 Application Timestamp: 4944f3bb Fault Module Name: ntdll.dll Fault Module V
-
Can't Retrieve ALL iTunes tracks from own NETserver
Strange one this.... I have had a Mac looking after my music from my iPod for a few years now. I have ALL of my music stored on an EXTERNAL Netdisc (250gb Buffalo) via my Netgear modem/server (WG111T wifi). The Mac is manually (RJ45) connected to my