want to connect database in another system

Questionswant to connect database in another system
suhasini asked 11 years ago

i want to connect db in another system through odbc connection, not in my loca system.what to do?

2 Answers
Abu Ghufran answered 11 years ago

Hello,

You can specify server location, in connection setting param:
e.g. to connect remote sql server db – $db_conf["server"] = "34.234.33.53";

$db_conf = array();
$db_conf["type"] = "mssqlnative";
$db_conf["server"] = "34.234.33.53";
$db_conf["user"] = null;
$db_conf["password"] = null;
$db_conf["database"] = "master";

$g = new jqgrid($db_conf);

Few other examples:

$db_conf = array();
$db_conf["type"] = "odbc_mssql";
$db_conf["server"] = "Driver={SQL Server};Server=localhost;Database=northwind;";
$db_conf["user"] = "user";
$db_conf["password"] = "pass";
$db_conf["database"] = null;

$db_conf = array();
$db_conf["type"] = "ado_mssql";
$db_conf["server"] = "PROVIDER=MSDASQL;DRIVER={SQL Server};SERVER=flipper;DATABASE=ai;UID=sa;PWD=;";
$db_conf["user"] = null;
$db_conf["password"] = null;
$db_conf["database"] = null;

Abu Ghufran answered 11 years ago

Forgot to mention, this is supported in licensed version.

Your Answer

5 + 3 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?