Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8512277
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T04:14:08+00:00 2026-06-11T04:14:08+00:00

When i odbc_connect() to MS SQL with PHP using ODBC in local network(not host)

  • 0

When i odbc_connect() to MS SQL with PHP using ODBC in local network(not host), the connection takes about 11 seconds. Here is the code of my connection:

function __construct(){
    $connstr = "Driver={SQL Server};Server=serv;Database=Base;";
    $this->lnk = odbc_connect($connstr, "login", "passs");
}

And when i odbc_fetch_row() it also takes about 5 seconds. Here is my result function code:

function manual($query){
    $result = odbc_exec($this->lnk, $query);// or exit(odbc_error);
    for($i = 1; $i<odbc_num_fields($result)+1; $i++){
        $arr_row[] = odbc_field_name($result,$i);
    }
    while(odbc_fetch_row($result)){
        foreach($arr_row as $name){
            $ownsql_result[$name][] = trim(odbc_result($result, $name));
        }
    }
    odbc_free_result($result);
    return $ownsql_result; 
}

Im Using WAMP on Windows 7 and MS SQL 2000 on other PC Windows Server 2003 in same local network… Plz guys help out

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T04:14:09+00:00Added an answer on June 11, 2026 at 4:14 am

    The problem was in MSSQL SERVER VERSION… i changed it from 2000 to 2005 and all worked fiine

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using the ODBC extension in PHP to connect to an SQL 2000
I want to connect php to Access without using ODBC connection like MySQL. Please
I've successfully tested a connection via PHP's odbc_connect() to a SQL Server 2005 Express
How do I connect to a database on other computer using ODBC connection? Let
I have created an ODBC connection for oracle using Microsoft ODBC for Oracle driver
I'm using a Odbc connection to a mysql server, and was wondering how I
I'm trying to connect to an access database from a php script using ODBC.
I am trying to connect to SQL Server 2008 (not express) with PHP 5.2.9-2
We are using a SQL Native Client to connect to a local SQL Server
$connection = db2_connect ( '*LOCAL', PHP_USER_NAME, PHP_USER_PASS ); if (! $connection) { die('Could not

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.