Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Problems with ODBC linking to data on another computer

Posted on 2003-10-28
3
Medium Priority
?
845 Views
Last Modified: 2013-12-19
I am using PHP and having a problem with ODBC. Not sure if the problem is with PHP or with ODBC but my feeling is ODBC. Is it possible to create an ODBC connection on one computer and point it to data on another computer and it work?

The error I recieve in PHP is: "[Microsoft][ODBC dBase Driver] '(unknown)'"

Long Summary below:


Description:
------------
odbc_connect fails to connect to a Dbase 5 database which resides on a separate Windows 2000 machine using Microsoft ODBC Data Source Administrator. If move database to local machine and point ODBC to local database, then works.
 
PHP reports error:
Warning: SQL error: [Microsoft][ODBC dBase Driver] '(unknown)' is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides., SQL state S1009 in SQLConnect in C:\DEMO\wwwroot\login.php on line 16
 
Turning on Machine-Wide tracing using odbctrac.dll in ODBC Data Source Administrator and reproducing the problem does not create any entries in the SQL.LOG.
 
Reproduce code:
---------------
<?php
//Connection statement
// *** Start the session
include "./WebFront/-general includes-/functions.php"; session_start(); // *** Validate request to log in to this site. $KT_LoginAction = $HTTP_SERVER_VARS["REQUEST_URI"]; if (isset($HTTP_POST_VARS["id"])) {
$KT_valUsername = $HTTP_POST_VARS['id'];
$KT_fldUserAuthorization = "SecurityLevel";
$KT_redirectLoginSuccess = "WebFront/Generated/Lobby.php";
$KT_redirectLoginFailed = "login.php"; $odbcSASI=odbc_connect("DEMOSASI","Administrator","z911!ABC");
$odbcLOGIN=odbc_connect("DEMOLOGIN","","");
$resultRS=odbc_exec($odbcSASI,"SELECT * FROM AUSR WHERE UCASE([USERID])='" . strtoupper(noquotes($_POST['id'])) . "'") or die(odbc_errormsg()); $tempArray=odbc_fetch_array($resultRS);
 
Actual result:
----------------------
Warning: SQL error: [Microsoft][ODBC dBase Driver] '(unknown)' is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides., SQL state S1009 in SQLConnect in C:\DEMO\wwwroot\login.php on line 13
 
Warning: odbc_exec(): supplied argument is not a valid ODBC-Link resource in C:\DEMO\wwwroot\login.php on line 15 [Microsoft][ODBC dBase Driver] '(unknown)' is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides.
 
 
Configuration - ODBC Data Source Administrator, System DSN, System Data Sources
-----------------------------------
Name: DEMOSASI
Driver: Microsoft dBase Driver (*.dbf)
>From the ODBC dBASE Setup for DSN DEMOSASI:
Data Source Name: DEMOSASI
Database VErsion: dBase 5.0
Directory: Z:\ (mapped shared folder where DB resides on another
machine)
Driver:
Collating Sequence: ASCII
Page Timeout: 5
0
Comment
Question by:Alder
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 2

Accepted Solution

by:
rccguy earned 500 total points
ID: 9688946
My suggestion is for you to check out a product called Code Charge, it handles all types of programming lanquages.  You can download a trial version at http://www.codecharge.com/index2.php.  This product is really good at dealing with database connectivity.  It also writes in several different lanquages.  Try it out and see if it can connect to your database.  You will have to set up the ODBC yourself, but there a lot of tools in the software that can help you figure it out.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Have you ever set up your wireless router at home or in the office to find that you little pop-up bubble in the bottom right-hand corner of Windows read "IP Conflict - One of more computers on the network have been assigned the following IP address"…
This is the first one of a series of articles I’ll be writing to address technical issues that are always referred to as network problems. The network boundaries have changed, therefore having an understanding of how each piece in the network  puzzl…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

670 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