]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - lib/WikiDB/adodb/docs/adodb-faq.html
Update adodb to adodb519
[SourceForge/phpwiki.git] / lib / WikiDB / adodb / docs / adodb-faq.html
1 <table width=100%><tr><td>
2 <h2>ADOdb Frequently Asked Questions</h2>
3 </td><td align=right><img src=adodb.gif></a></td></tr></table>
4 <p>
5 <a href=index.html><b>Home</b></a> &nbsp; <a href=index.html#download><b>Download</b></a>
6 <p>
7 <b>GENERAL</b>
8 <ol>
9 <li><b>What is ADOdb?</b><br>
10 An object oriented library written in PHP that abstracts database operations for portability. It is modelled on Microsoft's ADO, but has many improvements that make it unique (eg. pivot tables, Active Record support, generating HTML for paging recordsets with next and previous links, cached recordsets, HTML menu generation, etc).
11   <p>
12 <li><b>Can I use ADOdb for commercial applications for free? </b><br>
13 Yes; ADOdb uses a BSD-style license so you can freely use the source code in any application, so long as you comply to the terms of license.txt.
14 <p>
15 <li><b>How can I learn ADOdb?</b><br>
16 See the <a href=/index.html#docs>docs</a>. There is an extensive list of tutorials listed. 
17 <p>
18 <li><b>How can I contribute to ADOdb?</b><br>
19 - You can translate documentation to another language.<br>
20 - Link to this web-site. <br>
21 - Port ADOdb to new databases. <br>
22 - Make me very happy by buying a copy of <a href=http://phplens.com/>phpLens</a>.<br>
23 <br>
24 Code contributions are also welcome provided they enhance functionality, preferably work on multiple databases, and are backward compatible.
25 <p>
26 <li><b>Who is using ADOdb?</b><br>
27 Many PHP applications and web-sites. There is partial list here: <a href="http://php.weblogs.com/adodb-cool-applications">http://php.weblogs.com/adodb-cool-applications</a>
28 <p>
29 <li><b>Is there a mailing list or forum to discuss ADOdb?</b><br>
30 There is a forum at <a href="http://phplens.com/lens/lensforum/topics.php?id=4">http://phplens.com/lens/lensforum/topics.php?id=4</a>. There is no longer any mailing list due to spammers. 
31 </ol>
32 <p>
33 <b>TECHNICAL</b>
34 <ol>
35
36   <li><a name=t1 href=#t1>#</a> <b>Why do I get a ociplogon/ocilogon undefined error message?<br>
37 Why do I get a mysql_pconnect/mysql_connect undefined error message?<br>
38 Why do I get a ibase_timefmt undefined error message?<br>
39 Why do I get a *_connect/*_pconnect undefined error message?</b><br>
40 You do not have this extension compiled or included with PHP. On Windows, you can include it by modifying your php.ini (extension=<i>extension_name.dll</i>). On Unix, you will need to compile the extension - for help try <a href=http://www.faqts.com/knowledge_base/index.phtml/fid/51/>this knowledgebase</a>. Or perhaps you do not have the database client installed.
41     <p>
42 <a name=t2></a>
43   <li><a name=2connection href=#2connection>#</a>
44 <b>I am trying to create two connections to the same database, but the 2nd connection doesn't work, but reuses the first connection.</b><br>
45     <p>
46 This is a "feature" of PHP. When you make a 2nd connection that only differs by the database name, you get back the first connection. This is normally the reason for the problem described.
47     <p>
48
49 From <a href="http://php.net/manual/en/function.mysql-connect.php">http://php.net/manual/en/function.mysql-connect.php</a>
50 (this applies to other db's too):
51     <p>
52
53 <i>If a second call is made to mysql_connect() with the same arguments, no new link will be established, but instead, the link identifier of the already opened link will be returned.</i>
54     <p>
55
56 Possible solutions include: 
57     <ul>
58       <li> Use different userid and password for each connection. 
59       <li> Use different IP or  host-address for each connection, even when connecting to same server! Eg. use 'localhost' and '127.0.0.l'.
60       <li> Use NConnect( ), which always forces a new connection, if the database driver supports it (Oci8, MySQL,MSSQL and PostgreSQL).
61     
62       <li>Use SelectDB( ), which switches databases, if the database driver supports it (MySQL, MSSQL, Sybase).
63     </ul>
64     <p>
65
66
67   <li> 
68 <b>Can you tell me what is wrong with this code snipplet? - it does not do anything...[code deleted]...</b><br>
69 Try turning on debugging. Eg.
70     <pre>
71   $DB = ADONewConnection($driver);
72   $DB->debug = 1;</pre>
73    This will show all error messages and generated SQL.
74     <p>
75   <li><b>SelectLimit with Oracle oci8 is not working.<br>
76     The adodb_pager class is not working with oci8.</b><br>
77 You are probably using a version of Oracle earlier than 8.1.7, or have compatibility set to an earlier version in init.ora. You can try using the <i>oci805 </i>driver instead.
78     <p>
79   <li><b>Why does mssql only retrieve the first 255 or 4096 bytes of my data?</b><br>
80 See <a href="http://phplens.com/lens/lensforum/msgs.php?id=3564">http://phplens.com/lens/lensforum/msgs.php?id=3564</a>
81     <p>
82   <li><a href=#access>#</a><a name=access></a> <b>I tried in Microsoft Access to insert a record but i cannot see it, or it is inserted twice. Why?</b> <br>
83 The <a href=http://support.microsoft.com/default.aspx?scid=kb;en-us;299973>Access ODBC driver is not thread-safe</a>.
84 <p>
85 When you run Microsoft Jet in an IIS environment, it is recommended that you use the native Jet OLE DB Provider in place of the Microsoft Access ODBC driver. The Microsoft Access ODBC driver (Jet ODBC driver) can have stability issues due to the version of Visual Basic for Applications that is invoked because the version is not thread safe. 
86 <p>
87 An example of using the thread-safe OLE DB provider:
88 <pre>
89 $dsn = 'Provider=Microsoft.Jet.OLEDB.4.0;'.
90              'Data Source=C:\path\to\MyDatabase.mdb;';
91 $db = NewADOConnection('ado_access');
92 $db->PConnect($dsn);
93 </pre>
94 <p>
95 There have been reports that using PConnect() is more reliable than Connect() with Access. 
96 I have also heard of good experiences using <a href=http://odbtp.sourceforge.net/>ODBTP</a>; you can
97 call it directly, or through the ADOdb odbtp driver.
98 <p>
99   <li> <a name=perms href=#perms>#</a> <b>I cannot connect to Access/VFP/SQL Server from IIS. However I can connect from the desktop.</b><br>
100 This is probably a Windows 2000 file permissions problem. IIS assumes a specific userid when serving web pages, and it is likely that userid does not have permission to access the  database. You need to change the IIS user to someone who has permission the database.
101 <p>
102           
103   <li><b>Oracle problem with ADOdb?</b>
104     <p>
105 If it is a very technical question, you can try this forum <a href="http://forums.oracle.com/forums/forum.jsp?forum=178">http://forums.oracle.com/forums/forum.jsp?forum=178</a>
106 </ol>
107 <hr>
108 (c) 2000-2004 John Lim. All rights reserved.