Solved

PHP and ODBC...

Posted on 2002-06-27
3
326 Views
Last Modified: 2006-11-17
Hi,
I am accessing to a MSaccess database with :
$r = odbc_connect( "db","","");
When the database is already opened by access I get an
error message (File already in use bla bla bla).

odbc_connect is supposed to return 0 (false) in case of
connection error....

My PHP version is 4.0.3 so I can't use functions like
odbc_error...

Any idea ?
Thanx
ww

0
Comment
Question by:wwalschaerts
  • 2
3 Comments
 
LVL 5

Accepted Solution

by:
Hamlet081299 earned 50 total points
ID: 7115682
If you want to handle the error yourself, try turning error reporting off...

error_reporting(0);

0
 

Author Comment

by:wwalschaerts
ID: 7115884
Good ! This avoid the script to stop with a huge error
message... But in this case, is there a way to know why it
stops. Can I get the error code or the text message in
a variable ?

Thx;
WW
0
 

Author Comment

by:wwalschaerts
ID: 7115917
Oups... I know the way, forget my last comment.

Thanx,
ww
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
javascript: add id amounts 5 47
write screen output to text file 21 47
php simple error message 4 23
Decrypt string by php 7 31
Deprecated and Headed for the Dustbin By now, you have probably heard that some PHP features, while convenient, can also cause PHP security problems.  This article discusses one of those, called register_globals.  It is a thing you do not want.  …
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question