Database Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesDatabase Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old January 15th, 2008, 03:33 PM
bcbrock bcbrock is offline
Contributing User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Muscatine, IA, USA
Posts: 9 bcbrock User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 27 m 17 sec
Reputation Power: 0
MySQL 4.1 - ODBC Connection to dbase IV?

I am trying to figure out how to query some data out of a dbase IV (.dbf) file sitting on a remote server from my MySQL/PHP/Web Server.

Both servers are Windows Server 2003 SP2.

My MySQL/PHP/Web server is running PHP 4.3.11, MySQL 4.0.24, and IIS.

I have set a system DSN on the remote machine for the directory that contains the dbase file. The DSN name is SASIxp, and the actual file I'm trying to connect to is ADST.DBF.

I've found several examples of how to connect with other database types, and have used those examples in an attempt to connect to my dbase IV file, but so far, I'm not having any luck. Instead, I'm getting errors like:

Code:
Warning: odbc_exec(): SQL error: [Microsoft][ODBC dBase Driver] The Microsoft Jet database engine could not find the object 'ADST.DBF'. Make sure the object exists and that you spell its name and the path name correctly., SQL state S0002 in SQLExecDirect in E:\InetPub\wwwroot\posa_test\includes\functions.in  c on line 4952


I'm including my sandbox code below, which includes 4 different versions of $connection_string, none of which have worked.

Does anybody know of a good tutorial, or have any suggestions? I know I'm somewhat limited in what I can do with a dbase IV file (if anything???), but all I really need is to do a simple lookup; no adding, deleting or changing of any records.


Code:
//$connection_string = 'DRIVER={Microsoft dBase Driver (*.dbf)};SERVER=<10.112.139.230>;DATABASE=<ADST.DBF>'; 
//$connection_string = 'DRIVER={Microsoft dBase Driver (*.dbf)};SERVER=<10.112.139.230>;DATABASE=<SASIxp>';

//$connection_string = 'DRIVER={Microsoft dBase Driver (*.dbf)};datasource=SASIxp;';
    
$connection_string = 'DRIVER={Microsoft dBase Driver (*.dbf)}; datasource=\\\\sasi_main\\sasixp\\datafile\\ADST.D  BF;';
   
    
$user = ''; 
$pass = ''; 
    
//$connection = odbc_connect( $connection_string, $user, $pass ); 
    
$odbc = odbc_connect ($connection_string, '', '') or die('Could Not Connect to ODBC Database!');

$strsql= 'SELECT * FROM ADST.DBF';
  
$query = odbc_exec($odbc, $strsql) or die (odbc_errormsg());


Thanks in advance for your assistance!:

Reply With Quote
  #2  
Old January 23rd, 2008, 09:20 AM
lig's Avatar
lig lig is offline
"Forum Nazi"
Codewalkers Demi-God (4500 - 4999 posts)
 
Join Date: Apr 2007
Location: Jacksonville, Fl
Posts: 4,719 lig User rank is Private First Class (20 - 50 Reputation Level)lig User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 Days 4 m 29 sec
Reputation Power: 6
Don't know if this site will help you, but I have used it a number of times when having to use a odbc driver.

Connection Strings
__________________
life is a game.... Have fun
-----------------------------
http://www.phpwomen.org
strength in unity

PHPCommunity IRC
#phpc on freenode

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesDatabase Help > MySQL 4.1 - ODBC Connection to dbase IV?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five &quot;checkpoints&quot; for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway